Search in sources :

Example 1 with InputOrder

use of org.chocosolver.solver.search.strategy.selectors.variables.InputOrder in project scheduler by btrplace.

the class VectorPackingTest method testBig.

@Test
public void testBig() {
    Context ctx = new Context();
    int nBins = 100;
    int nItems = nBins * 10;
    int[] capa = new int[] { 16, 32 };
    int[] height = new int[] { 1, 1 };
    ctx.modelPack(nBins, capa, nItems, height);
    ctx.s.getSolver().setSearch(Search.intVarSearch(new InputOrder<>(ctx.s), new IntDomainMin(), ctx.bins));
    ctx.testPack(true, "failed with " + Arrays.toString(height));
}
Also used : InputOrder(org.chocosolver.solver.search.strategy.selectors.variables.InputOrder) IntDomainMin(org.chocosolver.solver.search.strategy.selectors.values.IntDomainMin) Constraint(org.chocosolver.solver.constraints.Constraint) Test(org.testng.annotations.Test)

Aggregations

Constraint (org.chocosolver.solver.constraints.Constraint)1 IntDomainMin (org.chocosolver.solver.search.strategy.selectors.values.IntDomainMin)1 InputOrder (org.chocosolver.solver.search.strategy.selectors.variables.InputOrder)1 Test (org.testng.annotations.Test)1