Package solver.constraints.nary

Examples of solver.constraints.nary.PropKnapsack


    public static Constraint knapsack(IntVar[] OCCURRENCES, IntVar TOTAL_WEIGHT, IntVar TOTAL_ENERGY,
                                      int[] WEIGHT, int[] ENERGY) {
        return new Constraint("Knapsack", ArrayUtils.append(
                scalar(OCCURRENCES, WEIGHT, TOTAL_WEIGHT).propagators,
                scalar(OCCURRENCES, ENERGY, TOTAL_ENERGY).propagators,
                new Propagator[]{new PropKnapsack(OCCURRENCES, TOTAL_WEIGHT, TOTAL_ENERGY, WEIGHT, ENERGY)}
        ));
    }
View Full Code Here

TOP

Related Classes of solver.constraints.nary.PropKnapsack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.