public final class LubyRestarts extends Object implements RestartStrategy
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LUBY_FACTOR |
Constructor and Description |
---|
LubyRestarts() |
LubyRestarts(int factor) |
Modifier and Type | Method and Description |
---|---|
int |
getFactor() |
void |
init(SearchParams params,
SolverStats stats)
Hook method called just before the search starts.
|
int |
luby()
returns the current value of the luby sequence.
|
void |
newConflict() |
void |
newLearnedClause(Constr learned,
int trailLevel)
Callback method called when a new clause is learned by the solver, after
conflict analysis.
|
int |
nextLuby()
Computes and return the next value of the luby sequence.
|
long |
nextRestartNumberOfConflict()
Ask for the next restart in number of conflicts.
|
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 |
setFactor(int factor) |
boolean |
shouldRestart()
Ask the strategy if the solver should restart.
|
String |
toString() |
public static final int DEFAULT_LUBY_FACTOR
public LubyRestarts()
public LubyRestarts(int factor)
factor
- the factor used for the Luby series.public int luby()
public int nextLuby()
luby()
public void setFactor(int factor)
public int getFactor()
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).public long nextRestartNumberOfConflict()
RestartStrategy
nextRestartNumberOfConflict
in interface RestartStrategy
public void onRestart()
RestartStrategy
onRestart
in interface RestartStrategy
public boolean shouldRestart()
RestartStrategy
shouldRestart
in interface RestartStrategy
public void onBackjumpToRootLevel()
RestartStrategy
onBackjumpToRootLevel
in interface RestartStrategy
public void reset()
reset
in interface ConflictTimer
public void newConflict()
newConflict
in interface ConflictTimer
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.Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.