public class RemoteControlStrategy extends Object implements RestartStrategy, IPhaseSelectionStrategy
| Constructor and Description |
|---|
RemoteControlStrategy() |
RemoteControlStrategy(ILogAble log) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignLiteral(int p)
indicate that a literal has been satisfied.
|
void |
clickedOnClean() |
ILogAble |
getLogger() |
int |
getNbClausesAtWhichWeShouldClean() |
IPhaseSelectionStrategy |
getPhaseSelectionStrategy() |
RestartStrategy |
getRestartStrategy() |
SearchParams |
getSearchParams() |
ICDCL<?> |
getSolver() |
SolverStats |
getSolverStats() |
void |
init(int nlength)
that method has the responsibility to initialize all arrays in the
heuristics.
|
void |
init(int var,
int p)
initialize the phase of a given variable to the given value.
|
void |
init(SearchParams params,
SolverStats stats)
Hook method called just before the search starts.
|
boolean |
isHasClickedOnClean() |
boolean |
isHasClickedOnRestart() |
boolean |
isUseTelecomStrategyAsLearnedConstraintsDeletionStrategy() |
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() |
int |
select(int var)
selects the phase of the variable according to a phase selection
strategy.
|
void |
setHasClickedOnClean(boolean hasClickedOnClean) |
void |
setHasClickedOnRestart(boolean hasClickedOnRestart) |
void |
setInterrupted(boolean b) |
void |
setLogger(ILogAble logger) |
void |
setNbClausesAtWhichWeShouldClean(int nbClausesAtWhichWeShouldClean) |
void |
setPhaseSelectionStrategy(IPhaseSelectionStrategy phaseSelectionStrategy) |
void |
setRestartStrategy(RestartStrategy restart) |
void |
setSolver(ICDCL<?> solver) |
void |
setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy(boolean useTelecomStrategyAsLearnedConstraintsDeletionStrategy) |
boolean |
shouldRestart()
Ask the strategy if the solver should restart.
|
String |
toString() |
void |
updateVar(int p)
To be called when the activity of a literal changed.
|
void |
updateVarAtDecisionLevel(int q)
Allow to perform a specific action when a literal of the current decision
level is updated.
|
public RemoteControlStrategy(ILogAble log)
public RemoteControlStrategy()
public boolean isHasClickedOnRestart()
public void setHasClickedOnRestart(boolean hasClickedOnRestart)
public boolean isHasClickedOnClean()
public void setHasClickedOnClean(boolean hasClickedOnClean)
public boolean isUseTelecomStrategyAsLearnedConstraintsDeletionStrategy()
public void setUseTelecomStrategyAsLearnedConstraintsDeletionStrategy(boolean useTelecomStrategyAsLearnedConstraintsDeletionStrategy)
public void clickedOnClean()
public RestartStrategy getRestartStrategy()
public IPhaseSelectionStrategy getPhaseSelectionStrategy()
public void setPhaseSelectionStrategy(IPhaseSelectionStrategy phaseSelectionStrategy)
public void setRestartStrategy(RestartStrategy restart)
public int getNbClausesAtWhichWeShouldClean()
public void setNbClausesAtWhichWeShouldClean(int nbClausesAtWhichWeShouldClean)
public ILogAble getLogger()
public void setLogger(ILogAble logger)
public void init(SearchParams params, SolverStats stats)
RestartStrategyinit in interface RestartStrategyparams - the user's search parameters.stats - some statistics about the search (number of conflicts,
restarts, etc).@Deprecated public long nextRestartNumberOfConflict()
RestartStrategynextRestartNumberOfConflict in interface RestartStrategypublic boolean shouldRestart()
RestartStrategyshouldRestart in interface RestartStrategypublic void onRestart()
RestartStrategyonRestart in interface RestartStrategypublic void onBackjumpToRootLevel()
RestartStrategyonBackjumpToRootLevel in interface RestartStrategypublic SearchParams getSearchParams()
public SolverStats getSolverStats()
public ICDCL<?> getSolver()
public void setSolver(ICDCL<?> solver)
public void reset()
reset in interface ConflictTimerpublic void newConflict()
newConflict in interface ConflictTimerpublic void updateVar(int p)
IPhaseSelectionStrategyupdateVar in interface IPhaseSelectionStrategyp - a literal. The associated variable will be updated.public void init(int nlength)
IPhaseSelectionStrategyinit in interface IPhaseSelectionStrategynlength - the number of variables managed by the heuristics.public void init(int var,
int p)
IPhaseSelectionStrategyinit in interface IPhaseSelectionStrategyvar - a variablep - it's initial phasepublic void assignLiteral(int p)
IPhaseSelectionStrategyassignLiteral in interface IPhaseSelectionStrategypublic int select(int var)
IPhaseSelectionStrategyselect in interface IPhaseSelectionStrategyvar - a variable chosen by the heuristicspublic void updateVarAtDecisionLevel(int q)
IPhaseSelectionStrategyIPhaseSelectionStrategy.updateVar(int).updateVarAtDecisionLevel in interface IPhaseSelectionStrategyq - a literalpublic void setInterrupted(boolean b)
public void newLearnedClause(Constr learned, int trailLevel)
RestartStrategynewLearnedClause in interface RestartStrategylearned - 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.