ilog.concert
Interface IloModeler

All Known Subinterfaces:
IloMPModeler

public interface IloModeler
extends IloModel

Interface for basic modeling. IloModeler defines an interface for building basic optimization models. This interface contains methods for constructing variables, basic constraints, and objective function objects. It is typically implemented by such optimizer classes as IloCplex, available in ILOG CPLEX or IloSolverFactory, available in ILOG JSolver. By using this interface rather than the actual implementation class, you can create optimization models that can be solved by any optimizer implementing the interface.
This interface is an extension of the IloModel interface, and allows you to add modeling objects (instances of IloAddable) to an IloModeler object. For an optimizer implementing this interface, the model built corresponds to the model the optimizer will solve using its solve() method.
Note that there are two interfaces derived from IloModeler: IloCPModeler, available in ILOG JSolver and IloMPModeler, available in ILOG CPLEX. IloCPModeler defines the API for constraint-based engines. (An engine is an object whose function is to manipulate models that include variables and constraints.) IloMPModeler is a modeling interface for Mathematical Programming. It adds support for several new modeling object interfaces, including LP matrices, semi-continuous variables, and special ordered sets (SOSs). It extends the functionality of IloModeler to column-wise modeling and supports modification of variable types and expressions of ranged constraints and objective functions.


Method Summary
 IloRange addEq(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange addEq(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addEq(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange addEq(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addEq(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange addEq(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addGe(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange addGe(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addGe(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange addGe(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addGe(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange addGe(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addLe(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange addLe(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addLe(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange addLe(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange addLe(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange addLe(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloObjective addMaximize(IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective addMaximize(IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloObjective addMinimize(IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective addMinimize(IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloRange addRange(double lb, IloNumExpr expr, double ub)
          Creates and returns an IloRange object.
 IloRange addRange(double lb, IloNumExpr expr, double ub, java.lang.String name)
          Creates and returns an IloRange object.
 IloIntVar boolVar()
          Creates and returns a new Boolean variable (domain 0,1)
 IloIntVar boolVar(java.lang.String name)
          Creates and returns a new Boolean variable (domain 0,1) and a name.
 IloIntVar[] boolVarArray(int n)
          Creates and returns an array of n new Boolean variables (domain 0,1).
 IloIntVar[] boolVarArray(int n, java.lang.String[] name)
          Creates and returns an array of n new Boolean variables (domain 0,1).
 IloNumExpr constant(double x)
          Creates and returns an expression object representing the constant term x.
 IloIntExpr constant(int x)
          Creates and returns a new constant expression equal to x.
 IloNumExpr diff(double v, IloNumExpr e1)
          Creates and returns an expression object representing the difference of expression e and value v.
 IloIntExpr diff(IloIntExpr expr1, IloIntExpr expr2)
          Creates and returns an integer expression object representing the difference of integer expressions expr1 and expr2.
 IloIntExpr diff(IloIntExpr e, int v)
          Creates and returns an integer expression object representing the difference of integer expression e and value v.
 IloNumExpr diff(IloNumExpr e, double v)
          Creates and returns an expression object representing the difference of expression e and value v.
 IloNumExpr diff(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an expression object representing the difference of expressions e1 and e2.
 IloIntExpr diff(int v, IloIntExpr e1)
          Creates and returns an integer expression object representing the difference of value v and integer expression e1.
 IloRange eq(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange eq(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange eq(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange eq(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange eq(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange eq(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange ge(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange ge(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange ge(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange ge(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange ge(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange ge(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloIntVar intVar(int min, int max)
          Creates and returns a new integer variable with the specified bounds.
 IloIntVar intVar(int min, int max, java.lang.String name)
          Creates and returns a new integer variable with the specified bounds and a name.
 IloIntVar[] intVarArray(int n, int[] min, int[] max)
          Creates an array of length n initialized to n new integer variables, each variable with its own bounds.
 IloIntVar[] intVarArray(int n, int[] min, int[] max, java.lang.String[] name)
          Creates an array of length n initialized to n new integer variables, each variable with its own bounds.
 IloIntVar[] intVarArray(int n, int min, int max)
          Returns a new array of n integer variables with the specified bounds.
 IloIntVar[] intVarArray(int n, int min, int max, java.lang.String[] name)
          Creates an array of length n initialized to n new modeling integer variables, each with the same specified bounds and returns them in an array.
 IloRange le(double val, IloNumExpr expr)
          Creates and returns an IloRange object.
 IloRange le(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange le(IloNumExpr expr, double rhs)
          Creates and returns an IloRange object.
 IloRange le(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an IloRange object.
 IloRange le(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange object.
 IloRange le(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an IloRange object.
 IloLinearIntExpr linearIntExpr()
          Creates and returns a zero integer linear expression.
 IloLinearIntExpr linearIntExpr(int val)
          Creates and returns an integer linear expression initialized to a constant.
 IloLinearNumExpr linearNumExpr()
          Creates and returns a zero linear expression.
 IloLinearNumExpr linearNumExpr(double val)
          Creates and returns a linear expression initialized to a constant.
 IloObjective maximize(IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective maximize(IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloObjective minimize(IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective minimize(IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloIntExpr negative(IloIntExpr e)
          Creates and returns the new expression -e, the negative of the expression e.
 IloNumExpr negative(IloNumExpr e)
          Creates and returns the new expression -e, the negative of the expression e.
 IloNumVar numVar(double lb, double ub)
          Creates a new modeling variable object of the type IloNumVarType.Float.
 IloNumVar numVar(double lb, double ub, IloNumVarType type)
          Creates a new numerical variable object.
 IloNumVar numVar(double lb, double ub, IloNumVarType type, java.lang.String name)
          Creates a new modeling variable object.
 IloNumVar numVar(double lb, double ub, java.lang.String name)
          Creates a new modeling variable object of the type IloNumVarType.Float.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub)
          Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type)
          Creates n new numerical variable objects and returns them in an array.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name)
          Creates n new numerical variable objects and returns them in an array.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, java.lang.String[] name)
          Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float.
 IloNumVar[] numVarArray(int n, double lb, double ub)
          Creates an array of length n initialized to n new modeling variable objects of the type IloNumVarType.Float.
 IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type)
          Creates n new numerical variable objects and returns them in an array.
 IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type, java.lang.String[] name)
          Creates n new numerical variable objects and returns them in an array.
 IloNumVar[] numVarArray(int n, double lb, double ub, java.lang.String[] name)
          Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float.
 IloObjective objective(IloObjectiveSense sense, IloNumExpr expr)
          Creates and returns an IloObjective object.
 IloObjective objective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name)
          Creates and returns an IloObjective object.
 IloNumExpr prod(double v, IloNumExpr e1)
          Creates and returns an expression object representing the product of the expression e and the value v.
 IloIntExpr prod(IloIntExpr e1, IloIntExpr e2)
          Creates and returns the new expression e1 * e2.
 IloIntExpr prod(IloIntExpr e, int v)
          Creates and returns the new expression e * v.
 IloNumExpr prod(IloNumExpr e, double v)
          Creates and returns an expression object representing the product of expression e and value v.
 IloNumExpr prod(IloNumExpr expr1, IloNumExpr expr2)
          Creates and returns an expression object representing the product of expressions expr1 and expr2.
 IloIntExpr prod(int v, IloIntExpr e)
          Creates and returns the new expression v * e.
 IloRange range(double lb, IloNumExpr expr, double ub)
          Creates and returns an IloRange object.
 IloRange range(double lb, IloNumExpr expr, double ub, java.lang.String name)
          Creates and returns an IloRange object.
 IloLinearNumExpr scalProd(double[] coefs, IloNumVar[] vars)
          Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
 IloLinearNumExpr scalProd(double[] coefs, IloNumVar[] vars, int start, int num)
          Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables provided in vars[start]...vars[start+num-1].
 IloLinearIntExpr scalProd(IloIntVar[] vars, int[] vals)
          Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables.
 IloLinearIntExpr scalProd(IloIntVar[] vars, int[] vals, int start, int num)
          Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1] with the integer variables provided in vars[start]...vars[start+num-1].
 IloLinearNumExpr scalProd(IloNumVar[] vars, double[] coefs)
          Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
 IloLinearNumExpr scalProd(IloNumVar[] vars, double[] coefs, int start, int num)
          Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables provided in vars[start]...vars[start+num-1].
 IloLinearNumExpr scalProd(IloNumVar[] vars, int[] coefs)
          Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
 IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars)
          Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables.
 IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars, int start, int num)
          Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1] with the integer variables provided in vars[start]...vars[start+num-1].
 IloLinearNumExpr scalProd(int[] coefs, IloNumVar[] vars)
          Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
 IloIntExpr square(IloIntExpr e)
          Creates and returns the new expression e^2.
 IloNumExpr square(IloNumExpr e)
          Creates and returns an expression object representing the square of the expression e (that is, e * e).
 IloNumExpr sum(double v, IloNumExpr e)
          Creates and returns an expression object representing the sum of value v and expression e.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2)
          Creates and returns the expression e1 + e2, representing the sum of integer expressions e1 and e2.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2 and e3.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3 and e4.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4 and e5.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5 and e6.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6 and e7.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7, IloIntExpr e8)
          Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6, e7 and e8.
 IloIntExpr sum(IloIntExpr e, int v)
          Creates and returns the expression e + v, representing the sum of integer expression e and value v.
 IloNumExpr sum(IloNumExpr e, double v)
          Creates and returns an expression object representing the sum of value v and expression e.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an expression object representing the sum of expressions e1 and e2.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3)
          Creates and returns an expression object representing the sum of expressions e1, e2 and e3.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4)
          Creates and returns an expression object representing the sum of expressions e1, e2, e3 and e4.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5)
          Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4 and e5.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6)
          Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5 and e6.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7)
          Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6 and e7.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7, IloNumExpr e8)
          Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6, e7 and e8.
 IloIntExpr sum(int v, IloIntExpr e)
          Creates and returns the expression v + e, representing the sum of value v and integer expression e.
 
Methods inherited from interface ilog.concert.IloModel
add, add, add, iterator, remove, remove, remove
 
Methods inherited from interface ilog.concert.IloAddable
getName, setName
 

Method Detail

numVar

public IloNumVar numVar(double lb,
                        double ub,
                        IloNumVarType type,
                        java.lang.String name)
                 throws IloException
Creates a new modeling variable object. This method returns an object representing a new modeling variable with the specified bounds, type, and name.
Parameters:
lb - The lower bound of the new numerical variable.
ub - The upper bound of the new numerical variable.
type - The type of the new numerical variable.
name - The name of the new numerical variable.
Returns:
The new numerical variable object.

numVar

public IloNumVar numVar(double lb,
                        double ub,
                        IloNumVarType type)
                 throws IloException
Creates a new numerical variable object.
Parameters:
lb - The lower bound of the new numerical variable.
ub - The upper bound of the new numerical variable.
type - The type of the new numerical variable.
Returns:
The new numerical variable object.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               IloNumVarType type)
                        throws IloException
Creates n new numerical variable objects and returns them in an array. All variables are created with the same bounds and type.
Parameters:
n - The number of new numerical variables.
lb - The lower bound of the new numerical variables.
ub - The upper bound of the new numerical variables.
type - The type of the new numerical variables.
Returns:
An array containing the n new numerical variable objects.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               IloNumVarType type,
                               java.lang.String[] name)
                        throws IloException
Creates n new numerical variable objects and returns them in an array. All variables are created with the same bounds and type, but with different names.
Parameters:
lb - The lower bound of the new numerical variables.
ub - The upper bound of the new numerical variables.
type - The type of the new numerical variables.
name - The names of the new numerical variables. Variable i is assigned the name name[i].
Returns:
An array containing the n new numerical variable objects.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               IloNumVarType[] type,
                               java.lang.String[] name)
                        throws IloException
Creates n new numerical variable objects and returns them in an array.
Parameters:
lb - The lower bounds of the new numerical variables. Variable i is constructed with the lower bound lb[i].
ub - The upper bounds of the new numerical variables. Variable i is constructed with the upper bound ub[i].
type - The types of the new numerical variables. Variable i is constructed with the type type[i].
name - The names of the new numerical variables. Variable i is assigned the name name[i].
Returns:
An array containing the n new numerical variable objects.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               IloNumVarType[] type)
                        throws IloException
Creates n new numerical variable objects and returns them in an array.
Parameters:
lb - The lower bounds of the new numerical variables. Variable i is constructed with the lower bound lb[i].
ub - The upper bounds of the new numerical variables. Variable i is constructed with the upper bound ub[i].
type - The types of the new numerical variables. Variable i is constructed with the type type[i].
Returns:
An array containing the n new numerical variable objects.

numVar

public IloNumVar numVar(double lb,
                        double ub,
                        java.lang.String name)
                 throws IloException
Creates a new modeling variable object of the type IloNumVarType.Float. This method returns an object representing a new modeling variable of type IloNumVarType.Float with the specified bounds and name.
Parameters:
lb - The lower bound of the new modeling variable.
ub - The upper bound of the new modeling variable.
name - The name of the new modeling variable.
Returns:
The new modeling variable object.

numVar

public IloNumVar numVar(double lb,
                        double ub)
                 throws IloException
Creates a new modeling variable object of the type IloNumVarType.Float. This method returns an object representing a new modeling variable of the type IloNumVarType.Float with the specified bounds.
Parameters:
lb - The lower bound of the new modeling variable.
ub - The upper bound of the new modeling variable.
Returns:
The new modeling variable object.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub)
                        throws IloException
Creates an array of length n initialized to n new modeling variable objects of the type IloNumVarType.Float. This method creates n new modeling variables of the type IloNumVarType.Float, each with the same specified bounds and returns them in an array.
Parameters:
lb - The lower bound of the new modeling variable.
ub - The upper bound of the new modeling variable.
Returns:
The array new modeling variables.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               java.lang.String[] name)
                        throws IloException
Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float. This method creates n new modeling variables of type IloNumVarType.Float, each with the same specified bounds, and returns them in an array. Each new variable is assigned a name, where variable i is assigned the name name[i].
Parameters:
lb - The lower bound of the new modeling variable.
ub - The upper bound of the new modeling variable.
name - The names of the new modeling variables. Variable i is assigned the name name[i].
Returns:
The array of new modeling variables.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               java.lang.String[] name)
                        throws IloException
Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float. This method creates n new modeling variables of the type IloNumVarType.Float, each with the same specified bounds, and returns them in an array. Each new variable is assigned a name, where variable i is assigned the name name[i].
Parameters:
lb - The lower bound of the new modeling variable.
ub - The upper bound of the new modeling variable.
name - The names of the new modeling variables. Variable i is assigned the name name[i].
Returns:
The array new modeling variables.

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub)
                        throws IloException
Creates an array of length n initialized to n new modeling variable objects of type IloNumVarType.Float. This method creates n new modeling variables of the type IloNumVarType.Float, each with its own bounds, and returns them in an array. Variable i will be constructed with bounds lb[i] and ub[i].
Parameters:
lb - The lower bounds of the new modeling variable. Variable i will be constructed with a lower bound of lb[i].
ub - The upper bounds of the new modeling variable. Variable i will be constructed with an upper bound of lb[i].
Returns:
The array of new modeling variables.

intVar

public IloIntVar intVar(int min,
                        int max,
                        java.lang.String name)
                 throws IloException
Creates and returns a new integer variable with the specified bounds and a name.
Parameters:
min - The minimum value of the variable.
max - The maximum value of the variable.
name - The name of the variable.

intVar

public IloIntVar intVar(int min,
                        int max)
                 throws IloException
Creates and returns a new integer variable with the specified bounds.
Parameters:
min - The minimum value of the variable.
max - The maximum value of the variable.

intVarArray

public IloIntVar[] intVarArray(int n,
                               int min,
                               int max)
                        throws IloException
Returns a new array of n integer variables with the specified bounds.
Parameters:
min - The lower bound of the new modeling variable.
max - The upper bound of the new modeling variable.
Returns:
The array of new modeling variables.

intVarArray

public IloIntVar[] intVarArray(int n,
                               int min,
                               int max,
                               java.lang.String[] name)
                        throws IloException
Creates an array of length n initialized to n new modeling integer variables, each with the same specified bounds and returns them in an array. Each new variable is assigned a name, where variable i is assigned the name name[i].
Parameters:
min - The lower bound of the new modeling variable.
max - The upper bound of the new modeling variable.
name - The names of the new modeling variables. Variable i is assigned the name name[i].
Returns:
The new modeling variable object.

intVarArray

public IloIntVar[] intVarArray(int n,
                               int[] min,
                               int[] max)
                        throws IloException
Creates an array of length n initialized to n new integer variables, each variable with its own bounds. Variable i will be constructed with bounds min[i] and max[i].
Parameters:
min - The lower bounds of the new modeling variable. Variable i will be constructed with a lower bound of min[i].
max - The upper bounds of the new modeling variable. Variable i will be constructed with an upper bound of max[i].
Returns:
The array of new modeling variables.

intVarArray

public IloIntVar[] intVarArray(int n,
                               int[] min,
                               int[] max,
                               java.lang.String[] name)
                        throws IloException
Creates an array of length n initialized to n new integer variables, each variable with its own bounds. Variable i will be constructed with bounds min[i] and max[i] and will be assigned the name name[i].
Parameters:
min - The lower bounds of the new modeling variable. Variable i will be constructed with a lower bound of min[i].
max - The upper bounds of the new modeling variable. Variable i will be constructed with an upper bound of max[i].
name - The names of the new modeling variables. Variable i will be assigned the name name[i].
Returns:
The array of new modeling variables.

boolVar

public IloIntVar boolVar(java.lang.String name)
                  throws IloException
Creates and returns a new Boolean variable (domain 0,1) and a name.
Parameters:
name - The name of the variable.

boolVar

public IloIntVar boolVar()
                  throws IloException
Creates and returns a new Boolean variable (domain 0,1)

boolVarArray

public IloIntVar[] boolVarArray(int n)
                         throws IloException
Creates and returns an array of n new Boolean variables (domain 0,1).

boolVarArray

public IloIntVar[] boolVarArray(int n,
                                java.lang.String[] name)
                         throws IloException
Creates and returns an array of n new Boolean variables (domain 0,1). Variable i will be assigned the name name[i].

linearNumExpr

public IloLinearNumExpr linearNumExpr()
                               throws IloException
Creates and returns a zero linear expression.
Returns:
A zero linear expression.

linearNumExpr

public IloLinearNumExpr linearNumExpr(double val)
                               throws IloException
Creates and returns a linear expression initialized to a constant.
Parameters:
val - The constant term of the new linear expression.
Returns:
The linear expression initialized to the constant val.

scalProd

public IloLinearNumExpr scalProd(IloNumVar[] vars,
                                 double[] coefs)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
Parameters:
coefs - The values involved in the new scalar product expression.
vars - The variables involved in the new scalar product expression.
Returns:
The new linear expression.

scalProd

public IloLinearNumExpr scalProd(IloNumVar[] vars,
                                 double[] coefs,
                                 int start,
                                 int num)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables provided in vars[start]...vars[start+num-1].
Parameters:
coefs - An array containing the values to be used for the scalar product.
vars - An array containing the variables to be used for the scalar product.
start - The first element in coefs/vars to use for the scalar product.
num - The number of elements in coefs/vars to use for the scalar product.
Returns:
The new linear expression.

scalProd

public IloLinearNumExpr scalProd(double[] coefs,
                                 IloNumVar[] vars)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
Parameters:
coefs - The values involved in the new scalar product expression.
vars - The variables involved in the new scalar product expression.
Returns:
The new linear expression.

scalProd

public IloLinearNumExpr scalProd(double[] coefs,
                                 IloNumVar[] vars,
                                 int start,
                                 int num)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables provided in vars[start]...vars[start+num-1].
Parameters:
coefs - An array containing the values to be used for the scalar product.
vars - An array containing the variables to be used for the scalar product.
start - The first element in coefs/vars to use for the scalar product.
num - The number of elements in coefs/vars to use for the scalar product.
Returns:
The new linear expression.

scalProd

public IloLinearNumExpr scalProd(IloNumVar[] vars,
                                 int[] coefs)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
Parameters:
coefs - The values involved in the new scalar product expression.
vars - The variables involved in the new scalar product expression.
Returns:
The new linear expression.

scalProd

public IloLinearNumExpr scalProd(int[] coefs,
                                 IloNumVar[] vars)
                          throws IloException
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
Parameters:
coefs - The values involved in the new scalar product expression.
vars - The variables involved in the new scalar product expression.
Returns:
The new linear expression.

negative

public IloNumExpr negative(IloNumExpr e)
                    throws IloException
Creates and returns the new expression -e, the negative of the expression e.
Parameters:
e - An expression for which the negative value is given.
Returns:
An expression object representing the negative of e.

sum

public IloNumExpr sum(IloNumExpr e,
                      double v)
               throws IloException
Creates and returns an expression object representing the sum of value v and expression e.
Parameters:
v - A value to use in the sum.
e - An expression to use in the sum.
Returns:
An expression object representing the sum of v + e.

sum

public IloNumExpr sum(double v,
                      IloNumExpr e)
               throws IloException
Creates and returns an expression object representing the sum of value v and expression e.
Parameters:
v - A value to use in the sum.
e - An expression to use in the sum.
Returns:
An expression object representing the sum of v + e.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1 and e2.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2 and e3.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2, e3 and e4.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
e4 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3 + e4.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4 and e5.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
e4 - An expression to use in the sum.
e5 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3 + e4 + e5.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5 and e6.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
e4 - An expression to use in the sum.
e5 - An expression to use in the sum.
e6 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3 + e4 + e5 + e6.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6,
                      IloNumExpr e7)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6 and e7.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
e4 - An expression to use in the sum.
e5 - An expression to use in the sum.
e6 - An expression to use in the sum.
e7 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3 + e4 + e5 + e6 + e7.

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6,
                      IloNumExpr e7,
                      IloNumExpr e8)
               throws IloException
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6, e7 and e8.
Parameters:
e1 - An expression to use in the sum.
e2 - An expression to use in the sum.
e3 - An expression to use in the sum.
e4 - An expression to use in the sum.
e5 - An expression to use in the sum.
e6 - An expression to use in the sum.
e7 - An expression to use in the sum.
e8 - An expression to use in the sum.
Returns:
An expression object representing the sum of e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8.

diff

public IloNumExpr diff(IloNumExpr e,
                       double v)
                throws IloException
Creates and returns an expression object representing the difference of expression e and value v.
Parameters:
e - An expression to use in the difference.
v - A value to use in the difference.
Returns:
An expression object representing the difference of e - v.

diff

public IloNumExpr diff(IloNumExpr e1,
                       IloNumExpr e2)
                throws IloException
Creates and returns an expression object representing the difference of expressions e1 and e2.
Parameters:
e1 - An expression to use in the difference.
e2 - An expression to use in the difference.
Returns:
An expression object representing the difference of e1 - e2.

diff

public IloNumExpr diff(double v,
                       IloNumExpr e1)
                throws IloException
Creates and returns an expression object representing the difference of expression e and value v.
Parameters:
e - An expression to use in the difference.
v - A value to use in the difference.
Returns:
An expression object representing the difference of e - v.

prod

public IloNumExpr prod(IloNumExpr e,
                       double v)
                throws IloException
Creates and returns an expression object representing the product of expression e and value v.
Parameters:
e - An expression to use in the product.
v - A value to use in the product.
Returns:
An expression object representing the product of e * v.

prod

public IloNumExpr prod(IloNumExpr expr1,
                       IloNumExpr expr2)
                throws IloException
Creates and returns an expression object representing the product of expressions expr1 and expr2.
Parameters:
expr1 - An expression to use in the product.
expr2 - An expression to use in the product.
Returns:
An expression object representing the product of expr1 * expr2.

prod

public IloNumExpr prod(double v,
                       IloNumExpr e1)
                throws IloException
Creates and returns an expression object representing the product of the expression e and the value v.
Parameters:
e - An expression to use in the product.
v - A value to use in the product.
Returns:
An expression object representing the product of e * v.

square

public IloNumExpr square(IloNumExpr e)
                  throws IloException
Creates and returns an expression object representing the square of the expression e (that is, e * e).
Parameters:
e - An expression to use in the square.
Returns:
An expression object representing the product of e * e.

constant

public IloNumExpr constant(double x)
                    throws IloException
Creates and returns an expression object representing the constant term x. This method does not need to be called by the user, as overloaded versions of all expression methods are available to deal directly with constants.
Parameters:
x - A value for which to construct a constant expression term.
Returns:
An expression object representing the constant x.

linearIntExpr

public IloLinearIntExpr linearIntExpr()
                               throws IloException
Creates and returns a zero integer linear expression.

linearIntExpr

public IloLinearIntExpr linearIntExpr(int val)
                               throws IloException
Creates and returns an integer linear expression initialized to a constant.
Parameters:
val - Constant term of the new linear expression.
Returns:
Integer linear expression initialized to the constant val.

scalProd

public IloLinearIntExpr scalProd(int[] vals,
                                 IloIntVar[] vars)
                          throws IloException
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables.
Parameters:
vals - The integer values involved in the new scalar product expression.
vars - The integer variables involved in the new scalar product expression.
Returns:
The new integer linear expression.

scalProd

public IloLinearIntExpr scalProd(int[] vals,
                                 IloIntVar[] vars,
                                 int start,
                                 int num)
                          throws IloException
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1] with the integer variables provided in vars[start]...vars[start+num-1].
Parameters:
vals - An array containing the values to be used for the scalar product.
vars - An array containing the variables to be used for the scalar product.
start - First element in vals/vars to be used for the scalar product.
num - Number of elements in vals/vars to be used for the scalar product.
Returns:
The new integer linear expression.

scalProd

public IloLinearIntExpr scalProd(IloIntVar[] vars,
                                 int[] vals)
                          throws IloException
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables.
Parameters:
vars - The integer variables involved in the new scalar product expression.
vals - The integer values involved in the new scalar product expression.
Returns:
The new integer linear expression.

scalProd

public IloLinearIntExpr scalProd(IloIntVar[] vars,
                                 int[] vals,
                                 int start,
                                 int num)
                          throws IloException
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1] with the integer variables provided in vars[start]...vars[start+num-1].
Parameters:
vars - An array containing the variables to be used for the scalar product.
vals - An array containing the values to be used for the scalar product.
start - First element in vals/vars to be used for the scalar product.
num - Number of elements in vals/vars to be used for the scalar product.
Returns:
The new integer linear expression.

negative

public IloIntExpr negative(IloIntExpr e)
                    throws IloException
Creates and returns the new expression -e, the negative of the expression e.
Parameters:
e - An integer expression for which the negative value is given.
Returns:
An integer expression object representing the negative of e.

sum

public IloIntExpr sum(IloIntExpr e,
                      int v)
               throws IloException
Creates and returns the expression e + v, representing the sum of integer expression e and value v.
Parameters:
e - An integer expression to use in the sum.
v - A value to use in the sum.
Returns:
An integer expression object representing the sum of e and v.

sum

public IloIntExpr sum(int v,
                      IloIntExpr e)
               throws IloException
Creates and returns the expression v + e, representing the sum of value v and integer expression e.
Parameters:
v - A value to use in the sum.
e - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of v and e.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2)
               throws IloException
Creates and returns the expression e1 + e2, representing the sum of integer expressions e1 and e2.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2 and e3.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2 + e3.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3 and e4.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
e4 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2 + e3 + e4.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4 and e5.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
e4 - An integer expression to use in the sum.
e5 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2 + e3 + e4 + e5.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5 and e6.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
e4 - An integer expression to use in the sum.
e5 - An integer expression to use in the sum.
e6 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2 + e3 + e4 + e5 + e6.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6,
                      IloIntExpr e7)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6 and e7.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
e4 - An integer expression to use in the sum.
e5 - An integer expression to use in the sum.
e6 - An integer expression to use in the sum.
e7 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum of e1 + e2 + e3 + e4 + e5 + e6 + e7.

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6,
                      IloIntExpr e7,
                      IloIntExpr e8)
               throws IloException
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6, e7 and e8.
Parameters:
e1 - An integer expression to use in the sum.
e2 - An integer expression to use in the sum.
e3 - An integer expression to use in the sum.
e4 - An integer expression to use in the sum.
e5 - An integer expression to use in the sum.
e6 - An integer expression to use in the sum.
e7 - An integer expression to use in the sum.
e8 - An integer expression to use in the sum.
Returns:
An integer expression object representing the sum e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8.

diff

public IloIntExpr diff(IloIntExpr e,
                       int v)
                throws IloException
Creates and returns an integer expression object representing the difference of integer expression e and value v.
Parameters:
e - An integer expression to use in the difference.
v - A value to use in the difference.
Returns:
An integer expression object representing the difference of e - v.

diff

public IloIntExpr diff(IloIntExpr expr1,
                       IloIntExpr expr2)
                throws IloException
Creates and returns an integer expression object representing the difference of integer expressions expr1 and expr2.
Parameters:
expr1 - An integer expression to use in the difference.
expr2 - An integer expression to use in the difference.
Returns:
An integer expression object representing the difference of expr1 - expr2.

diff

public IloIntExpr diff(int v,
                       IloIntExpr e1)
                throws IloException
Creates and returns an integer expression object representing the difference of value v and integer expression e1.
Parameters:
v - A value to use in the difference.
e1 - An integer expression to use in the difference.
Returns:
An integer expression object representing the difference of v - e1.

prod

public IloIntExpr prod(IloIntExpr e,
                       int v)
                throws IloException
Creates and returns the new expression e * v.

prod

public IloIntExpr prod(IloIntExpr e1,
                       IloIntExpr e2)
                throws IloException
Creates and returns the new expression e1 * e2.

prod

public IloIntExpr prod(int v,
                       IloIntExpr e)
                throws IloException
Creates and returns the new expression v * e.

square

public IloIntExpr square(IloIntExpr e)
                  throws IloException
Creates and returns the new expression e^2.

constant

public IloIntExpr constant(int x)
                    throws IloException
Creates and returns a new constant expression equal to x.
Parameters:
x - The value of the constant expression.
Returns:
The constant expression.

eq

public IloRange eq(IloNumExpr e1,
                   IloNumExpr e2)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 == e2.
Parameters:
e1 - Left-hand side expression of the new equality constraint.
e2 - Right-hand side expression of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 == e2.

eq

public IloRange eq(IloNumExpr e1,
                   IloNumExpr e2,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 == e2 and is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new equality constraint.
e2 - Right-hand side expression of the new equality constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 == e2.

eq

public IloRange eq(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr == rhs.
Parameters:
expr - Expression of the new equality constraint.
rhs - Upper bound of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint expr == rhs.

eq

public IloRange eq(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr == rhs and is assigned the name name.
Parameters:
expr - Expression of the new equality constraint.
rhs - Upper bound of the new equality constraint.
name - Name assigned to the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint expr == rhs.

eq

public IloRange eq(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val == expr.
Parameters:
val - Value of the new equality constraint.
expr - Expression of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint val == expr.

eq

public IloRange eq(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val == expr and is assigned the name name.
Parameters:
val - Value of the new equality constraint.
expr - Expression of the new equality constraint.
name - Name assigned to the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint val == expr.

le

public IloRange le(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr <= rhs.
Parameters:
expr - Expression of the new less-equal constraint.
rhs - Upper bound of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.

le

public IloRange le(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr <= rhs and is assigned the name name.
Parameters:
expr - Expression of the new less-equal constraint.
rhs - Upper bound of the new less-equal constraint.
name - Name assigned to the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.

le

public IloRange le(IloNumExpr e1,
                   IloNumExpr e2)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 <= e2.
Parameters:
e1 - Left-hand side expression of the new less-equal constraint.
e2 - Right-hand side expression of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.

le

public IloRange le(IloNumExpr e1,
                   IloNumExpr e2,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 <= e2 and is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new less-equal constraint.
e2 - Right-hand side expression of the new less-equal constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.

le

public IloRange le(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val <= expr.
Parameters:
val - Value of the new less-equal constraint.
expr - Expression of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.

le

public IloRange le(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val <= expr and is assigned the name name.
Parameters:
val - Value of the new less-equal constraint.
expr - Expression of the new less-equal constraint.
name - Name assigned to the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.

ge

public IloRange ge(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr >= rhs.
Parameters:
expr - Expression of the new greater-equal constraint.
rhs - Upper bound of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.

ge

public IloRange ge(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr >= rhs and is assigned the name name.
Parameters:
expr - Expression of the new greater-equal constraint.
rhs - Upper bound of the new greater-equal constraint.
name - Name assigned to the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.

ge

public IloRange ge(IloNumExpr e1,
                   IloNumExpr e2)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 >= e2.
Parameters:
e1 - Left-hand side expression of the new greater-equal constraint.
e2 - Right-hand side expression of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.

ge

public IloRange ge(IloNumExpr e1,
                   IloNumExpr e2,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 >= e2 and is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new greater-equal constraint.
e2 - Right-hand side expression of the new greater-equal constraint.
name - Name assigned to the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.

ge

public IloRange ge(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val >= expr.
Parameters:
val - Value of the new greater-equal constraint.
expr - Expression of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.

ge

public IloRange ge(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val >= expr and is assigned the name name.
Parameters:
val - Value of the new greater-equal constraint.
expr - Expression of the new greater-equal constraint.
name - Name assigned to the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.

range

public IloRange range(double lb,
                      IloNumExpr expr,
                      double ub)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint lb <= expr <= ub.
Parameters:
lb - Lower bound of the new IloRange constraint.
expr - Expression of the new IloRange constraint.
ub - Upper bound of the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint lb <= expr <= ub.

range

public IloRange range(double lb,
                      IloNumExpr expr,
                      double ub,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint lb <= expr <= ub and is assigned the name name.
Parameters:
lb - Lower bound of the new IloRange constraint.
expr - Expression of the new IloRange constraint.
ub - Upper bound of the new IloRange constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint lb <= expr <= ub.

addEq

public IloRange addEq(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr == rhs, and is added to the invoking IloModel.
Parameters:
expr - Expression of the new equality constraint.
rhs - Upper bound of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint expr == rhs.

addEq

public IloRange addEq(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr == rhs, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
expr - Expression of the new equality constraint.
rhs - Upper bound of the new equality constraint.
name - Name assigned to the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint expr == rhs.

addEq

public IloRange addEq(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 == e2, and is added to the invoking IloModel.
Parameters:
e1 - Left-hand side expression of the new equality constraint.
e2 - Right-hand side expression of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 == e2.

addEq

public IloRange addEq(IloNumExpr e1,
                      IloNumExpr e2,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 == e2, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new equality constraint.
e2 - Right-hand side expression of the new equality constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 == e2.

addEq

public IloRange addEq(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val == expr, and is added to the invoking IloModel.
Parameters:
val - Value of the new equality constraint.
expr - Expression of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint val == expr.

addEq

public IloRange addEq(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val == expr, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
val - Value of the new equality constraint.
expr - Expression of the new equality constraint.
name - Name assigned to the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint val == expr.

addLe

public IloRange addLe(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr <= rhs, and is added to the invoking IloModel.
Parameters:
expr - Expression of the new less-equal constraint.
rhs - Upper bound of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.

addLe

public IloRange addLe(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr <= rhs, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
expr - Expression of the new less-equal constraint.
rhs - Upper bound of the new less-equal constraint.
name - Name assigned to the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.

addLe

public IloRange addLe(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 <= e2, and is added to the invoking IloModel.
Parameters:
e1 - Left-hand side expression of the new less-equal constraint.
e2 - Right-hand side expression of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.

addLe

public IloRange addLe(IloNumExpr e1,
                      IloNumExpr e2,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 <= e2, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new less-equal constraint.
e2 - Right-hand side expression of the new less-equal constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.

addLe

public IloRange addLe(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val <= expr, and is added to the invoking IloModel.
Parameters:
val - Value of the new less-equal constraint.
expr - Expression of the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= exp.

addLe

public IloRange addLe(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val <= expr, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
val - Value of the new less-equal constraint.
expr - Expression of the new less-equal constraint.
name - Name assigned to the new less-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.

addGe

public IloRange addGe(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr >= rhs, and is added to the invoking IloModel.
Parameters:
expr - Expression of the new greater-equal constraint.
rhs - Upper bound of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.

addGe

public IloRange addGe(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint expr >= rhs, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
expr - Expression of the new greater-equal constraint.
rhs - Upper bound of the new greater-equal constraint.
name - Name assigned to the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.

addGe

public IloRange addGe(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 >= e2, and is added to the invoking IloModel.
Parameters:
e1 - Left-hand side expression of the new greater-equal constraint.
e2 - Right-hand side expression of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.

addGe

public IloRange addGe(IloNumExpr e1,
                      IloNumExpr e2,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint e1 >= e2, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
e1 - Left-hand side expression of the new greater-equal constraint.
e2 - Right-hand side expression of the new greater-equal constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.

addGe

public IloRange addGe(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val >= expr, and is added to the invoking IloModel.
Parameters:
val - Value of the new greater-equal constraint.
expr - Expression of the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.

addGe

public IloRange addGe(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint val >= expr, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
val - Value of the new greater-equal constraint.
expr - Expression of the new greater-equal constraint.
name - Name assigned to the new greater-equal constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.

addRange

public IloRange addRange(double lb,
                         IloNumExpr expr,
                         double ub)
                  throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint lb <= expr <= ub, and is added to the invoking lb <= expr <= ub.
Parameters:
lb - Lower bound of the new IloRange constraint.
expr - Expression of the new IloRange constraint.
ub - Upper bound of the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint lb <= expr <= ub.

addRange

public IloRange addRange(double lb,
                         IloNumExpr expr,
                         double ub,
                         java.lang.String name)
                  throws IloException
Creates and returns an IloRange object. The new IloRange object is initialized to represent the constraint lb <= expr <= ub, and is added to the invoking IloModel. The new IloRange object is assigned the name name.
Parameters:
lb - Lower bound of the new IloRange constraint.
expr - Expression of the new IloRange constraint.
ub - Upper bound of the new IloRange constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint lb <= expr <= ub.

maximize

public IloObjective maximize(IloNumExpr expr)
                      throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to maximize the expression expr.
Parameters:
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.

maximize

public IloObjective maximize(IloNumExpr expr,
                             java.lang.String name)
                      throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to maximize the expression expr and is assigned the name name.
Parameters:
expr - Expression to maximize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to maximize expr.

minimize

public IloObjective minimize(IloNumExpr expr)
                      throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to minimize the expression expr.
Parameters:
expr - Expression to minimize.
Returns:
An IloObjective object representing the objective to minimize expr.

minimize

public IloObjective minimize(IloNumExpr expr,
                             java.lang.String name)
                      throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to minimize the expression expr and is assigned the name name.
Parameters:
expr - Expression to minimize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to minimize expr.

objective

public IloObjective objective(IloObjectiveSense sense,
                              IloNumExpr expr)
                       throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to optimize the expression expr with respect to the optimization sense sense.
Parameters:
sense - Optimization sense.
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.

objective

public IloObjective objective(IloObjectiveSense sense,
                              IloNumExpr expr,
                              java.lang.String name)
                       throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to optimize the expression expr with respect to the optimization sense sense and is assigned the name name.
Parameters:
sense - Optimization sense.
expr - Expression to maximize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to maximize expr.

addMaximize

public IloObjective addMaximize(IloNumExpr expr)
                         throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to maximize the expression expr. The new objective is added to the invoking model.
Parameters:
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.

addMaximize

public IloObjective addMaximize(IloNumExpr expr,
                                java.lang.String name)
                         throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to maximize the expression expr and is assigned the name name. The new objective is added to the invoking model.
Parameters:
expr - Expression to maximize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to maximize expr.

addMinimize

public IloObjective addMinimize(IloNumExpr expr)
                         throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to minimize the expression expr. The new objective is added to the invoking model.
Parameters:
expr - Expression to minimize.
Returns:
An IloObjective object representing the objective to minimize expr.

addMinimize

public IloObjective addMinimize(IloNumExpr expr,
                                java.lang.String name)
                         throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to minimize the expression expr and is assigned the name name. The new objective is added to the invoking model.
Parameters:
expr - Expression to minimize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to minimize expr.

addObjective

public IloObjective addObjective(IloObjectiveSense sense,
                                 IloNumExpr expr)
                          throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to optimize the expression expr with respect to the optimization sense sense. The new objective is added to the invoking model.
Parameters:
sense - Optimization sense.
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.

addObjective

public IloObjective addObjective(IloObjectiveSense sense,
                                 IloNumExpr expr,
                                 java.lang.String name)
                          throws IloException
Creates and returns an IloObjective object. The IloObjective object represents an objective to optimize the expression expr with respect to the optimization sense sense and is assigned the name name. The new objective is added to the invoking model.
Parameters:
sense - Optimization sense.
expr - Expression to maximize.
name - Name assigned to the new IloObjective object.
Returns:
An IloObjective object representing the objective to maximize expr.