public class RealStrategy extends AbstractStrategy<RealVar>
RealVar.
It defines how a variable is selected to be part of the next decision, and which value from its domain is selected too.
Then, the decision will be var ≤ {value}.
vars| Constructor and Description |
|---|
RealStrategy(RealVar[] scope,
VariableSelector<RealVar> varselector,
RealValueSelector valueIterator,
double epsilon,
boolean leftFirst)
Create a real strategy which generates decision over real variables.
|
| Modifier and Type | Method and Description |
|---|---|
Decision<RealVar> |
computeDecision(RealVar variable)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
Decision |
getDecision()
Provides access to the current decision in the strategy.
|
boolean |
init()
Prepare
this to be used in a search loop
The initialization can detect inconsistency, in that case, it returns false |
getVariables, makeIntDecision, toStringpublic RealStrategy(RealVar[] scope, VariableSelector<RealVar> varselector, RealValueSelector valueIterator, double epsilon, boolean leftFirst)
A real decision is like:
scope - variables to be managed with this strategyvarselector - how to select the next variable to branch onvalueIterator - on to select the valueepsilon - gap value for refutationleftFirst - select left range firstpublic boolean init()
AbstractStrategythis to be used in a search loop
The initialization can detect inconsistency, in that case, it returns falseinit in class AbstractStrategy<RealVar>public Decision<RealVar> computeDecision(RealVar variable)
AbstractStrategycomputeDecision in class AbstractStrategy<RealVar>variable - a variablepublic Decision getDecision()
AbstractStrategynull.getDecision in class AbstractStrategy<RealVar>Copyright © 2018. All rights reserved.