- java.lang.Object
-
- org.chocosolver.solver.search.strategy.decision.Decision<SetVar>
-
- org.chocosolver.solver.search.strategy.decision.SetDecision
-
- All Implemented Interfaces:
Serializable
,ICause
public class SetDecision extends Decision<SetVar>
A decision based on aSetVar
- Since:
- Jan. 2013
- Author:
- Jean-Guillaume Fages
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.search.strategy.decision.Decision
branch, max_branching, var
-
-
Constructor Summary
Constructors Constructor Description SetDecision(PoolManager<SetDecision> poolManager)
Create an decision based on anSetVar
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply()
Apply the current decisionvoid
free()
Free the decision, ie, it can be reusedInteger
getDecisionValue()
Return the value object involves in the decisionvoid
reverse()
Reverse the decision operatorvoid
set(SetVar v, int value, DecisionOperator<SetVar> operator)
Instantiate this decision with the parametersString
toString()
-
Methods inherited from class org.chocosolver.solver.search.strategy.decision.Decision
buildNext, duplicate, getArity, getDecisionVariable, getPosition, hasNext, isEquivalentTo, rewind, set, setPosition, setRefutable, triesLeft
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.ICause
explain, forEachIntVar
-
-
-
-
Constructor Detail
-
SetDecision
public SetDecision(PoolManager<SetDecision> poolManager)
Create an decision based on anSetVar
- Parameters:
poolManager
- decision pool manager, to recycle decisions
-
-
Method Detail
-
getDecisionValue
public Integer getDecisionValue()
Description copied from class:Decision
Return the value object involves in the decision- Specified by:
getDecisionValue
in classDecision<SetVar>
- Returns:
- a value object
-
apply
public void apply() throws ContradictionException
Description copied from class:Decision
Apply the current decision- Specified by:
apply
in classDecision<SetVar>
- Throws:
ContradictionException
- if the application of this decision fails
-
set
public void set(SetVar v, int value, DecisionOperator<SetVar> operator)
Instantiate this decision with the parameters- Parameters:
v
- a variablevalue
- a value
-
reverse
public void reverse()
Description copied from class:Decision
Reverse the decision operator
-
free
public void free()
Description copied from class:Decision
Free the decision, ie, it can be reused
-
-