- java.lang.Object
-
- org.chocosolver.solver.learn.AbstractEventObserver
-
- Direct Known Subclasses:
EventRecorder
public abstract class AbstractEventObserver extends Object
An abstract class for event recording utility.Created by cprudhom on 09/12/14. Project: choco.
-
-
Field Summary
Fields Modifier and Type Field Description static AbstractEventObserver
SILENT_OBSERVER
A default observer that does nothing on events
-
Constructor Summary
Constructors Constructor Description AbstractEventObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Implications>
getGI()
void
instantiateTo(IntVar var, int val, ICause cause, int oldLB, int oldUB)
Explain the assignment toval
ofvar
due tocause
.void
pushDecisionLevel()
void
removeValue(IntVar var, int val, ICause cause)
Explain the removal of theval
fromvar
, due tocause
.void
undo()
Undo the last operation donevoid
updateLowerBound(IntVar var, int value, int old, ICause cause)
Explain the removal of [old
,value
[ fromvar
, due tocause
.void
updateUpperBound(IntVar var, int value, int old, ICause cause)
Explain the removal of ]value
,old
] fromvar
, due tocause
.
-
-
-
Field Detail
-
SILENT_OBSERVER
public static final AbstractEventObserver SILENT_OBSERVER
A default observer that does nothing on events
-
-
Method Detail
-
removeValue
public void removeValue(IntVar var, int val, ICause cause)
Explain the removal of theval
fromvar
, due tocause
. This is the main explanation why we create this class. Record operations to execute for explicit call to explanation.- Parameters:
var
- an integer variableval
- a valuecause
- a cause
-
updateLowerBound
public void updateLowerBound(IntVar var, int value, int old, ICause cause)
Explain the removal of [old
,value
[ fromvar
, due tocause
. Prerequisite:value
should belong tovar
This is the main reason why we create this class. Record operations to execute for explicit call to explanation.- Parameters:
var
- an integer variablevalue
- a valuecause
- a cause
-
updateUpperBound
public void updateUpperBound(IntVar var, int value, int old, ICause cause)
Explain the removal of ]value
,old
] fromvar
, due tocause
. Prerequisite:value
should belong tovar
This is the main reason why we create this class. Record operations to execute for explicit call to explanation.- Parameters:
var
- an integer variablevalue
- a valuecause
- a cause
-
instantiateTo
public void instantiateTo(IntVar var, int val, ICause cause, int oldLB, int oldUB)
Explain the assignment toval
ofvar
due tocause
. This is the main reason why we create this class. Record operations to execute for explicit call to explanation.- Parameters:
var
- an integer variableval
- a valuecause
- a causeoldLB
- previous lboldUB
- previous ub
-
pushDecisionLevel
public void pushDecisionLevel()
-
undo
public void undo()
Undo the last operation done
-
getGI
public Optional<Implications> getGI()
-
-