choco
Class AbstractModel

java.lang.Object
  extended by choco.AbstractModel
All Implemented Interfaces:
BoolModeler, IntModeler
Direct Known Subclasses:
AbstractProblem

public abstract class AbstractModel
extends java.lang.Object
implements IntModeler, BoolModeler


Field Summary
protected  PartiallyStoredVector constraints
          All the constraints of the problem.
protected  boolean doMaximize
          Maximization / Minimization problem
 Constraint FALSE
          A constant denoting the false constraint (never satisfied)
protected  java.util.ArrayList floatVars
          All the float vars in the problem.
protected  java.util.ArrayList intVars
          All the search intVars in the problem.
protected  int nbConstraint
          The number of constraints for the current problem.
protected  IntVar objective
          The variable modelling the objective function
protected  java.util.ArrayList setVars
          All the set intVars in the problem.
 Constraint TRUE
          A constant denoting the true constraint (always satisfied)
 
Constructor Summary
AbstractModel()
           
 
Method Summary
 Constraint allDifferent(IntVar[] vars)
          All different constraints with a global filtering : v1 !
 Constraint allDifferent(IntVar[] vars, boolean global)
          All different constraints : v1 !
 Constraint and(Constraint[] constList)
           
 Constraint and(Constraint c0, Constraint c1)
          Creates a conjunction from two constraints
 Constraint and(Constraint c0, Constraint c1, Constraint c2)
           
 Constraint and(Constraint c0, Constraint c1, Constraint c2, Constraint c3)
           
 RealIntervalConstant around(double d)
          Arounds a double d to [d - epsilon, d + epilon].
 Constraint atleast(Constraint[] constList, int nbTrueConstraints)
           
 Constraint atmost(Constraint[] constList, int nbTrueConstraints)
           
 Constraint boolChanneling(IntVar b, IntVar x, int j)
          State a simple channeling bewteen a boolean variable and an interger variable Ensures for that b = 1 iff x = j
 Constraint card(Constraint[] constList, IntVar nbTrueConstraints)
           
 RealExp cos(RealExp exp)
          Cosinus of an expression.
static int countNonNullCoeffs(int[] lcoeffs)
           
protected abstract  Constraint createAC2001BinConstraint(IntVar v1, IntVar v2, BinRelation relation)
           
protected abstract  Constraint createAC3BinConstraint(IntVar v1, IntVar v2, BinRelation relation)
           
protected abstract  Constraint createAC4BinConstraint(IntVar v1, IntVar v2, BinRelation relation)
           
protected abstract  Constraint createAllDifferent(IntVar[] vars)
           
protected abstract  Constraint createBinConjunction(Constraint c0, Constraint c1)
           
protected abstract  Constraint createBinDisjunction(Constraint c0, Constraint c1)
           
protected abstract  Constraint createBoolChanneling(IntVar b, IntVar x, int j)
           
protected abstract  Constraint createBoundAllDiff(IntVar[] vars, boolean global)
           
protected abstract  Constraint createCardinality(Constraint[] constList, IntVar cardVar, boolean b, boolean b1)
           
protected abstract  Constraint createCspLargeConstraint(IntVar[] vs, LargeRelation relation)
           
protected abstract  Constraint createCumulative(IntVar[] sts, IntVar[] ends, IntVar[] durations, int[] h, int capa)
           
protected abstract  Constraint createDisjoint(SetVar sv1, SetVar sv2)
           
protected abstract  Constraint createEqualXC(IntVar v0, int c)
           
protected abstract  Constraint createEqualXYC(IntVar intVar, IntVar intVar1, int i)
           
protected abstract  Constraint createEquation(RealVar[] tmpVars, RealExp exp, RealIntervalConstant cst)
           
protected abstract  Constraint createEquiv(Constraint c0, Constraint c1)
           
protected abstract  Constraint createGlobalCardinality(IntVar[] vars, int min, int max, int[] low, int[] up)
           
protected abstract  Constraint createGreaterOrEqualXC(IntVar v0, int c)
           
protected abstract  Constraint createGreaterOrEqualXYC(IntVar intVar, IntVar intVar1, int i)
           
protected abstract  Constraint createGuard(Constraint c0, Constraint c1)
           
protected abstract  Constraint createIntLinComb(IntVar[] sortedVars, int[] sortedCoeffs, int nbPositiveCoeffs, int c, int linOperator)
           
protected abstract  IntDomainVar createIntVar(java.lang.String name, int[] sortedValues)
           
protected abstract  IntDomainVar createIntVar(java.lang.String name, int domainType, int min, int max)
           
protected abstract  Constraint createInverseChanneling(IntVar[] x, IntVar[] y)
           
protected abstract  Constraint createLargeConjunction(Constraint[] alternatives)
           
protected abstract  Constraint createLargeDisjunction(Constraint[] alternatives)
           
protected abstract  Constraint createLessOrEqualXC(IntVar v0, int c)
           
protected abstract  Constraint createLex(IntVar[] v1, IntVar[] v2, boolean strict)
           
protected abstract  Constraint createMemberX(SetVar sv1, int val)
           
protected abstract  Constraint createMemberXY(SetVar sv1, IntVar var)
           
protected abstract  Constraint createNotEqualXC(IntVar v0, int c)
           
protected abstract  Constraint createNotEqualXYC(IntVar variable, IntVar variable1, int i)
           
protected abstract  Constraint createNotMemberX(SetVar sv1, int val)
           
protected abstract  Constraint createNotMemberXY(SetVar sv1, IntVar var)
           
protected abstract  Constraint createOccurrence(IntVar[] lvars, int occval, boolean onInf, boolean onSup)
           
protected abstract  RealExp createRealCos(RealExp exp)
           
protected abstract  RealExp createRealIntegerPower(RealExp exp, int power)
           
protected abstract  RealIntervalConstant createRealIntervalConstant(double a, double b)
           
protected abstract  RealExp createRealMinus(RealExp exp1, RealExp exp2)
           
protected abstract  RealExp createRealMult(RealExp exp1, RealExp exp2)
           
protected abstract  RealExp createRealPlus(RealExp exp1, RealExp exp2)
           
protected abstract  RealExp createRealSin(RealExp exp)
           
protected abstract  RealVar createRealVal(java.lang.String name, double min, double max)
           
protected abstract  Constraint createSetCard(SetVar sv, IntVar v, boolean b1, boolean b2)
           
protected abstract  Constraint createSetIntersection(SetVar sv1, SetVar sv2, SetVar inter)
           
protected abstract  SetVar createSetVar(java.lang.String name, int a, int b)
           
protected abstract  Constraint createSubscript(IntVar index, int[] values, IntVar val, int offset)
           
protected abstract  Constraint createSubscript(IntVar index, IntVar[] varArray, IntVar val, int offset)
           
protected abstract  Constraint createTimesXYZ(IntVar x, IntVar y, IntVar z)
           
 RealIntervalConstant cst(double d)
          Makes a constant interval from a double d ([d,d]).
 RealIntervalConstant cst(double a, double b)
          Makes a constant interval between two doubles [a,b].
 Constraint cumulative(IntVar[] starts, IntVar[] ends, IntVar[] durations, int[] heights, int Capa)
          Cumulative : Given a set of tasks defined by their starting dates, ending dates, durations and consumptions/heights, the cumulative ensures that at any time t, the sum of the heights of the tasks which are executed at time t does not exceed a given limit C (the capacity of the ressource).
 Constraint eq(double cst, RealExp exp)
           
 Constraint eq(IntExp x, int c)
          Creates a constraint by stating that a term is equal than a constant
 Constraint eq(IntExp x, IntExp y)
          Creates a constraint by stating that a term is equal than a constant
 Constraint eq(int c, IntExp x)
          Creates a constraint by stating that a term is equal than a constant
 Constraint eq(RealExp exp, double cst)
           
 Constraint eq(RealExp exp1, RealExp exp2)
          Eqality constraint.
 Constraint eqCard(SetVar sv, int val)
           
 Constraint eqCard(SetVar sv, IntVar v)
           
 Constraint feasPairAC(IntVar v1, IntVar v2, java.util.ArrayList mat)
           
 Constraint feasPairAC(IntVar v1, IntVar v2, java.util.ArrayList mat, int ac)
           
 Constraint feasPairAC(IntVar v1, IntVar v2, boolean[][] mat)
           
 Constraint feasPairAC(IntVar v1, IntVar v2, boolean[][] mat, int ac)
           
 Constraint feasTuple(IntVar[] vars, java.util.ArrayList tuples)
           
 Constraint geq(double cst, RealExp exp)
           
 Constraint geq(IntExp x, int c)
          Creates a constraint by stating that a term is greater or equal than a constant
 Constraint geq(IntExp x, IntExp y)
          Creates a constraint by stating that a variable is greater or equal than a constant
 Constraint geq(int c, IntExp x)
          Creates a constraint by stating that a variable is greater or equal than a constant
 Constraint geq(RealExp exp, double cst)
           
 Constraint geq(RealExp exp1, RealExp exp2)
          Superiority constraint.
 Constraint geqCard(SetVar sv, int val)
           
 Constraint geqCard(SetVar sv, IntVar v)
           
 IntVar getIntVar(int i)
          Network management: Retrieve a variable by its index (all integer variables of the problem are numbered in sequence from 0 on)
 int getIntVarIndex(IntVar c)
           
 int getNbIntVars()
          retrieving the total number of variables
 int getNbRealVars()
          Returns the number of variables modelling real numbers.
 int getNbSetVars()
          Returns the number of variables modelling real numbers.
 RealVar getRealVar(int i)
          Returns a real variable.
 SetVar getSetVar(int i)
          Returns a set variable.
 Constraint globalCardinality(IntVar[] vars, int[] low, int[] up)
          Global cardinality : Given an array of variables vars such that their domains are subsets of [1, n], the constraint ensures that the number of occurences of the value i among the variables is between low[i - 1] and up[i - 1].
 Constraint globalCardinality(IntVar[] vars, int min, int max, int[] low, int[] up)
          Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min].
 Constraint gt(IntExp x, int c)
          Creates a constraint by stating that a variable is strictly than a constant
 Constraint gt(IntExp x, IntExp y)
          Creates a constraint by stating that a variable is strictly than a constant
 Constraint gt(int c, IntExp x)
          Creates a constraint by stating that a variable is strictly than a constant
 Constraint ifOnlyIf(Constraint c1, Constraint c2)
          Creates an equivalence from two constraints
 Constraint ifThen(Constraint c1, Constraint c2)
          Creates a lazy implication from two constraints
 Constraint implies(Constraint c1, Constraint c2)
          Creates an implication from two constraints
 Constraint infeasPairAC(IntVar v1, IntVar v2, java.util.ArrayList mat)
           
 Constraint infeasPairAC(IntVar v1, IntVar v2, java.util.ArrayList mat, int ac)
           
 Constraint infeasPairAC(IntVar v1, IntVar v2, boolean[][] mat)
           
 Constraint infeasPairAC(IntVar v1, IntVar v2, boolean[][] mat, int ac)
           
 Constraint infeasTuple(IntVar[] vars, java.util.ArrayList tuples)
           
 Constraint inverseChanneling(IntVar[] x, IntVar[] y)
          State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces x[i] = j <=> y[j] = i
 Constraint leq(double cst, RealExp exp)
           
 Constraint leq(IntExp x, int c)
          Creates a constraint by stating that integer expression is less or equal than a constant
 Constraint leq(IntExp x, IntExp y)
          Creates a constraint by stating that an integer expression is less or equal than another one
 Constraint leq(int c, IntExp x)
          Creates a constraint by stating that a constant is less or equal than an integer expression
 Constraint leq(RealExp exp, double cst)
           
 Constraint leq(RealExp exp1, RealExp exp2)
          Inferority constraint.
 Constraint leqCard(SetVar sv, int val)
           
 Constraint leqCard(SetVar sv, IntVar v)
           
 Constraint lex(IntVar[] v1, IntVar[] v2)
          Enforce a strict lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = .
 Constraint lexeq(IntVar[] v1, IntVar[] v2)
          Enforce a lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = .
 Constraint lt(IntExp x, int c)
          Creates a constraint by stating that integer expression is strictly less than a constant
 Constraint lt(IntExp x, IntExp y)
          Creates a constraint by stating that an integer expression is strictly less than another one
 Constraint lt(int c, IntExp x)
          Creates a constraint by stating that a constant is strictly less than an integer expression
 IntDomainVar makeBoundIntVar(java.lang.String name, int min, int max)
          Creates a new search variable with an interval domain
 IntDomainVar makeBoundIntVar(java.lang.String name, int min, int max, boolean toAdd)
           
 IntDomainVar[] makeBoundIntVarArray(java.lang.String name, int dim, int min, int max)
          Creates a one dimensional array of integer variables
 IntDomainVar[][] makeBoundIntVarArray(java.lang.String name, int dim1, int dim2, int min, int max)
          Creates a one dimensional array of integer variables
 Constraint makeConjunction(Constraint[] branches)
           
 IntVar makeConstantIntVar(int val)
          Creates an unnamed instantiated variable
 IntVar makeConstantIntVar(java.lang.String name, int val)
          Creates an instantiated variable
 Constraint makeDisjunction(Constraint[] alternatives)
           
 IntDomainVar makeEnumIntVar(java.lang.String name, int[] values)
          Creates a new search variable with an enumerated domain
 IntDomainVar makeEnumIntVar(java.lang.String name, int min, int max)
          Creates a new search variable with an enumerated domain
 IntDomainVar[] makeEnumIntVarArray(java.lang.String name, int dim, int min, int max)
          Creates a one dimensional array of integer variables
 IntDomainVar[][] makeEnumIntVarArray(java.lang.String name, int dim1, int dim2, int min, int max)
          Creates a one dimensional array of integer variables
 Constraint makeEquation(RealExp exp, RealIntervalConstant cst)
          Makes an equation from an expression and a constantt interval.
protected  Constraint makeIntLinComb(IntVar[] lvars, int[] lcoeffs, int c, int linOperator)
           
protected  Constraint makeOccurrence(IntVar[] lvars, IntVar occVar, int occval, boolean onInf, boolean onSup)
           
protected  Constraint makePairAC(IntVar v1, IntVar v2, java.util.ArrayList mat, boolean feas, int ac)
           
protected  Constraint makePairAC(IntVar v1, IntVar v2, boolean[][] mat, boolean feas, int ac)
           
 RealVar makeRealVar(double inf, double sup)
          Creates an anonymous real variable.
 RealVar makeRealVar(java.lang.String name)
          Creates an unbounded real variable.
 RealVar makeRealVar(java.lang.String name, double min, double max)
          Creates a real variable.
 SetVar makeSetVar(java.lang.String name, int a, int b)
          Creates a set variable.
 Constraint makeTupleFC(IntVar[] vs, java.util.ArrayList tuples, boolean feas)
           
 Constraint member(int val, SetVar sv1)
           
 Constraint member(IntVar var, SetVar sv1)
           
 Constraint member(SetVar sv1, int val)
           
 Constraint member(SetVar sv1, IntVar var)
           
 IntExp minus(IntExp t, int c)
          Subtracting an search constant from an expression
 IntExp minus(IntExp t1, IntExp t2)
          Subtracting two terms one from another
 IntExp minus(int c, IntExp t)
          Subtracting an expression from an search
 RealExp minus(RealExp exp1, RealExp exp2)
          Substraction of two expressions.
 IntExp mult(int a, IntExp x)
          Creates a simple linear term from one coefficient and one variable
 RealExp mult(RealExp exp1, RealExp exp2)
          Multiplication of two expressions.
 Constraint neq(IntExp x, int c)
          Creates a constraint by stating that a term is not equal than a constant
 Constraint neq(IntExp x, IntExp y)
          Creates a constraint by stating that two term are different
 Constraint neq(int c, IntExp x)
          Creates a constraint by stating that a term is not equal than a constant
 Constraint not(Constraint c)
          Creates the logical opposite of a constraint
 Constraint notMember(int val, SetVar sv1)
           
 Constraint notMember(IntVar var, SetVar sv1)
           
 Constraint notMember(SetVar sv1, int val)
           
 Constraint notMember(SetVar sv1, IntVar var)
           
 Constraint nth(IntVar index, int[] values, IntVar val)
          subscript constraint: accessing an array with a variable index
 Constraint nth(IntVar index, IntVar[] varArray, IntVar val)
          subscript constraint: accessing an array of variables with a variable index
 Constraint occurenceMax(IntVar[] vars, int value, IntVar occurrence)
          Ensures that the upper bound of occurrence is at most equal to the number of occurences size{forall v in vars | v = value} >= occurence
 Constraint occurenceMin(IntVar[] vars, int value, IntVar occurrence)
          Ensures that the lower bound of occurrence is at least equal to the number of occurences size{forall v in vars | v = value} <= occurence
 Constraint occurrence(IntVar[] vars, int value, IntVar occurrence)
          Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables
 Constraint or(Constraint[] constList)
           
 Constraint or(Constraint c0, Constraint c1)
          Creates a disjunction from two constraints
 Constraint or(Constraint c0, Constraint c1, Constraint c2)
           
 Constraint or(Constraint c0, Constraint c1, Constraint c2, Constraint c3)
           
protected  IntExp plus(int[] coeffs1, IntVar[] vars1, int cste1, int[] coeffs2, IntVar[] vars2, int cste2)
          Utility method for constructing a term from two lists of variables, list of coeffcicients and constants
 IntExp plus(IntExp t, int c)
          Adding an search constant to an expression
 IntExp plus(IntExp t1, IntExp t2)
          Adding two terms one to another
 IntExp plus(int c, IntExp t1)
          Adding an search constant to an expression
 RealExp plus(RealExp exp1, RealExp exp2)
          Addition of two expressions.
 RealExp power(RealExp exp, int power)
          Power of an expression.
 Constraint relationPairAC(IntVar v1, IntVar v2, BinRelation binR)
           
 Constraint relationPairAC(IntVar v1, IntVar v2, BinRelation binR, int ac)
           
 Constraint relationTuple(IntVar[] vs, LargeRelation rela)
           
 IntExp scalar(int[] lc, IntVar[] lv)
          Building a term from a scalar product of coefficients and variables
 IntExp scalar(IntVar[] lv, int[] lc)
          Building a term from a scalar product of coefficients and variables
 Constraint setDisjoint(SetVar sv1, SetVar sv2)
           
 Constraint setInter(SetVar sv1, SetVar sv2, SetVar inter)
          Enforce a set to be the intersection of two others.
 void setMaximizationObjective(IntVar obj)
          sets the optimization mode to maximization and sets the objective function
 void setMinimizationObjective(IntVar obj)
          sets the optimization mode to minimization and sets the objective function
 RealExp sin(RealExp exp)
          Sinus of an expression.
 IntExp sum(IntExp[] lv)
          Building a term from a sum of integer expressions
 Constraint times(IntVar x, IntVar y, IntVar z)
          Creates a constraint by stating that X*Y=Z
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

public final Constraint TRUE
A constant denoting the true constraint (always satisfied)


FALSE

public final Constraint FALSE
A constant denoting the false constraint (never satisfied)


constraints

protected PartiallyStoredVector constraints
All the constraints of the problem.


intVars

protected java.util.ArrayList intVars
All the search intVars in the problem.


setVars

protected java.util.ArrayList setVars
All the set intVars in the problem.


floatVars

protected java.util.ArrayList floatVars
All the float vars in the problem.


objective

protected IntVar objective
The variable modelling the objective function


doMaximize

protected boolean doMaximize
Maximization / Minimization problem


nbConstraint

protected int nbConstraint
The number of constraints for the current problem.

Constructor Detail

AbstractModel

public AbstractModel()
Method Detail

makeEnumIntVar

public IntDomainVar makeEnumIntVar(java.lang.String name,
                                   int min,
                                   int max)
Creates a new search variable with an enumerated domain

Specified by:
makeEnumIntVar in interface IntModeler
Parameters:
name - the name of the variable
min - minimal allowed value (included in the domain)
max - maximal allowed value (included in the domain)
Returns:
the variable

makeEnumIntVar

public IntDomainVar makeEnumIntVar(java.lang.String name,
                                   int[] values)
Creates a new search variable with an enumerated domain

Parameters:
name - the name of the variable
values - allowed in the domain (may be unsorted, but not with duplicates !)
Returns:
the variable

makeBoundIntVar

public IntDomainVar makeBoundIntVar(java.lang.String name,
                                    int min,
                                    int max)
Creates a new search variable with an interval domain

Specified by:
makeBoundIntVar in interface IntModeler
Parameters:
name - the name of the variable
min - minimal allowed value (included in the domain)
max - maximal allowed value (included in the domain)
Returns:
the variable

makeBoundIntVar

public IntDomainVar makeBoundIntVar(java.lang.String name,
                                    int min,
                                    int max,
                                    boolean toAdd)

setMinimizationObjective

public final void setMinimizationObjective(IntVar obj)
Description copied from interface: IntModeler
sets the optimization mode to minimization and sets the objective function

Specified by:
setMinimizationObjective in interface IntModeler
Parameters:
obj - the variable to be minimized

setMaximizationObjective

public final void setMaximizationObjective(IntVar obj)
Description copied from interface: IntModeler
sets the optimization mode to maximization and sets the objective function

Specified by:
setMaximizationObjective in interface IntModeler
Parameters:
obj - the variable to be maximized

makeBoundIntVarArray

public IntDomainVar[] makeBoundIntVarArray(java.lang.String name,
                                           int dim,
                                           int min,
                                           int max)
Creates a one dimensional array of integer variables

Specified by:
makeBoundIntVarArray in interface IntModeler
Parameters:
name - the name of the array (a prefix shared by all individual IntVars)
dim - the number of entries
min - the minimal domain value for all variables in the array
max - the maximal domain value for all variables in the array

makeBoundIntVarArray

public IntDomainVar[][] makeBoundIntVarArray(java.lang.String name,
                                             int dim1,
                                             int dim2,
                                             int min,
                                             int max)
Creates a one dimensional array of integer variables

Specified by:
makeBoundIntVarArray in interface IntModeler
Parameters:
name - the name of the array (a prefix shared by all individual IntVars)
dim1 - the number of entries for the first index
dim2 - the number of entries for the second index
min - the minimal domain value for all variables in the array
max - the maximal domain value for all variables in the array

makeEnumIntVarArray

public IntDomainVar[] makeEnumIntVarArray(java.lang.String name,
                                          int dim,
                                          int min,
                                          int max)
Creates a one dimensional array of integer variables

Parameters:
name - the name of the array (a prefix shared by all individual IntVars)
dim - the number of entries
min - the minimal domain value for all variables in the array
max - the maximal domain value for all variables in the array

makeEnumIntVarArray

public IntDomainVar[][] makeEnumIntVarArray(java.lang.String name,
                                            int dim1,
                                            int dim2,
                                            int min,
                                            int max)
Creates a one dimensional array of integer variables

Parameters:
name - the name of the array (a prefix shared by all individual IntVars)
dim1 - the number of entries for the first index
dim2 - the number of entries for the second index
min - the minimal domain value for all variables in the array
max - the maximal domain value for all variables in the array

makeRealVar

public RealVar makeRealVar(java.lang.String name,
                           double min,
                           double max)
Creates a real variable.

Parameters:
name -
min -
max -
Returns:
the new object (RealVar)

makeRealVar

public RealVar makeRealVar(double inf,
                           double sup)
Creates an anonymous real variable.


makeRealVar

public RealVar makeRealVar(java.lang.String name)
Creates an unbounded real variable.


makeSetVar

public SetVar makeSetVar(java.lang.String name,
                         int a,
                         int b)
Creates a set variable.

Parameters:
name -
a - : the first value of the initial enveloppe
b - : the last value of the initial enveloppe
Returns:
the new object (RealVar)

makeConstantIntVar

public IntVar makeConstantIntVar(java.lang.String name,
                                 int val)
Description copied from interface: IntModeler
Creates an instantiated variable

Specified by:
makeConstantIntVar in interface IntModeler
Parameters:
name - the name of the variable
val - the value
Returns:
the variable

makeConstantIntVar

public IntVar makeConstantIntVar(int val)
Description copied from interface: IntModeler
Creates an unnamed instantiated variable

Specified by:
makeConstantIntVar in interface IntModeler
Parameters:
val - the value
Returns:
the variable

mult

public IntExp mult(int a,
                   IntExp x)
Creates a simple linear term from one coefficient and one variable

Specified by:
mult in interface IntModeler
Parameters:
a - the coefficient
x - the variable
Returns:
the term

plus

protected IntExp plus(int[] coeffs1,
                      IntVar[] vars1,
                      int cste1,
                      int[] coeffs2,
                      IntVar[] vars2,
                      int cste2)
Utility method for constructing a term from two lists of variables, list of coeffcicients and constants

Parameters:
coeffs1 - coefficients from the first term
vars1 - variables from the first term
cste1 - constant from the fisrt term
coeffs2 - coefficients from the second term
vars2 - variables from the second term
cste2 - constant from the second term
Returns:
the term (a fresh one)

plus

public IntExp plus(IntExp t1,
                   IntExp t2)
Adding two terms one to another

Specified by:
plus in interface IntModeler
Parameters:
t1 - first term
t2 - second term
Returns:
the term (a fresh one)

plus

public IntExp plus(IntExp t,
                   int c)
Description copied from interface: IntModeler
Adding an search constant to an expression

Specified by:
plus in interface IntModeler
Parameters:
t - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

plus

public final IntExp plus(int c,
                         IntExp t1)
Description copied from interface: IntModeler
Adding an search constant to an expression

Specified by:
plus in interface IntModeler
Parameters:
c - the search constant
t1 - the expression
Returns:
the resulting expression (a fresh one)

minus

public IntExp minus(IntExp t1,
                    IntExp t2)
Subtracting two terms one from another

Specified by:
minus in interface IntModeler
Parameters:
t1 - first term
t2 - second term
Returns:
the term (a fresh one)

minus

public IntExp minus(IntExp t,
                    int c)
Description copied from interface: IntModeler
Subtracting an search constant from an expression

Specified by:
minus in interface IntModeler
Parameters:
t - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

minus

public IntExp minus(int c,
                    IntExp t)
Description copied from interface: IntModeler
Subtracting an expression from an search

Specified by:
minus in interface IntModeler
Parameters:
c - the search constant
t - the expression
Returns:
the resulting expression (a fresh one)

scalar

public IntExp scalar(int[] lc,
                     IntVar[] lv)
Building a term from a scalar product of coefficients and variables

Specified by:
scalar in interface IntModeler
Parameters:
lc - the array of coefficients
lv - the array of variables
Returns:
the term

scalar

public final IntExp scalar(IntVar[] lv,
                           int[] lc)
Building a term from a scalar product of coefficients and variables

Specified by:
scalar in interface IntModeler
Parameters:
lv - the array of variables
lc - the array of coefficients
Returns:
the term

sum

public IntExp sum(IntExp[] lv)
Building a term from a sum of integer expressions

Specified by:
sum in interface IntModeler
Parameters:
lv - the array of integer expressions
Returns:
the term

neq

public Constraint neq(IntExp x,
                      int c)
Creates a constraint by stating that a term is not equal than a constant

Specified by:
neq in interface IntModeler
Parameters:
x - the expression
c - the constant
Returns:
the linear disequality constraint

neq

public final Constraint neq(int c,
                            IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a term is not equal than a constant

Specified by:
neq in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear disequality constraint

neq

public Constraint neq(IntExp x,
                      IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that two term are different

Specified by:
neq in interface IntModeler
Parameters:
x - the first variable
y - the second variale
Returns:
the linear disequality constraint

geq

public Constraint geq(IntExp x,
                      IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that a variable is greater or equal than a constant

Specified by:
geq in interface IntModeler
Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

countNonNullCoeffs

public static int countNonNullCoeffs(int[] lcoeffs)

makeIntLinComb

protected Constraint makeIntLinComb(IntVar[] lvars,
                                    int[] lcoeffs,
                                    int c,
                                    int linOperator)

geq

public Constraint geq(IntExp x,
                      int c)
Creates a constraint by stating that a term is greater or equal than a constant

Specified by:
geq in interface IntModeler
Parameters:
x - the expression
c - the constant
Returns:
the linear inequality constraint

geq

public Constraint geq(int c,
                      IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a variable is greater or equal than a constant

Specified by:
geq in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear equality constraint

gt

public final Constraint gt(IntExp x,
                           IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that a variable is strictly than a constant

Specified by:
gt in interface IntModeler
Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

gt

public final Constraint gt(IntExp x,
                           int c)
Description copied from interface: IntModeler
Creates a constraint by stating that a variable is strictly than a constant

Specified by:
gt in interface IntModeler
Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

gt

public final Constraint gt(int c,
                           IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a variable is strictly than a constant

Specified by:
gt in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear equality constraint

eq

public Constraint eq(IntExp x,
                     IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that a term is equal than a constant

Specified by:
eq in interface IntModeler
Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

eq

public Constraint eq(IntExp x,
                     int c)
Description copied from interface: IntModeler
Creates a constraint by stating that a term is equal than a constant

Specified by:
eq in interface IntModeler
Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

eq

public final Constraint eq(int c,
                           IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a term is equal than a constant

Specified by:
eq in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear equality constraint

leq

public final Constraint leq(IntExp x,
                            int c)
Description copied from interface: IntModeler
Creates a constraint by stating that integer expression is less or equal than a constant

Specified by:
leq in interface IntModeler
Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

leq

public final Constraint leq(int c,
                            IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a constant is less or equal than an integer expression

Specified by:
leq in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear equality constraint

leq

public final Constraint leq(IntExp x,
                            IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that an integer expression is less or equal than another one

Specified by:
leq in interface IntModeler
Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

lt

public final Constraint lt(IntExp x,
                           int c)
Description copied from interface: IntModeler
Creates a constraint by stating that integer expression is strictly less than a constant

Specified by:
lt in interface IntModeler
Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

lt

public final Constraint lt(int c,
                           IntExp x)
Description copied from interface: IntModeler
Creates a constraint by stating that a constant is strictly less than an integer expression

Specified by:
lt in interface IntModeler
Parameters:
c - the search constant
x - the search expression
Returns:
the linear equality constraint

lt

public final Constraint lt(IntExp x,
                           IntExp y)
Description copied from interface: IntModeler
Creates a constraint by stating that an integer expression is strictly less than another one

Specified by:
lt in interface IntModeler
Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

times

public Constraint times(IntVar x,
                        IntVar y,
                        IntVar z)
Description copied from interface: IntModeler
Creates a constraint by stating that X*Y=Z

Specified by:
times in interface IntModeler
Parameters:
x - the first operand of the multiplication
y - the second operand of the multiplication
z - the result of the multiplication
Returns:
the multiplication constraint

makeEquation

public Constraint makeEquation(RealExp exp,
                               RealIntervalConstant cst)
Makes an equation from an expression and a constantt interval. It is used by all methods building constraints. This is useful for subclassing this modeller for another kind of problem (like PaLM).

Parameters:
exp - The expression
cst - The interval this expression should be in

eq

public Constraint eq(RealExp exp1,
                     RealExp exp2)
Eqality constraint.


eq

public Constraint eq(RealExp exp,
                     double cst)

eq

public Constraint eq(double cst,
                     RealExp exp)

leq

public Constraint leq(RealExp exp1,
                      RealExp exp2)
Inferority constraint.


leq

public Constraint leq(RealExp exp,
                      double cst)

leq

public Constraint leq(double cst,
                      RealExp exp)

geq

public Constraint geq(RealExp exp1,
                      RealExp exp2)
Superiority constraint.


geq

public Constraint geq(RealExp exp,
                      double cst)

geq

public Constraint geq(double cst,
                      RealExp exp)

plus

public RealExp plus(RealExp exp1,
                    RealExp exp2)
Addition of two expressions.


minus

public RealExp minus(RealExp exp1,
                     RealExp exp2)
Substraction of two expressions.


mult

public RealExp mult(RealExp exp1,
                    RealExp exp2)
Multiplication of two expressions.


power

public RealExp power(RealExp exp,
                     int power)
Power of an expression.


cos

public RealExp cos(RealExp exp)
Cosinus of an expression.


sin

public RealExp sin(RealExp exp)
Sinus of an expression.


around

public RealIntervalConstant around(double d)
Arounds a double d to [d - epsilon, d + epilon].


cst

public RealIntervalConstant cst(double d)
Makes a constant interval from a double d ([d,d]).


cst

public RealIntervalConstant cst(double a,
                                double b)
Makes a constant interval between two doubles [a,b].


makeDisjunction

public Constraint makeDisjunction(Constraint[] alternatives)

or

public final Constraint or(Constraint[] constList)

or

public final Constraint or(Constraint c0,
                           Constraint c1,
                           Constraint c2)

or

public final Constraint or(Constraint c0,
                           Constraint c1,
                           Constraint c2,
                           Constraint c3)

or

public final Constraint or(Constraint c0,
                           Constraint c1)
Description copied from interface: BoolModeler
Creates a disjunction from two constraints

Specified by:
or in interface BoolModeler
Parameters:
c0 - the first branch
c1 - the second branch
Returns:
the disjunction constraint

makeConjunction

public Constraint makeConjunction(Constraint[] branches)

and

public final Constraint and(Constraint[] constList)

and

public final Constraint and(Constraint c0,
                            Constraint c1,
                            Constraint c2)

and

public final Constraint and(Constraint c0,
                            Constraint c1,
                            Constraint c2,
                            Constraint c3)

and

public final Constraint and(Constraint c0,
                            Constraint c1)
Description copied from interface: BoolModeler
Creates a conjunction from two constraints

Specified by:
and in interface BoolModeler
Parameters:
c0 - the first branch
c1 - the second branch
Returns:
the conjunction constraint

implies

public final Constraint implies(Constraint c1,
                                Constraint c2)
Description copied from interface: BoolModeler
Creates an implication from two constraints

Specified by:
implies in interface BoolModeler
Parameters:
c1 - the condition constraint
c2 - the conclusion constraint
Returns:
the implication constraint (implemented as a disjunction between the conclusion and the opposite of the condition)

ifThen

public Constraint ifThen(Constraint c1,
                         Constraint c2)
Description copied from interface: BoolModeler
Creates a lazy implication from two constraints

Specified by:
ifThen in interface BoolModeler
Parameters:
c1 - the condition constraint
c2 - the conclusion constraint
Returns:
the implication constraint

ifOnlyIf

public Constraint ifOnlyIf(Constraint c1,
                           Constraint c2)
Description copied from interface: BoolModeler
Creates an equivalence from two constraints

Specified by:
ifOnlyIf in interface BoolModeler
Parameters:
c1 - the first branch
c2 - the second branch
Returns:
the equivalence constraint

not

public final Constraint not(Constraint c)
Description copied from interface: BoolModeler
Creates the logical opposite of a constraint

Specified by:
not in interface BoolModeler
Parameters:
c - the constraint to be negated
Returns:
the negation of the constraint

atleast

public Constraint atleast(Constraint[] constList,
                          int nbTrueConstraints)

atmost

public Constraint atmost(Constraint[] constList,
                         int nbTrueConstraints)

card

public Constraint card(Constraint[] constList,
                       IntVar nbTrueConstraints)

makePairAC

protected Constraint makePairAC(IntVar v1,
                                IntVar v2,
                                java.util.ArrayList mat,
                                boolean feas,
                                int ac)

makePairAC

protected Constraint makePairAC(IntVar v1,
                                IntVar v2,
                                boolean[][] mat,
                                boolean feas,
                                int ac)

relationPairAC

public Constraint relationPairAC(IntVar v1,
                                 IntVar v2,
                                 BinRelation binR,
                                 int ac)

makeTupleFC

public Constraint makeTupleFC(IntVar[] vs,
                              java.util.ArrayList tuples,
                              boolean feas)

relationTuple

public Constraint relationTuple(IntVar[] vs,
                                LargeRelation rela)

infeasTuple

public Constraint infeasTuple(IntVar[] vars,
                              java.util.ArrayList tuples)

feasTuple

public Constraint feasTuple(IntVar[] vars,
                            java.util.ArrayList tuples)

relationPairAC

public Constraint relationPairAC(IntVar v1,
                                 IntVar v2,
                                 BinRelation binR)

infeasPairAC

public Constraint infeasPairAC(IntVar v1,
                               IntVar v2,
                               java.util.ArrayList mat)

infeasPairAC

public Constraint infeasPairAC(IntVar v1,
                               IntVar v2,
                               java.util.ArrayList mat,
                               int ac)

feasPairAC

public Constraint feasPairAC(IntVar v1,
                             IntVar v2,
                             java.util.ArrayList mat)

feasPairAC

public Constraint feasPairAC(IntVar v1,
                             IntVar v2,
                             java.util.ArrayList mat,
                             int ac)

infeasPairAC

public Constraint infeasPairAC(IntVar v1,
                               IntVar v2,
                               boolean[][] mat)

infeasPairAC

public Constraint infeasPairAC(IntVar v1,
                               IntVar v2,
                               boolean[][] mat,
                               int ac)

feasPairAC

public Constraint feasPairAC(IntVar v1,
                             IntVar v2,
                             boolean[][] mat)

feasPairAC

public Constraint feasPairAC(IntVar v1,
                             IntVar v2,
                             boolean[][] mat,
                             int ac)

makeOccurrence

protected Constraint makeOccurrence(IntVar[] lvars,
                                    IntVar occVar,
                                    int occval,
                                    boolean onInf,
                                    boolean onSup)

occurrence

public Constraint occurrence(IntVar[] vars,
                             int value,
                             IntVar occurrence)
Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables

Parameters:
vars - List of variables where the value can appear
occurrence - The variable that should contain the occurence number

occurenceMin

public Constraint occurenceMin(IntVar[] vars,
                               int value,
                               IntVar occurrence)
Ensures that the lower bound of occurrence is at least equal to the number of occurences size{forall v in vars | v = value} <= occurence


occurenceMax

public Constraint occurenceMax(IntVar[] vars,
                               int value,
                               IntVar occurrence)
Ensures that the upper bound of occurrence is at most equal to the number of occurences size{forall v in vars | v = value} >= occurence


nth

public Constraint nth(IntVar index,
                      int[] values,
                      IntVar val)
subscript constraint: accessing an array with a variable index


nth

public Constraint nth(IntVar index,
                      IntVar[] varArray,
                      IntVar val)
subscript constraint: accessing an array of variables with a variable index


boolChanneling

public Constraint boolChanneling(IntVar b,
                                 IntVar x,
                                 int j)
State a simple channeling bewteen a boolean variable and an interger variable Ensures for that b = 1 iff x = j

Parameters:
b - : a boolean variable
x - : an integer variable
j - : the value such that b = 1 ssi x = j, and b = 0 otherwise

inverseChanneling

public Constraint inverseChanneling(IntVar[] x,
                                    IntVar[] y)
State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces x[i] = j <=> y[j] = i


allDifferent

public Constraint allDifferent(IntVar[] vars)
All different constraints with a global filtering : v1 != v2, v1 != v3, v2 != v3 ... For each (i,j), v_i != v_j If vars is a table of BoundIntVar a dedicated algorithm is used. In case of EnumIntVar it is the regin alldifferent.


allDifferent

public Constraint allDifferent(IntVar[] vars,
                               boolean global)
All different constraints : v1 != v2, v1 != v3, v2 != v3 ... For each (i,j), v_i != v_j. parameter global specifies if a global filtering algorithm is used for propagation or not.


globalCardinality

public Constraint globalCardinality(IntVar[] vars,
                                    int min,
                                    int max,
                                    int[] low,
                                    int[] up)
Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1.


globalCardinality

public Constraint globalCardinality(IntVar[] vars,
                                    int[] low,
                                    int[] up)
Global cardinality : Given an array of variables vars such that their domains are subsets of [1, n], the constraint ensures that the number of occurences of the value i among the variables is between low[i - 1] and up[i - 1]. Note that the length of low and up should be exactly n.


cumulative

public Constraint cumulative(IntVar[] starts,
                             IntVar[] ends,
                             IntVar[] durations,
                             int[] heights,
                             int Capa)
Cumulative : Given a set of tasks defined by their starting dates, ending dates, durations and consumptions/heights, the cumulative ensures that at any time t, the sum of the heights of the tasks which are executed at time t does not exceed a given limit C (the capacity of the ressource). The notion of task does not exist yet in choco. The cumulative takes therefore as input three arrays of integer variables (of same size n) denoting the starting, ending, and duration of each task. The heights of the tasks are considered constant and given via an array of size n of positive integers. The last parameter Capa denotes the Capacity of the cumulative (of the ressource). The implementation is based on the paper of Bediceanu and al : "A new multi-resource cumulatives constraint with negative heights" in CP02


lexeq

public Constraint lexeq(IntVar[] v1,
                        IntVar[] v2)
Enforce a lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = . ref : Global Constraints for Lexicographic Orderings (Frisch and al)


lex

public Constraint lex(IntVar[] v1,
                      IntVar[] v2)
Enforce a strict lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = . ref : Global Constraints for Lexicographic Orderings (Frisch and al)


setInter

public Constraint setInter(SetVar sv1,
                           SetVar sv2,
                           SetVar inter)
Enforce a set to be the intersection of two others.

Parameters:
inter - the intersection of sv1 and sv2

eqCard

public Constraint eqCard(SetVar sv,
                         IntVar v)

eqCard

public Constraint eqCard(SetVar sv,
                         int val)

geqCard

public Constraint geqCard(SetVar sv,
                          IntVar v)

geqCard

public Constraint geqCard(SetVar sv,
                          int val)

leqCard

public Constraint leqCard(SetVar sv,
                          IntVar v)

leqCard

public Constraint leqCard(SetVar sv,
                          int val)

setDisjoint

public Constraint setDisjoint(SetVar sv1,
                              SetVar sv2)

member

public Constraint member(int val,
                         SetVar sv1)

member

public Constraint member(SetVar sv1,
                         int val)

member

public Constraint member(SetVar sv1,
                         IntVar var)

member

public Constraint member(IntVar var,
                         SetVar sv1)

notMember

public Constraint notMember(int val,
                            SetVar sv1)

notMember

public Constraint notMember(SetVar sv1,
                            int val)

notMember

public Constraint notMember(SetVar sv1,
                            IntVar var)

notMember

public Constraint notMember(IntVar var,
                            SetVar sv1)

createEqualXC

protected abstract Constraint createEqualXC(IntVar v0,
                                            int c)

createNotEqualXC

protected abstract Constraint createNotEqualXC(IntVar v0,
                                               int c)

createGreaterOrEqualXC

protected abstract Constraint createGreaterOrEqualXC(IntVar v0,
                                                     int c)

createLessOrEqualXC

protected abstract Constraint createLessOrEqualXC(IntVar v0,
                                                  int c)

createEqualXYC

protected abstract Constraint createEqualXYC(IntVar intVar,
                                             IntVar intVar1,
                                             int i)

createNotEqualXYC

protected abstract Constraint createNotEqualXYC(IntVar variable,
                                                IntVar variable1,
                                                int i)

createGreaterOrEqualXYC

protected abstract Constraint createGreaterOrEqualXYC(IntVar intVar,
                                                      IntVar intVar1,
                                                      int i)

createIntLinComb

protected abstract Constraint createIntLinComb(IntVar[] sortedVars,
                                               int[] sortedCoeffs,
                                               int nbPositiveCoeffs,
                                               int c,
                                               int linOperator)

createTimesXYZ

protected abstract Constraint createTimesXYZ(IntVar x,
                                             IntVar y,
                                             IntVar z)

createBinDisjunction

protected abstract Constraint createBinDisjunction(Constraint c0,
                                                   Constraint c1)

createLargeDisjunction

protected abstract Constraint createLargeDisjunction(Constraint[] alternatives)

createBinConjunction

protected abstract Constraint createBinConjunction(Constraint c0,
                                                   Constraint c1)

createLargeConjunction

protected abstract Constraint createLargeConjunction(Constraint[] alternatives)

createCardinality

protected abstract Constraint createCardinality(Constraint[] constList,
                                                IntVar cardVar,
                                                boolean b,
                                                boolean b1)

createGuard

protected abstract Constraint createGuard(Constraint c0,
                                          Constraint c1)

createEquiv

protected abstract Constraint createEquiv(Constraint c0,
                                          Constraint c1)

createAC3BinConstraint

protected abstract Constraint createAC3BinConstraint(IntVar v1,
                                                     IntVar v2,
                                                     BinRelation relation)

createAC4BinConstraint

protected abstract Constraint createAC4BinConstraint(IntVar v1,
                                                     IntVar v2,
                                                     BinRelation relation)

createAC2001BinConstraint

protected abstract Constraint createAC2001BinConstraint(IntVar v1,
                                                        IntVar v2,
                                                        BinRelation relation)

createCspLargeConstraint

protected abstract Constraint createCspLargeConstraint(IntVar[] vs,
                                                       LargeRelation relation)

createOccurrence

protected abstract Constraint createOccurrence(IntVar[] lvars,
                                               int occval,
                                               boolean onInf,
                                               boolean onSup)

createAllDifferent

protected abstract Constraint createAllDifferent(IntVar[] vars)

createBoundAllDiff

protected abstract Constraint createBoundAllDiff(IntVar[] vars,
                                                 boolean global)

createGlobalCardinality

protected abstract Constraint createGlobalCardinality(IntVar[] vars,
                                                      int min,
                                                      int max,
                                                      int[] low,
                                                      int[] up)

createCumulative

protected abstract Constraint createCumulative(IntVar[] sts,
                                               IntVar[] ends,
                                               IntVar[] durations,
                                               int[] h,
                                               int capa)

createLex

protected abstract Constraint createLex(IntVar[] v1,
                                        IntVar[] v2,
                                        boolean strict)

createSubscript

protected abstract Constraint createSubscript(IntVar index,
                                              int[] values,
                                              IntVar val,
                                              int offset)

createSubscript

protected abstract Constraint createSubscript(IntVar index,
                                              IntVar[] varArray,
                                              IntVar val,
                                              int offset)

createInverseChanneling

protected abstract Constraint createInverseChanneling(IntVar[] x,
                                                      IntVar[] y)

createBoolChanneling

protected abstract Constraint createBoolChanneling(IntVar b,
                                                   IntVar x,
                                                   int j)

createIntVar

protected abstract IntDomainVar createIntVar(java.lang.String name,
                                             int domainType,
                                             int min,
                                             int max)

createIntVar

protected abstract IntDomainVar createIntVar(java.lang.String name,
                                             int[] sortedValues)

createRealVal

protected abstract RealVar createRealVal(java.lang.String name,
                                         double min,
                                         double max)

createSetVar

protected abstract SetVar createSetVar(java.lang.String name,
                                       int a,
                                       int b)

createRealIntervalConstant

protected abstract RealIntervalConstant createRealIntervalConstant(double a,
                                                                   double b)

createRealSin

protected abstract RealExp createRealSin(RealExp exp)

createRealCos

protected abstract RealExp createRealCos(RealExp exp)

createRealIntegerPower

protected abstract RealExp createRealIntegerPower(RealExp exp,
                                                  int power)

createRealPlus

protected abstract RealExp createRealPlus(RealExp exp1,
                                          RealExp exp2)

createRealMinus

protected abstract RealExp createRealMinus(RealExp exp1,
                                           RealExp exp2)

createRealMult

protected abstract RealExp createRealMult(RealExp exp1,
                                          RealExp exp2)

createEquation

protected abstract Constraint createEquation(RealVar[] tmpVars,
                                             RealExp exp,
                                             RealIntervalConstant cst)

createMemberXY

protected abstract Constraint createMemberXY(SetVar sv1,
                                             IntVar var)

createNotMemberXY

protected abstract Constraint createNotMemberXY(SetVar sv1,
                                                IntVar var)

createMemberX

protected abstract Constraint createMemberX(SetVar sv1,
                                            int val)

createNotMemberX

protected abstract Constraint createNotMemberX(SetVar sv1,
                                               int val)

createDisjoint

protected abstract Constraint createDisjoint(SetVar sv1,
                                             SetVar sv2)

createSetIntersection

protected abstract Constraint createSetIntersection(SetVar sv1,
                                                    SetVar sv2,
                                                    SetVar inter)

createSetCard

protected abstract Constraint createSetCard(SetVar sv,
                                            IntVar v,
                                            boolean b1,
                                            boolean b2)

getIntVar

public final IntVar getIntVar(int i)
Network management: Retrieve a variable by its index (all integer variables of the problem are numbered in sequence from 0 on)

Parameters:
i - index of the variable in the problem

getIntVarIndex

public int getIntVarIndex(IntVar c)

getNbIntVars

public final int getNbIntVars()
retrieving the total number of variables

Returns:
the total number of variables in the problem

getRealVar

public final RealVar getRealVar(int i)
Returns a real variable.

Parameters:
i - index of the variable
Returns:
the i-th real variable

getNbRealVars

public final int getNbRealVars()
Returns the number of variables modelling real numbers.


getSetVar

public final SetVar getSetVar(int i)
Returns a set variable.

Parameters:
i - index of the variable
Returns:
the i-th real variable

getNbSetVars

public final int getNbSetVars()
Returns the number of variables modelling real numbers.