public class IntDecision extends Decision<IntVar>
IntVar
branch, max_branching, var
Constructor and Description |
---|
IntDecision(PoolManager<IntDecision> poolManager)
Create an decision based on an
IntVar |
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply the current decision
|
IntDecision |
duplicate() |
IntDecision |
flip() |
void |
free()
Free the decision, ie, it can be reused
|
Integer |
getDecisionValue()
Return the value object involves in the decision
|
DecisionOperator<IntVar> |
getDecOp() |
boolean |
isEquivalentTo(Decision dec) |
void |
reverse()
Reverse the decision operator
|
void |
set(IntVar v,
int value,
DecisionOperator<IntVar> assignment)
Instantiate this decision with the parameters
|
String |
toString() |
boolean |
why(RuleStore ruleStore,
IntVar var,
IEventType evt,
int value)
Add new rules to the rule store
|
buildNext, getArity, getDecisionVariable, getPosition, hasNext, rewind, set, setPosition, setRefutable, triesLeft
public IntDecision(PoolManager<IntDecision> poolManager)
IntVar
poolManager
- decision pool manager, to recycle decisionspublic Integer getDecisionValue()
Decision
getDecisionValue
in class Decision<IntVar>
public void apply() throws ContradictionException
Decision
apply
in class Decision<IntVar>
ContradictionException
- if the application of this decision failspublic void set(IntVar v, int value, DecisionOperator<IntVar> assignment)
v
- a variablevalue
- a valueassignment
- a decision operatorpublic void reverse()
Decision
public void free()
Decision
public IntDecision duplicate()
public boolean isEquivalentTo(Decision dec)
isEquivalentTo
in class Decision<IntVar>
dec
- a decisionpublic DecisionOperator<IntVar> getDecOp()
public IntDecision flip()
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 © 2017. All rights reserved.