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)
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 SearchParams getSearchParams()
public SolverStats getSolverStats()
public ICDCL<?> getSolver()
public void setSolver(ICDCL<?> solver)
public void reset()
reset
in interface ConflictTimer
public void newConflict()
newConflict
in interface ConflictTimer
public void updateVar(int p)
IPhaseSelectionStrategy
updateVar
in interface IPhaseSelectionStrategy
p
- a literal. The associated variable will be updated.public void init(int nlength)
IPhaseSelectionStrategy
init
in interface IPhaseSelectionStrategy
nlength
- the number of variables managed by the heuristics.public void init(int var, int p)
IPhaseSelectionStrategy
init
in interface IPhaseSelectionStrategy
var
- a variablep
- it's initial phasepublic void assignLiteral(int p)
IPhaseSelectionStrategy
assignLiteral
in interface IPhaseSelectionStrategy
public int select(int var)
IPhaseSelectionStrategy
select
in interface IPhaseSelectionStrategy
var
- a variable chosen by the heuristicspublic void updateVarAtDecisionLevel(int q)
IPhaseSelectionStrategy
IPhaseSelectionStrategy.updateVar(int)
.updateVarAtDecisionLevel
in interface IPhaseSelectionStrategy
q
- a literalpublic void setInterrupted(boolean b)
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.