public class FixedPeriodRestarts extends Object implements RestartStrategy
Constructor and Description |
---|
FixedPeriodRestarts() |
Modifier and Type | Method and Description |
---|---|
long |
getPeriod() |
void |
init(SearchParams params,
SolverStats stats)
Hook method called just before the search starts.
|
void |
newConflict() |
void |
newLearnedClause(Constr learned,
int trailLevel)
Callback method called when a new clause is learned by the solver, after
conflict analysis.
|
long |
nextRestartNumberOfConflict()
Deprecated.
|
void |
onBackjumpToRootLevel()
Called when the solver backjumps to the root level.
|
void |
onRestart()
Hook method called when a restart occurs (once the solver has backtracked
to top decision level).
|
void |
reset() |
void |
setPeriod(long period) |
boolean |
shouldRestart()
Ask the strategy if the solver should restart.
|
String |
toString() |
public void reset()
reset
in interface ConflictTimer
public void newConflict()
newConflict
in interface ConflictTimer
public void init(SearchParams params, SolverStats stats)
RestartStrategy
init
in interface RestartStrategy
params
- the user's search parameters.stats
- some statistics about the search (number of conflicts,
restarts, etc).@Deprecated public long nextRestartNumberOfConflict()
RestartStrategy
nextRestartNumberOfConflict
in interface RestartStrategy
public boolean shouldRestart()
RestartStrategy
shouldRestart
in interface RestartStrategy
public void onRestart()
RestartStrategy
onRestart
in interface RestartStrategy
public void onBackjumpToRootLevel()
RestartStrategy
onBackjumpToRootLevel
in interface RestartStrategy
public void newLearnedClause(Constr learned, int trailLevel)
RestartStrategy
newLearnedClause
in interface RestartStrategy
learned
- the new clausetrailLevel
- the number of literals assigned when the conflict occurred.public long getPeriod()
public void setPeriod(long period)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.