- java.lang.Object
-
- org.chocosolver.solver.search.strategy.decision.Decision<RealVar>
-
- org.chocosolver.solver.search.strategy.decision.RealDecision
-
- All Implemented Interfaces:
Serializable
,ICause
public class RealDecision extends Decision<RealVar>
A decision based on aRealVar
that splits the domain in two ranges. The lower range is evaluated first, then the upper range.- Since:
- 2 juil. 2010
- Author:
- Charles Prud'homme
- 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 RealDecision(PoolManager<RealDecision> poolManager)
Create an decision based on anRealVar
-
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 reusedDouble
getDecisionValue()
Return the value object involves in the decisionvoid
set(RealVar v, double value, double epsilon, boolean leftFirst)
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, reverse, 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
-
RealDecision
public RealDecision(PoolManager<RealDecision> poolManager)
Create an decision based on anRealVar
- Parameters:
poolManager
- decision pool manager, to recycle decisions
-
-
Method Detail
-
getDecisionValue
public Double getDecisionValue()
Description copied from class:Decision
Return the value object involves in the decision- Specified by:
getDecisionValue
in classDecision<RealVar>
- Returns:
- a value object
-
apply
public void apply() throws ContradictionException
Description copied from class:Decision
Apply the current decision- Specified by:
apply
in classDecision<RealVar>
- Throws:
ContradictionException
- if the application of this decision fails
-
set
public void set(RealVar v, double value, double epsilon, boolean leftFirst)
Instantiate this decision with the parameters- Parameters:
v
- a variablevalue
- a valueepsilon
- gap between value as upper bound and as lower bound (to simulate strictness)leftFirst
- select left range first
-
free
public void free()
Description copied from class:Decision
Free the decision, ie, it can be reused
-
-