public class ObjectiveStrategy extends AbstractStrategy<IntVar>
vars
Constructor and Description |
---|
ObjectiveStrategy(IntVar objective,
int[] coefs,
OptimizationPolicy policy)
Defines a parametrized dichotomic branching over the objective variable
BEWARE: only activated after a first solution
|
ObjectiveStrategy(IntVar objective,
OptimizationPolicy policy)
Defines a branching strategy over the objective variable
BEWARE: only activated after a first solution
|
Modifier and Type | Method and Description |
---|---|
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 |
computeDecision, getVariables, makeIntDecision, toString
public ObjectiveStrategy(IntVar objective, OptimizationPolicy policy)
objective
- variablepolicy
- BOTTOM_UP, TOP_TOWN or DICHOTOMICpublic ObjectiveStrategy(IntVar objective, int[] coefs, OptimizationPolicy policy)
objective
- variablecoefs
- [a,b] defines how to split the domain of the objective variable
[1,1] will halve its domain
[1,2] will take a value closer to the upper bound than the lower boundpolicy
- should be DICHOTOMICpublic boolean init()
AbstractStrategy
this
to be used in a search loop
The initialization can detect inconsistency, in that case, it returns falseinit
in class AbstractStrategy<IntVar>
public Decision getDecision()
AbstractStrategy
null
.getDecision
in class AbstractStrategy<IntVar>
Copyright © 2018. All rights reserved.