Search in sources :

Example 1 with SetDomainMin

use of org.chocosolver.solver.search.strategy.selectors.values.SetDomainMin in project scheduler by btrplace.

the class DefaultReconfigurationProblem method defaultHeuristic.

/**
 * A naive heuristic to be sure every variables will be instantiated.
 */
private void defaultHeuristic() {
    IntStrategy intStrat = Search.intVarSearch(new FirstFail(csp), new IntDomainMin(), csp.retrieveIntVars(true));
    SetStrategy setStrat = new SetStrategy(csp.retrieveSetVars(), new InputOrder<>(csp), new SetDomainMin(), true);
    RealStrategy realStrat = new RealStrategy(csp.retrieveRealVars(), new Occurrence<>(), new RealDomainMiddle());
    solver.setSearch(new StrategiesSequencer(intStrat, realStrat, setStrat));
}
Also used : IntStrategy(org.chocosolver.solver.search.strategy.strategy.IntStrategy) IntDomainMin(org.chocosolver.solver.search.strategy.selectors.values.IntDomainMin) FirstFail(org.chocosolver.solver.search.strategy.selectors.variables.FirstFail) RealDomainMiddle(org.chocosolver.solver.search.strategy.selectors.values.RealDomainMiddle) StrategiesSequencer(org.chocosolver.solver.search.strategy.strategy.StrategiesSequencer) SetStrategy(org.chocosolver.solver.search.strategy.strategy.SetStrategy) SetDomainMin(org.chocosolver.solver.search.strategy.selectors.values.SetDomainMin) RealStrategy(org.chocosolver.solver.search.strategy.strategy.RealStrategy)

Aggregations

IntDomainMin (org.chocosolver.solver.search.strategy.selectors.values.IntDomainMin)1 RealDomainMiddle (org.chocosolver.solver.search.strategy.selectors.values.RealDomainMiddle)1 SetDomainMin (org.chocosolver.solver.search.strategy.selectors.values.SetDomainMin)1 FirstFail (org.chocosolver.solver.search.strategy.selectors.variables.FirstFail)1 IntStrategy (org.chocosolver.solver.search.strategy.strategy.IntStrategy)1 RealStrategy (org.chocosolver.solver.search.strategy.strategy.RealStrategy)1 SetStrategy (org.chocosolver.solver.search.strategy.strategy.SetStrategy)1 StrategiesSequencer (org.chocosolver.solver.search.strategy.strategy.StrategiesSequencer)1