public final class HeuristicRestartModule extends Object implements ConflictListener, BackjumpListener
Modifier and Type | Field and Description |
---|---|
boolean |
shouldRestart |
Constructor and Description |
---|
HeuristicRestartModule() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(Core core)
initializes the component with the given solver.
|
void |
onBackjump(int oldLevel,
int newLevel)
Called when the solver backtracks.
|
void |
onConflict(MapClause clause,
int level)
called when a conflict occurs
|
void |
onRestart(int oldLevel)
called when the solver restarts.
|
public void onConflict(MapClause clause, int level)
ConflictListener
onConflict
in interface ConflictListener
clause
- the conflict (unsatisfiable) clauselevel
- the level at which the conflict occurredpublic void onBackjump(int oldLevel, int newLevel)
BackjumpListener
components that want to be warned about backjumps should put themselves in Core.backjumpModules.
onBackjump
in interface BackjumpListener
oldLevel
- the level at which the solver was before backtrackingnewLevel
- the level to which the solver backtrackspublic void onRestart(int oldLevel)
BackjumpListener
components that want to be warned about restarts should put themselves in Core.restartModules.
onRestart
in interface BackjumpListener
oldLevel
- the level at which the solver was before restartingpublic void initialize(Core core)
SolverComponent
initialize
in interface SolverComponent
core
- core component to initializeCopyright © 2022. All rights reserved.