choco
Interface IntModeler

All Known Implementing Classes:
AbstractModel, AbstractProblem, BendersProblem, JumpProblem, PalmProblem, Problem

public interface IntModeler

An interface for all methods related modelling constraint programs over search domains


Method Summary
 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 geq(IntExp x, int c)
          Creates a constraint by stating that a variable 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 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 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 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[] 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
 IntVar makeConstantIntVar(int val)
          Creates an unnamed instantiated variable
 IntVar makeConstantIntVar(java.lang.String name, int val)
          Creates an instantiated variable
 IntDomainVar makeEnumIntVar(java.lang.String name, int min, int max)
          Creates a new search variable with an enumerated domain
 IntExp minus(IntExp t1, int c)
          Subtracting an search constant from an expression
 IntExp minus(IntExp t1, IntExp t2)
          Subtracting two search expressions one from another
 IntExp minus(int c, IntExp t1)
          Subtracting an expression from an search
 IntExp mult(int a, IntExp x)
          Creates a simple linear term from one coefficient and one variable
 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
 IntExp plus(IntExp t1, int c)
          Adding an search constant to an expression
 IntExp plus(IntExp t1, IntExp t2)
          Adding two search expressions one to another
 IntExp plus(int c, IntExp t1)
          Adding an search constant to an expression
 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
 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
 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
 

Method Detail

makeConstantIntVar

IntVar makeConstantIntVar(java.lang.String name,
                          int val)
Creates an instantiated variable

Parameters:
name - the name of the variable
val - the value
Returns:
the variable

makeConstantIntVar

IntVar makeConstantIntVar(int val)
Creates an unnamed instantiated variable

Parameters:
val - the value
Returns:
the variable

makeEnumIntVar

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

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

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

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

makeBoundIntVarArray

IntDomainVar[] makeBoundIntVarArray(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

makeBoundIntVarArray

IntDomainVar[][] makeBoundIntVarArray(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

mult

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

Parameters:
a - the coefficient
x - the variable
Returns:
the term

plus

IntExp plus(IntExp t1,
            IntExp t2)
Adding two search expressions one to another

Parameters:
t1 - first expression
t2 - second expression
Returns:
the resulting expression (a fresh one)

plus

IntExp plus(IntExp t1,
            int c)
Adding an search constant to an expression

Parameters:
t1 - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

plus

IntExp plus(int c,
            IntExp t1)
Adding an search constant to an expression

Parameters:
t1 - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

minus

IntExp minus(IntExp t1,
             IntExp t2)
Subtracting two search expressions one from another

Parameters:
t1 - first expression
t2 - second expression
Returns:
the resulting expression (a fresh one)

minus

IntExp minus(IntExp t1,
             int c)
Subtracting an search constant from an expression

Parameters:
t1 - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

minus

IntExp minus(int c,
             IntExp t1)
Subtracting an expression from an search

Parameters:
t1 - the expression
c - the search constant
Returns:
the resulting expression (a fresh one)

scalar

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

Parameters:
lc - the array of coefficients
lv - the array of variables
Returns:
the term

scalar

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

Parameters:
lv - the array of variables
lc - the array of coefficients
Returns:
the term

sum

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

Parameters:
lv - the array of integer expressions
Returns:
the term

geq

Constraint geq(IntExp x,
               IntExp y)
Creates a constraint by stating that a variable is greater or equal than a constant

Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

geq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

geq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

gt

Constraint gt(IntExp x,
              IntExp y)
Creates a constraint by stating that a variable is strictly than a constant

Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

gt

Constraint gt(IntExp x,
              int c)
Creates a constraint by stating that a variable is strictly than a constant

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

gt

Constraint gt(int c,
              IntExp x)
Creates a constraint by stating that a variable is strictly than a constant

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

leq

Constraint leq(IntExp x,
               int c)
Creates a constraint by stating that integer expression is less or equal than a constant

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

leq

Constraint leq(int c,
               IntExp x)
Creates a constraint by stating that a constant is less or equal than an integer expression

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

leq

Constraint leq(IntExp x,
               IntExp y)
Creates a constraint by stating that an integer expression is less or equal than another one

Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

lt

Constraint lt(IntExp x,
              int c)
Creates a constraint by stating that integer expression is strictly less than a constant

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

lt

Constraint lt(int c,
              IntExp x)
Creates a constraint by stating that a constant is strictly less than an integer expression

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

lt

Constraint lt(IntExp x,
              IntExp y)
Creates a constraint by stating that an integer expression is strictly less than another one

Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

eq

Constraint eq(IntExp x,
              IntExp y)
Creates a constraint by stating that a term is equal than a constant

Parameters:
x - the first search expression
y - the second search expression
Returns:
the linear equality constraint

eq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

eq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear equality constraint

neq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear disequality constraint

neq

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

Parameters:
x - the search expression
c - the search constant
Returns:
the linear disequality constraint

neq

Constraint neq(IntExp x,
               IntExp y)
Creates a constraint by stating that two term are different

Parameters:
x - the first variable
y - the second variale
Returns:
the linear disequality constraint

times

Constraint times(IntVar x,
                 IntVar y,
                 IntVar z)
Creates a constraint by stating that X*Y=Z

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

setMinimizationObjective

void setMinimizationObjective(IntVar obj)
sets the optimization mode to minimization and sets the objective function

Parameters:
obj - the variable to be minimized

setMaximizationObjective

void setMaximizationObjective(IntVar obj)
sets the optimization mode to maximization and sets the objective function

Parameters:
obj - the variable to be maximized