public class RootDecision extends Decision
Modifier and Type | Field and Description |
---|---|
static RootDecision |
ROOT |
Constructor and Description |
---|
RootDecision() |
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply the current decision
|
void |
buildNext()
Build the refutation, hasNext() must be called before
|
int |
compareTo(Object o) |
void |
free()
Free the decision, ie, it can be reused
|
DecisionOperator |
getDecisionOperator() |
Object |
getDecisionValue()
Return the value object involves in the decision
|
Variable |
getDecisionVariable()
Return the variable object involves in the decision
|
Decision |
getPrevious()
Return the previous decision applied in the tree search
|
boolean |
hasNext()
Return true if the decision can be refuted
|
void |
reverse()
Reverse the decision operator
|
void |
rewind()
Force the decision to be in its creation state.
|
void |
setPrevious(Decision decision)
Set the previous decision applied in the tree search
|
String |
toString() |
boolean |
why(RuleStore ruleStore,
IntVar var,
IEventType evt,
int value)
Add new rules to the rule store
|
compareTo, duplicate, getId, getWorldIndex, once, set, setWorldIndex, triesLeft
public static RootDecision ROOT
public Variable getDecisionVariable()
Decision
getDecisionVariable
in class Decision
public Object getDecisionValue()
Decision
getDecisionValue
in class Decision
public DecisionOperator getDecisionOperator()
getDecisionOperator
in class Decision
public boolean hasNext()
Decision
public void buildNext()
Decision
public void rewind()
Decision
public void apply() throws ContradictionException
Decision
apply
in class Decision
ContradictionException
public void setPrevious(Decision decision)
Decision
setPrevious
in class Decision
decision
- previous decisionpublic Decision getPrevious()
Decision
getPrevious
in class Decision
public void free()
Decision
public void reverse()
Decision
public int compareTo(Object o)
public boolean why(RuleStore ruleStore, IntVar var, IEventType evt, int value)
ICause
ruleStore
- the rule storevar
- the modified variableevt
- the undergoing eventvalue
- the value (for REMOVE only)Copyright © 2015. All rights reserved.