Package solver.constraints.nary.channeling

Examples of solver.constraints.nary.channeling.PropEnumDomainChanneling


     * @param OFFSET 0 by default but typically 1 if used within MiniZinc
     *               (which counts from 1 to n instead of from 0 to n-1)
     */
    public static Constraint boolean_channeling(BoolVar[] BVARS, IntVar VAR, int OFFSET) {
        if (VAR.hasEnumeratedDomain()) {
            return new Constraint("DomainChanneling", new PropEnumDomainChanneling(BVARS, VAR, OFFSET));
        } else {
            IntVar enumV = VF.enumerated(VAR.getName() + "_enumImage", VAR.getLB(), VAR.getUB(), VAR.getSolver());
            return new Constraint("BoolChanneling",
                    new PropEnumDomainChanneling(BVARS, enumV, OFFSET),
                    new PropEqualX_Y(VAR, enumV)
            );
        }
    }
View Full Code Here

TOP

Related Classes of solver.constraints.nary.channeling.PropEnumDomainChanneling

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.