Class ModelCache


  • public class ModelCache
    extends java.lang.Object
    Implements a complete cache for model elements: expressions and
    constraints. Caching is based on the signatures of the elements, as
    well as their types. This class is used internally to avoid creating
    duplicate objects.
    • Field Detail

      • swigCMemOwn

        protected transient boolean swigCMemOwn
      • VOID_FALSE_CONSTRAINT

        public static final int VOID_FALSE_CONSTRAINT
      • VOID_TRUE_CONSTRAINT

        public static final int VOID_TRUE_CONSTRAINT
      • VOID_CONSTRAINT_MAX

        public static final int VOID_CONSTRAINT_MAX
      • VAR_CONSTANT_EQUALITY

        public static final int VAR_CONSTANT_EQUALITY
      • VAR_CONSTANT_GREATER_OR_EQUAL

        public static final int VAR_CONSTANT_GREATER_OR_EQUAL
      • VAR_CONSTANT_LESS_OR_EQUAL

        public static final int VAR_CONSTANT_LESS_OR_EQUAL
      • VAR_CONSTANT_NON_EQUALITY

        public static final int VAR_CONSTANT_NON_EQUALITY
      • VAR_CONSTANT_CONSTRAINT_MAX

        public static final int VAR_CONSTANT_CONSTRAINT_MAX
      • VAR_CONSTANT_CONSTANT_BETWEEN

        public static final int VAR_CONSTANT_CONSTANT_BETWEEN
      • VAR_CONSTANT_CONSTANT_CONSTRAINT_MAX

        public static final int VAR_CONSTANT_CONSTANT_CONSTRAINT_MAX
      • EXPR_EXPR_EQUALITY

        public static final int EXPR_EXPR_EQUALITY
      • EXPR_EXPR_GREATER

        public static final int EXPR_EXPR_GREATER
      • EXPR_EXPR_GREATER_OR_EQUAL

        public static final int EXPR_EXPR_GREATER_OR_EQUAL
      • EXPR_EXPR_LESS

        public static final int EXPR_EXPR_LESS
      • EXPR_EXPR_LESS_OR_EQUAL

        public static final int EXPR_EXPR_LESS_OR_EQUAL
      • EXPR_EXPR_NON_EQUALITY

        public static final int EXPR_EXPR_NON_EQUALITY
      • EXPR_EXPR_CONSTRAINT_MAX

        public static final int EXPR_EXPR_CONSTRAINT_MAX
      • EXPR_OPPOSITE

        public static final int EXPR_OPPOSITE
      • EXPR_ABS

        public static final int EXPR_ABS
      • EXPR_SQUARE

        public static final int EXPR_SQUARE
      • EXPR_EXPRESSION_MAX

        public static final int EXPR_EXPRESSION_MAX
      • EXPR_EXPR_DIFFERENCE

        public static final int EXPR_EXPR_DIFFERENCE
      • EXPR_EXPR_PROD

        public static final int EXPR_EXPR_PROD
      • EXPR_EXPR_DIV

        public static final int EXPR_EXPR_DIV
      • EXPR_EXPR_MAX

        public static final int EXPR_EXPR_MAX
      • EXPR_EXPR_MIN

        public static final int EXPR_EXPR_MIN
      • EXPR_EXPR_SUM

        public static final int EXPR_EXPR_SUM
      • EXPR_EXPR_IS_LESS

        public static final int EXPR_EXPR_IS_LESS
      • EXPR_EXPR_IS_LESS_OR_EQUAL

        public static final int EXPR_EXPR_IS_LESS_OR_EQUAL
      • EXPR_EXPR_IS_EQUAL

        public static final int EXPR_EXPR_IS_EQUAL
      • EXPR_EXPR_IS_NOT_EQUAL

        public static final int EXPR_EXPR_IS_NOT_EQUAL
      • EXPR_EXPR_EXPRESSION_MAX

        public static final int EXPR_EXPR_EXPRESSION_MAX
      • EXPR_EXPR_CONSTANT_CONDITIONAL

        public static final int EXPR_EXPR_CONSTANT_CONDITIONAL
      • EXPR_EXPR_CONSTANT_EXPRESSION_MAX

        public static final int EXPR_EXPR_CONSTANT_EXPRESSION_MAX
      • EXPR_CONSTANT_DIFFERENCE

        public static final int EXPR_CONSTANT_DIFFERENCE
      • EXPR_CONSTANT_DIVIDE

        public static final int EXPR_CONSTANT_DIVIDE
      • EXPR_CONSTANT_PROD

        public static final int EXPR_CONSTANT_PROD
      • EXPR_CONSTANT_MAX

        public static final int EXPR_CONSTANT_MAX
      • EXPR_CONSTANT_MIN

        public static final int EXPR_CONSTANT_MIN
      • EXPR_CONSTANT_SUM

        public static final int EXPR_CONSTANT_SUM
      • EXPR_CONSTANT_IS_EQUAL

        public static final int EXPR_CONSTANT_IS_EQUAL
      • EXPR_CONSTANT_IS_NOT_EQUAL

        public static final int EXPR_CONSTANT_IS_NOT_EQUAL
      • EXPR_CONSTANT_IS_GREATER_OR_EQUAL

        public static final int EXPR_CONSTANT_IS_GREATER_OR_EQUAL
      • EXPR_CONSTANT_IS_LESS_OR_EQUAL

        public static final int EXPR_CONSTANT_IS_LESS_OR_EQUAL
      • EXPR_CONSTANT_EXPRESSION_MAX

        public static final int EXPR_CONSTANT_EXPRESSION_MAX
      • VAR_CONSTANT_CONSTANT_SEMI_CONTINUOUS

        public static final int VAR_CONSTANT_CONSTANT_SEMI_CONTINUOUS
      • VAR_CONSTANT_CONSTANT_EXPRESSION_MAX

        public static final int VAR_CONSTANT_CONSTANT_EXPRESSION_MAX
      • VAR_CONSTANT_ARRAY_ELEMENT

        public static final int VAR_CONSTANT_ARRAY_ELEMENT
      • VAR_CONSTANT_ARRAY_EXPRESSION_MAX

        public static final int VAR_CONSTANT_ARRAY_EXPRESSION_MAX
      • VAR_ARRAY_CONSTANT_ARRAY_SCAL_PROD

        public static final int VAR_ARRAY_CONSTANT_ARRAY_SCAL_PROD
      • VAR_ARRAY_CONSTANT_ARRAY_EXPRESSION_MAX

        public static final int VAR_ARRAY_CONSTANT_ARRAY_EXPRESSION_MAX
      • VAR_ARRAY_MAX

        public static final int VAR_ARRAY_MAX
      • VAR_ARRAY_MIN

        public static final int VAR_ARRAY_MIN
      • VAR_ARRAY_SUM

        public static final int VAR_ARRAY_SUM
      • VAR_ARRAY_EXPRESSION_MAX

        public static final int VAR_ARRAY_EXPRESSION_MAX
      • VAR_ARRAY_CONSTANT_INDEX

        public static final int VAR_ARRAY_CONSTANT_INDEX
      • VAR_ARRAY_CONSTANT_EXPRESSION_MAX

        public static final int VAR_ARRAY_CONSTANT_EXPRESSION_MAX
    • Constructor Detail

      • ModelCache

        protected ModelCache​(long cPtr,
                             boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        protected static long getCPtr​(ModelCache obj)
      • swigRelease

        protected static long swigRelease​(ModelCache obj)
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • delete

        public void delete()
      • clear

        public void clear()
      • findVoidConstraint

        public Constraint findVoidConstraint​(int type)
        Void constraints.
      • insertVoidConstraint

        public void insertVoidConstraint​(Constraint ct,
                                         int type)
      • findVarConstantConstraint

        public Constraint findVarConstantConstraint​(IntVar var,
                                                    long value,
                                                    int type)
        Var Constant Constraints.
      • insertVarConstantConstraint

        public void insertVarConstantConstraint​(Constraint ct,
                                                IntVar var,
                                                long value,
                                                int type)
      • findVarConstantConstantConstraint

        public Constraint findVarConstantConstantConstraint​(IntVar var,
                                                            long value1,
                                                            long value2,
                                                            int type)
        Var Constant Constant Constraints.
      • insertVarConstantConstantConstraint

        public void insertVarConstantConstantConstraint​(Constraint ct,
                                                        IntVar var,
                                                        long value1,
                                                        long value2,
                                                        int type)
      • findExprExprConstraint

        public Constraint findExprExprConstraint​(IntExpr expr1,
                                                 IntExpr expr2,
                                                 int type)
        Expr Expr Constraints.
      • insertExprExprConstraint

        public void insertExprExprConstraint​(Constraint ct,
                                             IntExpr expr1,
                                             IntExpr expr2,
                                             int type)
      • findExprExpression

        public IntExpr findExprExpression​(IntExpr expr,
                                          int type)
        Expr Expressions.
      • insertExprExpression

        public void insertExprExpression​(IntExpr expression,
                                         IntExpr expr,
                                         int type)
      • findExprConstantExpression

        public IntExpr findExprConstantExpression​(IntExpr expr,
                                                  long value,
                                                  int type)
        Expr Constant Expressions.
      • insertExprConstantExpression

        public void insertExprConstantExpression​(IntExpr expression,
                                                 IntExpr var,
                                                 long value,
                                                 int type)
      • findExprExprExpression

        public IntExpr findExprExprExpression​(IntExpr var1,
                                              IntExpr var2,
                                              int type)
        Expr Expr Expressions.
      • insertExprExprExpression

        public void insertExprExprExpression​(IntExpr expression,
                                             IntExpr var1,
                                             IntExpr var2,
                                             int type)
      • findExprExprConstantExpression

        public IntExpr findExprExprConstantExpression​(IntExpr var1,
                                                      IntExpr var2,
                                                      long constant,
                                                      int type)
        Expr Expr Constant Expressions.
      • insertExprExprConstantExpression

        public void insertExprExprConstantExpression​(IntExpr expression,
                                                     IntExpr var1,
                                                     IntExpr var2,
                                                     long constant,
                                                     int type)
      • findVarConstantConstantExpression

        public IntExpr findVarConstantConstantExpression​(IntVar var,
                                                         long value1,
                                                         long value2,
                                                         int type)
        Var Constant Constant Expressions.
      • insertVarConstantConstantExpression

        public void insertVarConstantConstantExpression​(IntExpr expression,
                                                        IntVar var,
                                                        long value1,
                                                        long value2,
                                                        int type)
      • findVarConstantArrayExpression

        public IntExpr findVarConstantArrayExpression​(IntVar var,
                                                      long[] values,
                                                      int type)
        Var Constant Array Expressions.
      • insertVarConstantArrayExpression

        public void insertVarConstantArrayExpression​(IntExpr expression,
                                                     IntVar var,
                                                     long[] values,
                                                     int type)
      • findVarArrayExpression

        public IntExpr findVarArrayExpression​(IntVar[] vars,
                                              int type)
        Var Array Expressions.
      • insertVarArrayExpression

        public void insertVarArrayExpression​(IntExpr expression,
                                             IntVar[] vars,
                                             int type)
      • findVarArrayConstantArrayExpression

        public IntExpr findVarArrayConstantArrayExpression​(IntVar[] vars,
                                                           long[] values,
                                                           int type)
        Var Array Constant Array Expressions.
      • insertVarArrayConstantArrayExpression

        public void insertVarArrayConstantArrayExpression​(IntExpr expression,
                                                          IntVar[] var,
                                                          long[] values,
                                                          int type)
      • findVarArrayConstantExpression

        public IntExpr findVarArrayConstantExpression​(IntVar[] vars,
                                                      long value,
                                                      int type)
        Var Array Constant Expressions.
      • insertVarArrayConstantExpression

        public void insertVarArrayConstantExpression​(IntExpr expression,
                                                     IntVar[] var,
                                                     long value,
                                                     int type)
      • solver

        public Solver solver()