public class Search extends Object
Constructor and Description |
---|
Search() |
Modifier and Type | Method and Description |
---|---|
static AbstractStrategy<IntVar> |
activityBasedSearch(IntVar... vars)
Create an Activity based search strategy.
|
static AbstractStrategy<IntVar> |
bestBound(AbstractStrategy formerSearch)
Search heuristic combined with a constraint performing strong consistency on the next decision variable
and branching on the value with the best objective bound (for optimization) and branches on the lower bound for SAT problems.
|
static AbstractStrategy |
conflictOrderingSearch(AbstractStrategy formerSearch)
Use the conflict ordering search as a pluggin to improve a former search heuristic
Should be set after specifying a search strategy.
|
static AbstractStrategy |
defaultSearch(Model model)
Creates a default search strategy for the given model.
|
static AbstractStrategy<IntVar> |
domOverWDegSearch(IntVar... vars)
Assignment strategy which selects a variable according to
DomOverWDeg and assign it to its lower bound |
static AbstractStrategy |
greedySearch(AbstractStrategy search)
Make the input search strategy greedy, that is, decisions can be applied but not refuted.
|
static IntStrategy |
inputOrderLBSearch(IntVar... vars)
Assigns the first non-instantiated variable to its lower bound.
|
static IntStrategy |
inputOrderUBSearch(IntVar... vars)
Assigns the first non-instantiated variable to its upper bound.
|
static AbstractStrategy<IntVar> |
intVarSearch(IntVar... vars)
Builds a default search heuristics of integer variables
Relies on
domOverWDegSearch(IntVar...) |
static IntStrategy |
intVarSearch(VariableSelector<IntVar> varSelector,
IntValueSelector valSelector,
DecisionOperator<IntVar> decisionOperator,
IntVar... vars)
Builds your own search strategy based on binary decisions.
|
static IntStrategy |
intVarSearch(VariableSelector<IntVar> varSelector,
IntValueSelector valSelector,
IntVar... vars)
Builds your own assignment strategy based on binary decisions.
|
static AbstractStrategy |
lastConflict(AbstractStrategy formerSearch)
Use the last conflict heuristic as a pluggin to improve a former search heuristic
Should be set after specifying a search strategy.
|
static AbstractStrategy |
lastConflict(AbstractStrategy formerSearch,
int k)
Use the last conflict heuristic as a pluggin to improve a former search heuristic
Should be set after specifying a search strategy.
|
static IntStrategy |
minDomLBSearch(IntVar... vars)
Assigns the non-instantiated variable of smallest domain size to its lower bound.
|
static IntStrategy |
minDomUBSearch(IntVar... vars)
Assigns the non-instantiated variable of smallest domain size to its upper bound.
|
static IntStrategy |
randomSearch(IntVar[] vars,
long seed)
Randomly selects a variable and assigns it to a value randomly taken in
- the domain in case the variable has an enumerated domain
- {LB,UB} (one of the two bounds) in case the domain is bounded
|
static RealStrategy |
realVarSearch(RealVar... reals)
strategy to branch on real variables by choosing sequentially the next variable domain
to split in two, wrt the middle value
|
static RealStrategy |
realVarSearch(VariableSelector<RealVar> varS,
RealValueSelector valS,
RealVar... rvars)
Generic strategy to branch on real variables, based on domain splitting
|
static AbstractStrategy |
sequencer(AbstractStrategy... searches) |
static SetStrategy |
setVarSearch(SetVar... sets)
strategy to branch on sets by choosing the first unfixed variable and forcing its first unfixed value
|
static SetStrategy |
setVarSearch(VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst,
SetVar... sets)
Generic strategy to branch on set variables
|
public static AbstractStrategy lastConflict(AbstractStrategy formerSearch)
public static AbstractStrategy<IntVar> bestBound(AbstractStrategy formerSearch)
formerSearch
- default search to branch on variables (defines the variable selector and the value selector when this does not hold)public static AbstractStrategy lastConflict(AbstractStrategy formerSearch, int k)
k
- the maximum number of conflicts to storepublic static AbstractStrategy conflictOrderingSearch(AbstractStrategy formerSearch)
public static AbstractStrategy greedySearch(AbstractStrategy search)
search
- a search heuristic building branching decisionspublic static AbstractStrategy sequencer(AbstractStrategy... searches)
public static SetStrategy setVarSearch(VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst, SetVar... sets)
varS
- variable selection strategyvalS
- integer selection strategyenforceFirst
- branching order true = enforce first; false = remove firstsets
- SetVar array to branch onpublic static SetStrategy setVarSearch(SetVar... sets)
sets
- variables to branch onpublic static RealStrategy realVarSearch(VariableSelector<RealVar> varS, RealValueSelector valS, RealVar... rvars)
varS
- variable selection strategyvalS
- strategy to select where to split domainsrvars
- RealVar array to branch onpublic static RealStrategy realVarSearch(RealVar... reals)
reals
- variables to branch onpublic static IntStrategy intVarSearch(VariableSelector<IntVar> varSelector, IntValueSelector valSelector, DecisionOperator<IntVar> decisionOperator, IntVar... vars)
varSelector
- defines how to select a variable to branch on.valSelector
- defines how to select a value in the domain of the selected variabledecisionOperator
- defines how to modify the domain of the selected variable with the selected valuevars
- variables to branch onpublic static IntStrategy intVarSearch(VariableSelector<IntVar> varSelector, IntValueSelector valSelector, IntVar... vars)
varSelector
- defines how to select a variable to branch on.valSelector
- defines how to select a value in the domain of the selected variablevars
- variables to branch onpublic static AbstractStrategy<IntVar> intVarSearch(IntVar... vars)
domOverWDegSearch(IntVar...)
vars
- variables to branch onpublic static AbstractStrategy<IntVar> domOverWDegSearch(IntVar... vars)
DomOverWDeg
and assign it to its lower boundvars
- list of variablespublic static AbstractStrategy<IntVar> activityBasedSearch(IntVar... vars)
"Activity-Based Search for Black-Box Constraint Propagramming Solver",
Laurent Michel and Pascal Van Hentenryck, CPAIOR12.
Uses public static parameters (GAMMA=0.999d, DELTA=0.2d, ALPHA=8, RESTART=1.1d, FORCE_SAMPLING=1)
vars
- collection of variablespublic static IntStrategy randomSearch(IntVar[] vars, long seed)
vars
- list of variablesseed
- a seed for randompublic static IntStrategy inputOrderLBSearch(IntVar... vars)
vars
- list of variablespublic static IntStrategy inputOrderUBSearch(IntVar... vars)
vars
- list of variablespublic static IntStrategy minDomLBSearch(IntVar... vars)
vars
- list of variablespublic static IntStrategy minDomUBSearch(IntVar... vars)
vars
- list of variablespublic static AbstractStrategy defaultSearch(Model model)
model
- a model requiring a default search strategyCopyright © 2017. All rights reserved.