public class RealDecision extends Decision<RealVar>
RealVar
that splits the domain in two ranges.
The lower range is evaluated first, then the upper range.
branch, max_branching, var
Constructor and Description |
---|
RealDecision(PoolManager<RealDecision> poolManager)
Create an decision based on an
RealVar |
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply the current decision
|
void |
free()
Free the decision, ie, it can be reused
|
Double |
getDecisionValue()
Return the value object involves in the decision
|
void |
set(RealVar v,
double value,
double epsilon,
boolean leftFirst)
Instantiate this decision with the parameters
|
String |
toString() |
buildNext, duplicate, getArity, getDecisionVariable, getPosition, hasNext, isEquivalentTo, reverse, rewind, set, setPosition, setRefutable, triesLeft
public RealDecision(PoolManager<RealDecision> poolManager)
RealVar
poolManager
- decision pool manager, to recycle decisionspublic Double getDecisionValue()
Decision
getDecisionValue
in class Decision<RealVar>
public void apply() throws ContradictionException
Decision
apply
in class Decision<RealVar>
ContradictionException
- if the application of this decision failspublic void set(RealVar v, double value, double epsilon, boolean leftFirst)
v
- a variablevalue
- a valueepsilon
- gap between value as upper bound and as lower bound (to simulate strictness)leftFirst
- select left range firstpublic void free()
Decision
Copyright © 2018. All rights reserved.