Class RealDecision
- 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 aRealVarthat 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 voidapply()Apply the current decisionvoidfree()Free the decision, ie, it can be reusedDoublegetDecisionValue()Return the value object involves in the decisionvoidset(RealVar v, double value, double epsilon, boolean leftFirst)Instantiate this decision with the parametersStringtoString()-
Methods inherited from class org.chocosolver.solver.search.strategy.decision.Decision
buildNext, duplicate, getArity, getDecisionVariable, getPosition, hasNext, isEquivalentTo, reverse, rewind, set, setPosition, setRefutable, triesLeft
-
-
-
-
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:DecisionReturn the value object involves in the decision- Specified by:
getDecisionValuein classDecision<RealVar>- Returns:
- a value object
-
apply
public void apply() throws ContradictionExceptionDescription copied from class:DecisionApply the current decision- Specified by:
applyin 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:DecisionFree the decision, ie, it can be reused
-
-