public final class SatChangesListener extends Object implements AssertionListener, PropagateListener, BackjumpListener
| Constructor and Description |
|---|
SatChangesListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all sets, so that elements occurring in them later result only
from later events
|
void |
ensureAccess(IntVar cpVar)
gets sure we won't have a NullPointerException
|
void |
initialize(Core core)
initializes the component with the given solver.
|
void |
initialize(SatWrapper wrapper) |
void |
onAssertion(int literal,
int level)
Called when a variable is set
|
void |
onBackjump(int oldLevel,
int newLevel)
clear on backjump
|
void |
onPropagate(int literal,
int clauseId)
called when a propagation occurs
|
void |
onRestart(int oldLevel)
called when the solver restarts.
|
String |
toString() |
void |
updateCpVariables(int storeLevel)
Using all data accumulated since last clear(), update the domain
of the given CP variable
|
public void clear()
public void onPropagate(int literal,
int clauseId)
PropagateListeneronPropagate in interface PropagateListenerliteral - the literal propagatedclauseId - the unique ID of the unit clausepublic void onAssertion(int literal,
int level)
AssertionListeneronAssertion in interface AssertionListenerliteral - the literal that is set
propagation, false otherwiselevel - the search levelpublic void onBackjump(int oldLevel,
int newLevel)
onBackjump in interface BackjumpListeneroldLevel - the level at which the solver was before backtrackingnewLevel - the level to which the solver backtrackspublic void onRestart(int oldLevel)
BackjumpListenercomponents that want to be warned about restarts should put themselves in Core.restartModules.
onRestart in interface BackjumpListeneroldLevel - the level at which the solver was before restartingpublic void updateCpVariables(int storeLevel)
storeLevel - the current level of the storepublic void ensureAccess(IntVar cpVar)
cpVar - the CP variable we are about to accesspublic void initialize(Core core)
SolverComponentinitialize in interface SolverComponentcore - core component to initializepublic void initialize(SatWrapper wrapper)
Copyright © 2022. All rights reserved.