ilog.concert
Interface IloModeler

All Superinterfaces:
IloAddable, IloModel
All Known Subinterfaces:
IloMPModeler
All Known Implementing Classes:
IloCplexModeler

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.

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 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
 IloIntExpr abs(IloIntExpr e)
          Creates and returns the new integer expression abs(e), the absolute value of its argument.
 IloRange addEq(double val, IloNumExpr expr)
          Creates and returns an instance of IloRange initialized to represent the constraint val == expr and added to the invoking instance of IloModeler.
 IloRange addEq(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val == expr and added to the invoking instance of IloModeler.
 IloRange addEq(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs, and added to the invoking IloModel.
 IloRange addEq(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs, and added to the invoking instance of IloModeler.
 IloConstraint addEq(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2, and added to the invoking instance of IloModeler.
 IloConstraint addEq(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2, and added to the invoking instance of IloModeler.
 IloRange addGe(double val, IloNumExpr expr)
          Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and added to the invoking instance of IloModeler.
 IloRange addGe(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and added to the invoking instance of IloModeler.
 IloRange addGe(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and added to the invoking instance of IloModeler.
 IloRange addGe(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and added to the invoking instance of IloModeler.
 IloConstraint addGe(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and added to the invoking instance of IloModeler.
 IloConstraint addGe(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and added to the invoking instance of IloModeler.
 IloRange addLe(double val, IloNumExpr expr)
          Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and added to the invoking instance of IloModeler.
 IloRange addLe(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and added to the invoking instance of IloModeler.
 IloRange addLe(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and added to the invoking instance of IloModeler.
 IloRange addLe(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and added to the invoking instance of IloModeler.
 IloConstraint addLe(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2, and added to the invoking instance of IloModeler.
 IloConstraint addLe(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2 and added to the invoking instance of IloModeler.
 IloObjective addMaximize(IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to maximize the expression expr and added to the invoking model.
 IloObjective addMaximize(IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective, representing an objective to maximize the expression expr, assigned the name name, and added to the invoking model.
 IloObjective addMinimize(IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to minimize the expression expr and added to the invoking model.
 IloObjective addMinimize(IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective representing an objective to minimize the expression expr, assigned the name name, and added to the invoking model.
 IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense and added to the invoking model.
 IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense, assigned the name name, and added to the invoking model.
 IloRange addRange(double lb, IloNumExpr expr, double ub)
          Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and added to the invoking instance of IloModeler.
 IloRange addRange(double lb, IloNumExpr expr, double ub, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and added to the invoking instance of IloModeler.
 IloAnd and()
          Creates and returns an empty IloAnd constraint suitable for grouping other constraints or building logical constraints.
 IloAnd and(IloConstraint[] cons)
          Groups several constraints together.
 IloAnd and(IloConstraint[] cons, int start, int num)
          Groups several constraints together.
 IloAnd and(IloConstraint[] cons, int start, int num, java.lang.String name)
          Groups several constraints together.
 IloAnd and(IloConstraint[] cons, java.lang.String name)
          Groups several constraints together.
 IloAnd and(IloConstraint con1, IloConstraint con2)
          Groups two constraints together.
 IloAnd and(IloConstraint con1, IloConstraint con2, java.lang.String name)
          Groups two constraints together and names the group.
 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) with its 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 c)
          Creates and returns an expression representing the constant term c.
 IloIntExpr constant(int c)
          Creates and returns a new integer constant expression equal to c.
 IloNumExpr diff(double v, IloNumExpr e1)
          Creates and returns an expression representing the difference between the value v and the expression e1.
 IloIntExpr diff(IloIntExpr expr1, IloIntExpr expr2)
          Creates and returns an integer expression representing the difference between the integer expressions expr1 and expr2.
 IloIntExpr diff(IloIntExpr e, int v)
          Creates and returns an integer expression representing the difference between integer expression e and value v.
 IloNumExpr diff(IloNumExpr e, double v)
          Creates and returns an expression representing the difference between expression e and value v.
 IloNumExpr diff(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an expression representing the difference between the expressions e1 and e2.
 IloIntExpr diff(int v, IloIntExpr e1)
          Creates and returns an integer expression representing the difference between the value v and the integer expression e1.
 IloRange eq(double val, IloNumExpr expr)
          Creates and returns an instance of IloRange initialized to represent the constraint val == expr.
 IloRange eq(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val == expr and assigned the name name.
 IloRange eq(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs.
 IloRange eq(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs and assigned the name name.
 IloConstraint eq(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2.
 IloConstraint eq(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2 and assigned the name name.
 IloRange ge(double val, IloNumExpr expr)
          Creates and returns an instance of IloRange initialized to represent the constraint val >= expr.
 IloRange ge(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and assigned the name name.
 IloRange ge(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs.
 IloRange ge(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and assigned the name name.
 IloConstraint ge(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an IloRange initialized to represent the constraint e1 >= e2.
 IloConstraint ge(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and assigned the name name.
 IloConstraint ifThen(IloConstraint con1, IloConstraint con2)
          Creates and returns a constraint that if con1 is true, then con2 must also be true.
 IloConstraint ifThen(IloConstraint con1, IloConstraint con2, java.lang.String name)
          Creates and returns a constraint that if con1 is true, then con2 must also be true, and it names the new constraint.
 IloIntExpr intExpr()
          Creates and returns an empty integer expression as an 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)
          Creates and 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 instance of IloRange initialized to represent the constraint val <= expr.
 IloRange le(double val, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and assigned the name name.
 IloRange le(IloNumExpr expr, double rhs)
          Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs.
 IloRange le(IloNumExpr expr, double rhs, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and assigned the name name.
 IloConstraint le(IloNumExpr e1, IloNumExpr e2)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2.
 IloConstraint le(IloNumExpr e1, IloNumExpr e2, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2 and assigned the name name.
 IloLinearIntExpr linearIntExpr()
          Creates and returns an integer linear expression initialized as 0 (zero).
 IloLinearIntExpr linearIntExpr(int val)
          Creates and returns an integer linear expression initialized as the constant val.
 IloLinearNumExpr linearNumExpr()
          Creates and returns a zero linear expression.
 IloLinearNumExpr linearNumExpr(double val)
          Creates and returns a linear expression initialized as the constant.
 IloNumExpr max(double val, IloNumExpr e2)
          Creates and returns the new numeric expression max(val, e2).
 IloIntExpr max(IloIntExpr[] e)
          Creates and returns the new integer expression max(e).
 IloIntExpr max(IloIntExpr e1, IloIntExpr e2)
          Creates and returns the new integer expression max(e1, e2).
 IloIntExpr max(IloIntExpr e1, int val)
          Creates and returns the new integer expression max(e1, val).
 IloNumExpr max(IloNumExpr[] e)
          Creates and returns the new numeric expression max(e), the maximum over the array.
 IloNumExpr max(IloNumExpr e1, double val)
          Creates and returns the new numeric expression max(e1, val).
 IloNumExpr max(IloNumExpr e1, IloNumExpr e2)
          Creates and returns the new numeric expression max(e1, e2).
 IloIntExpr max(int val, IloIntExpr e2)
          Creates and returns the new integer expression max(val, e2).
 IloObjective maximize(IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to maximize the expression expr.
 IloObjective maximize(IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective representing an objective to maximize the expression expr and assigned the name name.
 IloNumExpr min(double val, IloNumExpr e2)
          Creates and returns the new numeric expression min(val, e2).
 IloIntExpr min(IloIntExpr[] e)
          Creates and returns the new integer expression min(e).
 IloIntExpr min(IloIntExpr e1, IloIntExpr e2)
          Creates and returns the new integer expression min(e1, e2).
 IloIntExpr min(IloIntExpr e1, int val)
          Creates and returns the new integer expression min(e1, val).
 IloNumExpr min(IloNumExpr[] e)
          Creates and returns the new numeric expression min(e), the minimum over the array.
 IloNumExpr min(IloNumExpr e1, double val)
          Creates and returns the new numeric expression min(e1, val).
 IloNumExpr min(IloNumExpr e1, IloNumExpr e2)
          Creates and returns the new numeric expression min(e1, e2).
 IloIntExpr min(int val, IloIntExpr e2)
          Creates and returns the new integer expression min(val, e2).
 IloObjective minimize(IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to minimize the expression expr.
 IloObjective minimize(IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective representing an objective to minimize the expression expr and assigned the name name.
 IloIntExpr negative(IloIntExpr e)
          Creates and returns the new integer expression -e, the negation of the expression e.
 IloNumExpr negative(IloNumExpr e)
          Creates and returns the new numeric expression -e, the negation of the expression e.
 IloConstraint not(IloConstraint con1)
          Creates and returns a constraint that is the logical negation of its argument.
 IloConstraint not(IloConstraint con1, java.lang.String name)
          Creates and returns a constraint that is the logical negation of its argument and assigns the string name as the name of the returned constraint.
 IloNumExpr numExpr()
          Creates and returns an empty expression.
 IloNumVar numVar(double lb, double ub)
          Creates and returns a new modeling object, a numeric variable of the type IloNumVarType.Float with specified bounds.
 IloNumVar numVar(double lb, double ub, IloNumVarType type)
          Creates and returns a new modeling object, a numeric variable with bounds and type.
 IloNumVar numVar(double lb, double ub, IloNumVarType type, java.lang.String name)
          Creates and returns a new modeling object, a numeric variable with bounds, type, and name.
 IloNumVar numVar(double lb, double ub, java.lang.String name)
          Creates and returns a new modeling ojbect, a numeric variable of the type IloNumVarType.Float with bounds and name.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub)
          Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float with distinct bounds.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type)
          Creates n new modeling objects, numeric variables with distinct bounds and types, and returns them in an array.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name)
          Creates n new modeling objects, numeric variables with distinct bounds, types, and names, and returns them in an array.
 IloNumVar[] numVarArray(int n, double[] lb, double[] ub, java.lang.String[] name)
          Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float with distinct bounds and distinct names.
 IloNumVar[] numVarArray(int n, double lb, double ub)
          Creates and returns an array of length n initialized to n new modeling objects that are numerica variables all of the same type IloNumVarType.Float and same bounds.
 IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type)
          Creates n new modeling objects, numeric variables with the same bounds and type, and returns them in an array.
 IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type, java.lang.String[] name)
          Creates n new modeling objects, numeric variables with the same bounds and type and distinct names, and returns them in an array.
 IloNumVar[] numVarArray(int n, double lb, double ub, java.lang.String[] name)
          Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float.
 IloObjective objective(IloObjectiveSense sense, IloNumExpr expr)
          Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense.
 IloObjective objective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name)
          Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense and assigned the name name.
 IloOr or()
          Creates and returns an empty IloOr constraint for expressing disjunctions.
 IloOr or(IloConstraint[] cons)
          Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons, an array of constraints.
 IloOr or(IloConstraint[] cons, int start, int num)
          Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in the range of indices starting at the index indicated by start and continuing through the number of elements indicated by the number num among the elements of its argument cons, an array of constraints.
 IloOr or(IloConstraint[] cons, int start, int num, java.lang.String name)
          Creates and returns the logical-or of two or more constraints and names the new constraint.
 IloOr or(IloConstraint[] cons, java.lang.String name)
          Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons, an array of constraints.
 IloOr or(IloConstraint con1, IloConstraint con2)
          Creates and returns an or-constraint indicating that at least one and possibly more than one argument is true.
 IloOr or(IloConstraint con1, IloConstraint con2, java.lang.String name)
          Creates and returns an or-constraint indicating that at least one and possibly both of its arguments are true, and it names the new constraint.
 IloNumExpr prod(double v, IloNumExpr e1)
          Creates and returns an expression representing the product of the expression e1 and the value v.
 IloNumExpr prod(double val, IloNumVar var1, IloNumVar var2)
          Creates and returns an expression representing the product of the value val, the variable var1, and the variable var2.
 IloIntExpr prod(IloIntExpr e1, IloIntExpr e2)
          Creates and returns the new integer expression e1 * e2.
 IloIntExpr prod(IloIntExpr e, int v)
          Creates and returns the new integer expression e * v.
 IloNumExpr prod(IloNumExpr e, double v)
          Creates and returns an expression representing the product of the expression e and the value v.
 IloNumExpr prod(IloNumExpr expr1, IloNumExpr expr2)
          Creates and returns an expression representing the product of the expressions expr1 and expr2.
 IloNumExpr prod(IloNumVar var1, double val, IloNumVar var2)
          Creates and returns an expression representing the product of the variable var1, the value val, and the variable var2.
 IloNumExpr prod(IloNumVar var1, IloNumVar var2, double val)
          Creates and returns an expression representing the product of the variable var1, the variable var2, and the value val.
 IloIntExpr prod(int v, IloIntExpr e)
          Creates and returns the new integer expression v * e.
 IloRange range(double lb, IloNumExpr expr, double ub)
          Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub.
 IloRange range(double lb, IloNumExpr expr, double ub, java.lang.String name)
          Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and assigned the name name.
 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].
 IloIntExpr scalProd(IloIntVar[] vars1, IloIntVar[] vars2)
          Creates and returns a linear expression representing the scalar product of the provided variables.
 IloIntExpr scalProd(IloIntVar[] vars1, IloIntVar[] vars2, int start, int num)
          Creates and returns a linear expression representing the scalar product of the variables provided as arguments.
 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].
 IloNumExpr scalProd(IloNumVar[] vars1, IloNumVar[] vars2)
          Creates and returns a linear expression representing the scalar product of the variables provided as arguments.
 IloNumExpr scalProd(IloNumVar[] vars1, IloNumVar[] vars2, int start, int num)
          Creates and returns a linear expression representing the scalar product of the variables provided in vars1[start]...vars1[start+num-1] with the variables prodived in vars2[start]...vars2[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 integer expression e^2.
 IloNumExpr square(IloNumExpr e)
          Creates and returns an expression representing the square of the expression e (that is, e * e).
 IloNumExpr sum(double v, IloNumExpr e)
          Creates and returns an expression representing the sum of a value and a numeric expression.
 IloIntExpr sum(IloIntExpr[] expr)
          Creates and returns an integer expression representing the sum of the expressions provided in the array expr.
 IloIntExpr sum(IloIntExpr[] expr, int start, int num)
          Creates and returns an integer expression representing the sum of the num expressions provided in the array expr starting with element start.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2)
          Adds two integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3)
          Adds three integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4)
          Adds four integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5)
          Adds five integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6)
          Adds six integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7)
          Adds seven integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7, IloIntExpr e8)
          Adds eight integer expressions and returns the sum.
 IloIntExpr sum(IloIntExpr e, int v)
          Creates and returns an integer expression representing the sum of an integer expression and a value.
 IloNumExpr sum(IloNumExpr[] expr)
          Creates and returns an expression representing the sum of the expressions provided as terms in the array expr.
 IloNumExpr sum(IloNumExpr[] expr, int start, int num)
          Creates and returns an expression representing the sum of the num expressions provided as terms in the array expr starting with element start.
 IloNumExpr sum(IloNumExpr e, double v)
          Creates and returns an expression representing the sum of a numeric expression and a value.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2)
          Adds two numeric expressions and returns the sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3)
          Adds three numeric expressions and returns their sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4)
          Adds four numeric expressions and returns the sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5)
          Adds five numeric expressions and returns the sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6)
          Adds six numeric expressions and returns the sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7)
          Adds seven numeric expressions and returns the sum.
 IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7, IloNumExpr e8)
          Adds eight numeric expressions and returns the sum.
 IloIntExpr sum(int v, IloIntExpr e)
          Creates and returns an integer expression representing the sum of a value and an integer expression.
 
Methods inherited from interface ilog.concert.IloModel
add, add, add, iterator, 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 and returns a new modeling object, a numeric variable with bounds, type, and name.

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 numeric variable.
ub - The upper bound of the new numeric variable.
type - The type of the new numeric variable.
name - The name of the new numeric variable.
Returns:
The new numeric variable object.
Throws:
IloException

numVar

public IloNumVar numVar(double lb,
                        double ub,
                        IloNumVarType type)
                 throws IloException
Creates and returns a new modeling object, a numeric variable with bounds and type.

Parameters:
lb - The lower bound of the new numeric variable.
ub - The upper bound of the new numeric variable.
type - The type of the new numeric variable.
Returns:
The new numeric variable object.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               IloNumVarType type)
                        throws IloException
Creates n new modeling objects, numeric variables with the same bounds and type, and returns them in an array.

All variables are created with the same bounds and type.

Parameters:
n - The number of new numeric variables.
lb - The lower bound of the new numeric variables.
ub - The upper bound of the new numeric variables.
type - The type of the new numeric variables.
Returns:
An array containing the n new numeric variables.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               IloNumVarType type,
                               java.lang.String[] name)
                        throws IloException
Creates n new modeling objects, numeric variables with the same bounds and type and distinct names, 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 numeric variables.
ub - The upper bound of the new numeric variables.
type - The type of the new numeric variables.
name - The names of the new numeric variables. Variable i is assigned the name name[i].
Returns:
An array containing the n new numeric variables.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               IloNumVarType[] type,
                               java.lang.String[] name)
                        throws IloException
Creates n new modeling objects, numeric variables with distinct bounds, types, and names, and returns them in an array.

Parameters:
lb - The lower bounds of the new numeric variables. Variable i is constructed with the lower bound lb[i].
ub - The upper bounds of the new numeric variables. Variable i is constructed with the upper bound ub[i].
type - The types of the new numeric variables. Variable i is constructed with the type type[i].
name - The names of the new numeric variables. Variable i is assigned the name name[i].
Returns:
An array containing the n new numeric variables.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               IloNumVarType[] type)
                        throws IloException
Creates n new modeling objects, numeric variables with distinct bounds and types, and returns them in an array.

Parameters:
lb - The lower bounds of the new numeric variables. Variable i is constructed with the lower bound lb[i].
ub - The upper bounds of the new numeric variables. Variable i is constructed with the upper bound ub[i].
type - The types of the new numeric variables. Variable i is constructed with the type type[i].
Returns:
An array containing the n new numeric variables.
Throws:
IloException

numVar

public IloNumVar numVar(double lb,
                        double ub,
                        java.lang.String name)
                 throws IloException
Creates and returns a new modeling ojbect, a numeric variable of the type IloNumVarType.Float with bounds and name.

This method returns an object representing a new numeric 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.
Throws:
IloException

numVar

public IloNumVar numVar(double lb,
                        double ub)
                 throws IloException
Creates and returns a new modeling object, a numeric variable of the type IloNumVarType.Float with specified bounds.

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.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub)
                        throws IloException
Creates and returns an array of length n initialized to n new modeling objects that are numerica variables all of the same type IloNumVarType.Float and same bounds.

This method creates n new modeling objects of the type IloNumVarType.Float. Each new variable has the same specified bounds. The method returns the new variables in an array.

Parameters:
n - Length of the new array; that is, number of new numeric variables.
lb - The lower bound of each new variable.
ub - The upper bound of each new variable.
Returns:
The array new modeling variables.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double lb,
                               double ub,
                               java.lang.String[] name)
                        throws IloException
Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float.

This method creates n new modeling objects of type IloNumVarType.Float. Each new variable has the same specified bounds. Each new variable is assigned a name; variable i is assigned the name name[i]. The method returns the new variables in an array.

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.
Returns:
The array of new modeling variables.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub,
                               java.lang.String[] name)
                        throws IloException
Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float with distinct bounds and distinct names.

This method creates n new modeling objects of the type IloNumVarType.Float. Each new variable has the same specified bounds. Each new variable is assigned a name; Variable i is assigned the name name[i]. The method returns the new variables in an array.

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.
Throws:
IloException

numVarArray

public IloNumVar[] numVarArray(int n,
                               double[] lb,
                               double[] ub)
                        throws IloException
Creates and returns an array of length n initialized to n new modeling objects that are numeric variables of type IloNumVarType.Float with distinct bounds.

This method creates n new modeling objects of the type IloNumVarType.Float, each with its own bounds. Variable i will be constructed with bounds lb[i] and ub[i]. It returns the new variables in an array.

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.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

intVarArray

public IloIntVar[] intVarArray(int n,
                               int min,
                               int max)
                        throws IloException
Creates and 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.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

boolVar

public IloIntVar boolVar(java.lang.String name)
                  throws IloException
Creates and returns a new Boolean variable (domain 0,1) with its name.

Parameters:
name - The name of the variable.
Throws:
IloException

boolVar

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

Throws:
IloException

boolVarArray

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

Throws:
IloException

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].

Throws:
IloException

linearNumExpr

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

Returns:
A zero linear expression.
Throws:
IloException

linearNumExpr

public IloLinearNumExpr linearNumExpr(double val)
                               throws IloException
Creates and returns a linear expression initialized as the constant. val.

Parameters:
val - The constant term of the new linear expression.
Returns:
The linear expression initialized as the constant val.
Throws:
IloException

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:
vars - The variables involved in the new scalar product expression.
coefs - The values involved in the new scalar product expression.
Returns:
The new linear expression.
Throws:
IloException

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 and in vars to use for the scalar product.
num - The number of elements in coefs and in vars to use for the scalar product.
Returns:
The new linear expression.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

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.
Throws:
IloException

scalProd

public IloNumExpr scalProd(IloNumVar[] vars1,
                           IloNumVar[] vars2)
                    throws IloException
Creates and returns a linear expression representing the scalar product of the variables provided as arguments.

Parameters:
vars1 - The first array of variables involved in the new scalar product expression.
vars2 - The second array of variables involved in the new scalar product expression.
Returns:
The new linear expression.
Throws:
IloException

scalProd

public IloNumExpr scalProd(IloNumVar[] vars1,
                           IloNumVar[] vars2,
                           int start,
                           int num)
                    throws IloException
Creates and returns a linear expression representing the scalar product of the variables provided in vars1[start]...vars1[start+num-1] with the variables prodived in vars2[start]...vars2[start+num-1].

This signature of the method allows you to indicate a starting point and a number of consecutive terms for the scalar multiplication. In other words, the entire array vars1 will not be involved in the scalar multiplication. The method will take into account only the term at the starting point and num consecutive terms in total.

Parameters:
vars1 - The first array of variables involved in the new scalar product.
vars2 - The second array of variables involved in the new scalar product.
start - The index of the starting term for the multiplication, that is, the first element to use in the scalar product.
num - The total number of terms in the multiplication; that is, the number of elements in each array to use in the scalar product.
Returns:
The new linear expression.
Throws:
IloException

negative

public IloNumExpr negative(IloNumExpr e)
                    throws IloException
Creates and returns the new numeric expression -e, the negation of the expression e.

Parameters:
e - An expression for which the negative value is given.
Returns:
An expression representing the negation of e.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e,
                      double v)
               throws IloException
Creates and returns an expression representing the sum of a numeric expression and a value.

Parameters:
e - The numeric expression.
v - The value.
Returns:
An expression representing the sum of e + v.
Throws:
IloException

sum

public IloNumExpr sum(double v,
                      IloNumExpr e)
               throws IloException
Creates and returns an expression representing the sum of a value and a numeric expression.

Parameters:
v - The value.
e - The numeric expression.
Returns:
An expression representing the sum of v + e.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Adds two numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3)
               throws IloException
Adds three numeric expressions and returns their sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4)
               throws IloException
Adds four numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
e4 - The fourth numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3 + e4.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5)
               throws IloException
Adds five numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
e4 - The fourth numeric expression.
e5 - The fifth numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3 + e4 + e5.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6)
               throws IloException
Adds six numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
e4 - The fourth numeric expression.
e5 - The fifth numeric expression.
e6 - The sixth numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3 + e4 + e5 + e6.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6,
                      IloNumExpr e7)
               throws IloException
Adds seven numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
e4 - The fourth numeric expression.
e5 - The fifth numeric expression.
e6 - The sixth numeric expression.
e7 - The seventh numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3 + e4 + e5 + e6 + e7.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr e1,
                      IloNumExpr e2,
                      IloNumExpr e3,
                      IloNumExpr e4,
                      IloNumExpr e5,
                      IloNumExpr e6,
                      IloNumExpr e7,
                      IloNumExpr e8)
               throws IloException
Adds eight numeric expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first numeric expression.
e2 - The second numeric expression.
e3 - The third numeric expression.
e4 - The fourth numeric expression.
e5 - The fifth numeric expression.
e6 - The sixth numeric expression.
e7 - The seventh numeric expression.
e8 - The eighth numeric expression.
Returns:
A numeric expression representing the sum of e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr[] expr,
                      int start,
                      int num)
               throws IloException
Creates and returns an expression representing the sum of the num expressions provided as terms in the array expr starting with element start.

Parameters:
expr - An array containing the expressions to be summed.
start - The first term in expr to be used.
num - The number of terms in expr to be used.
Returns:
An expression representing the sum of the specified terms.
Throws:
IloException

sum

public IloNumExpr sum(IloNumExpr[] expr)
               throws IloException
Creates and returns an expression representing the sum of the expressions provided as terms in the array expr.

Parameters:
expr - An array containing the terms to be summed.
Returns:
An expression representing the sum of the specified terms.
Throws:
IloException

diff

public IloNumExpr diff(IloNumExpr e,
                       double v)
                throws IloException
Creates and returns an expression representing the difference between expression e and value v.

Parameters:
e - An expression to use in the difference.
v - A value to subtract.
Returns:
An expression representing the difference e - v.
Throws:
IloException

diff

public IloNumExpr diff(IloNumExpr e1,
                       IloNumExpr e2)
                throws IloException
Creates and returns an expression representing the difference between the expressions e1 and e2.

Parameters:
e1 - An expression to use in the difference.
e2 - An expression to subtract.
Returns:
An expression representing the difference e1 - e2.
Throws:
IloException

diff

public IloNumExpr diff(double v,
                       IloNumExpr e1)
                throws IloException
Creates and returns an expression representing the difference between the value v and the expression e1.

Parameters:
v - A value to use in the difference.
e1 - An expression to subtract.
Returns:
An expression representing the difference v - e1.
Throws:
IloException

prod

public IloNumExpr prod(IloNumExpr e,
                       double v)
                throws IloException
Creates and returns an expression representing the product of the expression e and the value v.

Parameters:
e - An expression to use in the product.
v - A value to add.
Returns:
An expression representing the product e * v.
Throws:
IloException

prod

public IloNumExpr prod(IloNumExpr expr1,
                       IloNumExpr expr2)
                throws IloException
Creates and returns an expression representing the product of the expressions expr1 and expr2.

Parameters:
expr1 - An expression to use in the product.
expr2 - An expression to use in the product.
Returns:
An expression representing the product expr1 * expr2.
Throws:
IloException

prod

public IloNumExpr prod(double v,
                       IloNumExpr e1)
                throws IloException
Creates and returns an expression representing the product of the expression e1 and the value v.

Parameters:
e1 - An expression to use in the product.
v - A value to use in the product.
Returns:
An expression representing the product e1 * v.
Throws:
IloException

prod

public IloNumExpr prod(double val,
                       IloNumVar var1,
                       IloNumVar var2)
                throws IloException
Creates and returns an expression representing the product of the value val, the variable var1, and the variable var2.

Parameters:
val - The value to be used in the product.
var1 - The first variable to be used in the product.
var2 - The second variable to be used in the product.
Returns:
An expression representing the product val * var1 * var2.
Throws:
IloException

prod

public IloNumExpr prod(IloNumVar var1,
                       double val,
                       IloNumVar var2)
                throws IloException
Creates and returns an expression representing the product of the variable var1, the value val, and the variable var2.

Parameters:
var1 - The first variable to be used in the product.
val - The value to be used in the product.
var2 - The second variable to be used in the product.
Returns:
An expression representing the product val * var1 * var2.
Throws:
IloException

prod

public IloNumExpr prod(IloNumVar var1,
                       IloNumVar var2,
                       double val)
                throws IloException
Creates and returns an expression representing the product of the variable var1, the variable var2, and the value val.

Parameters:
var1 - The first variable to be used in the product.
var2 - The second variable to be used in the product.
val - The value to be used in the product.
Returns:
An expression representing the product var1 * var2 * val.
Throws:
IloException

square

public IloNumExpr square(IloNumExpr e)
                  throws IloException
Creates and returns an expression representing the square of the expression e (that is, e * e).

Parameters:
e - An expression to use in the square.
Returns:
An expression representing the product e * e.
Throws:
IloException

constant

public IloNumExpr constant(double c)
                    throws IloException
Creates and returns an expression representing the constant term c.

This method does not need to be called by the user, as overloaded versions of all methods involving expressions are available to deal directly with constants.

Parameters:
c - A value for which to construct a constant expression term.
Returns:
An expression representing the constant c.
Throws:
IloException

numExpr

public IloNumExpr numExpr()
                   throws IloException
Creates and returns an empty expression.

Returns:
An expression.
Throws:
IloException

max

public IloNumExpr max(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns the new numeric expression max(e1, e2).

Throws:
IloException

max

public IloNumExpr max(double val,
                      IloNumExpr e2)
               throws IloException
Creates and returns the new numeric expression max(val, e2).

Throws:
IloException

max

public IloNumExpr max(IloNumExpr e1,
                      double val)
               throws IloException
Creates and returns the new numeric expression max(e1, val).

Throws:
IloException

max

public IloNumExpr max(IloNumExpr[] e)
               throws IloException
Creates and returns the new numeric expression max(e), the maximum over the array.

Parameters:
e - The array of expressions.
Throws:
IloException

min

public IloNumExpr min(IloNumExpr e1,
                      IloNumExpr e2)
               throws IloException
Creates and returns the new numeric expression min(e1, e2).

Throws:
IloException

min

public IloNumExpr min(double val,
                      IloNumExpr e2)
               throws IloException
Creates and returns the new numeric expression min(val, e2).

Throws:
IloException

min

public IloNumExpr min(IloNumExpr e1,
                      double val)
               throws IloException
Creates and returns the new numeric expression min(e1, val).

Throws:
IloException

min

public IloNumExpr min(IloNumExpr[] e)
               throws IloException
Creates and returns the new numeric expression min(e), the minimum over the array.

Throws:
IloException

linearIntExpr

public IloLinearIntExpr linearIntExpr()
                               throws IloException
Creates and returns an integer linear expression initialized as 0 (zero).

Throws:
IloException

linearIntExpr

public IloLinearIntExpr linearIntExpr(int val)
                               throws IloException
Creates and returns an integer linear expression initialized as the constant val.

Parameters:
val - Constant term of the new linear expression.
Returns:
Integer linear expression initialized as the constant val.
Throws:
IloException

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.
vars - The integer variables involved in the new scalar product
Returns:
The new integer linear expression.
Throws:
IloException

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 and vars to be used for the scalar product.
num - Number of elements in vals and vars to be used for the scalar product.
Returns:
The new integer linear expression.
Throws:
IloException

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.
Throws:
IloException

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 and vars to be used for the scalar product.
num - Number of elements in vals and vars to be used for the scalar product.
Returns:
The new integer linear expression.
Throws:
IloException

scalProd

public IloIntExpr scalProd(IloIntVar[] vars1,
                           IloIntVar[] vars2)
                    throws IloException
Creates and returns a linear expression representing the scalar product of the provided variables.

Parameters:
vars1 - The first array of variables involved in the new scalar product expression.
vars2 - The second array of variables involved in the new scalar product expression.
Returns:
The new linear expression.
Throws:
IloException

scalProd

public IloIntExpr scalProd(IloIntVar[] vars1,
                           IloIntVar[] vars2,
                           int start,
                           int num)
                    throws IloException
Creates and returns a linear expression representing the scalar product of the variables provided as arguments.

Parameters:
vars1 - The first array of variables involved in the new scalar product expression.
vars2 - The second array of variables involved in the new scalar product expression.
start - First element in vars1 and vars2 to be used for the scalar product.
num - Number of elements in vars1 and vars2 to be used for the scalar product.
Returns:
The new linear expression.
Throws:
IloException

negative

public IloIntExpr negative(IloIntExpr e)
                    throws IloException
Creates and returns the new integer expression -e, the negation of the expression e.

Parameters:
e - An integer expression for which the negative value is given.
Returns:
An integer expression representing the negation of e.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e,
                      int v)
               throws IloException
Creates and returns an integer expression representing the sum of an integer expression and a value.

Parameters:
e - The integer expression.
v - The value.
Returns:
An integer expression representing the sum e + v.
Throws:
IloException

sum

public IloIntExpr sum(int v,
                      IloIntExpr e)
               throws IloException
Creates and returns an integer expression representing the sum of a value and an integer expression.

Parameters:
v - The value.
e - The integer expression.
Returns:
An integer expression representing the sum e + v.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2)
               throws IloException
Adds two integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
Returns:
An integer expression representing the sum e1 + e2.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3)
               throws IloException
Adds three integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
Returns:
The expression exp, representing the sum e1 +e2 +e3.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4)
               throws IloException
Adds four integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
e4 - The fourth integer expression.
Returns:
The expression exp, representing the sum e1 + e2 + e3 +e 4.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5)
               throws IloException
Adds five integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
e4 - The fourth integer expression.
e5 - The fifth integer expression.
Returns:
The expression exp, representing the sum e1 + e2 + e3 + e4 + e5.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6)
               throws IloException
Adds six integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
e4 - The fourth integer expression.
e5 - The fifth integer expression.
e6 - The sixth integer expression.
Returns:
The expression exp, representing the sum e1 + e2 + e3 + e4 + e5 + e6.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6,
                      IloIntExpr e7)
               throws IloException
Adds seven integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
e4 - The fourth integer expression.
e5 - The fifth integer expression.
e6 - The sixth integer expression.
e7 - The seventh integer expression.
Returns:
The expression exp, representing the sum e1 + e2 + e3 + e4 + e5 + e6 + e7.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr e1,
                      IloIntExpr e2,
                      IloIntExpr e3,
                      IloIntExpr e4,
                      IloIntExpr e5,
                      IloIntExpr e6,
                      IloIntExpr e7,
                      IloIntExpr e8)
               throws IloException
Adds eight integer expressions and returns the sum.

The domain of the resulting expression is computed from the domains of the combined expressions.

Parameters:
e1 - The first integer expression.
e2 - The second integer expression.
e3 - The third integer expression.
e4 - The fourth integer expression.
e5 - The fifth integer expression.
e6 - The sixth integer expression.
e7 - The seventh integer expression.
e8 - The eighth integer expression.
Returns:
The expression exp, representing the sum e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr[] expr,
                      int start,
                      int num)
               throws IloException
Creates and returns an integer expression representing the sum of the num expressions provided in the array expr starting with element start.

Parameters:
expr - An array containing the expressions to be summed.
start - The first expression in expr to be used.
num - The number of expressions in expr to be used.
Returns:
An integer expression representing the sum of the specified expressions.
Throws:
IloException

sum

public IloIntExpr sum(IloIntExpr[] expr)
               throws IloException
Creates and returns an integer expression representing the sum of the expressions provided in the array expr.

Parameters:
expr - An array containing the expressions to be summed.
Returns:
An integer expression representing the sum of the specified expressions.
Throws:
IloException

diff

public IloIntExpr diff(IloIntExpr e,
                       int v)
                throws IloException
Creates and returns an integer expression representing the difference between integer expression e and value v.

Parameters:
e - An integer expression to use in the difference.
v - A value to subtract
Returns:
An integer expression representing the difference e - v.
Throws:
IloException

diff

public IloIntExpr diff(IloIntExpr expr1,
                       IloIntExpr expr2)
                throws IloException
Creates and returns an integer expression representing the difference between the integer expressions expr1 and expr2.

Parameters:
expr1 - An integer expression to use in the difference.
expr2 - An integer expression to subtract.
Returns:
An integer expression representing the difference expr1 - expr2.
Throws:
IloException

diff

public IloIntExpr diff(int v,
                       IloIntExpr e1)
                throws IloException
Creates and returns an integer expression representing the difference between the value v and the integer expression e1.

Parameters:
v - A value to use in the difference.
e1 - An integer expression to subtract.
Returns:
An integer expression representing the difference v - e1.
Throws:
IloException

prod

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

Throws:
IloException

prod

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

Throws:
IloException

prod

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

Throws:
IloException

square

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

Throws:
IloException

constant

public IloIntExpr constant(int c)
                    throws IloException
Creates and returns a new integer constant expression equal to c.

Parameters:
c - The value of the constant expression.
Returns:
The constant expression.
Throws:
IloException

intExpr

public IloIntExpr intExpr()
                   throws IloException
Creates and returns an empty integer expression as an object.

Returns:
An empty expression as an object.
Throws:
IloException

max

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

Throws:
IloException

max

public IloIntExpr max(int val,
                      IloIntExpr e2)
               throws IloException
Creates and returns the new integer expression max(val, e2).

Throws:
IloException

max

public IloIntExpr max(IloIntExpr e1,
                      int val)
               throws IloException
Creates and returns the new integer expression max(e1, val).

Throws:
IloException

max

public IloIntExpr max(IloIntExpr[] e)
               throws IloException
Creates and returns the new integer expression max(e).

Parameters:
e - the array of expressions
Throws:
IloException

min

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

Throws:
IloException

min

public IloIntExpr min(int val,
                      IloIntExpr e2)
               throws IloException
Creates and returns the new integer expression min(val, e2).

Throws:
IloException

min

public IloIntExpr min(IloIntExpr e1,
                      int val)
               throws IloException
Creates and returns the new integer expression min(e1, val).

Throws:
IloException

min

public IloIntExpr min(IloIntExpr[] e)
               throws IloException
Creates and returns the new integer expression min(e).

Throws:
IloException

abs

public IloIntExpr abs(IloIntExpr e)
               throws IloException
Creates and returns the new integer expression abs(e), the absolute value of its argument.

Throws:
IloException

eq

public IloConstraint eq(IloNumExpr e1,
                        IloNumExpr e2)
                 throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2.

Parameters:
e1 - Lefthand side expression of the new equality constraint.
e2 - Righthand side expression of the new equality constraint.
Returns:
A new instance of IloRange initialized to represent the constraint e1 == e2.
Throws:
IloException

eq

public IloConstraint eq(IloNumExpr e1,
                        IloNumExpr e2,
                        java.lang.String name)
                 throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2 and assigned the name name.

Parameters:
e1 - Lefthand side expression of the new equality constraint.
e2 - Righthand 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.
Throws:
IloException

eq

public IloRange eq(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an instance of IloRange 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.
Throws:
IloException

eq

public IloRange eq(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs and 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.
Throws:
IloException

eq

public IloRange eq(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an instance of IloRange 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.
Throws:
IloException

eq

public IloRange eq(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val == expr and 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.
Throws:
IloException

le

public IloRange le(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs.

Parameters:
expr - Expression of the new less-than-or-equal-to constraint.
rhs - Upper bound of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.
Throws:
IloException

le

public IloRange le(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and assigned the name name.

Parameters:
expr - Expression of the new less-than-or-equal-to constraint.
rhs - Upper bound of the new less-than-or-equal-to constraint.
name - Name assigned to the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.
Throws:
IloException

le

public IloConstraint le(IloNumExpr e1,
                        IloNumExpr e2)
                 throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2.

Parameters:
e1 - Lefthand side expression of the new less-than-or-equal-to constraint.
e2 - Righthand side expression of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.
Throws:
IloException

le

public IloConstraint le(IloNumExpr e1,
                        IloNumExpr e2,
                        java.lang.String name)
                 throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2 and assigned the name name.

Parameters:
e1 - Lefthand side expression of the new less-than-or-equal-to constraint.
e2 - Righthand side expression of the new less-than-or-equal-to constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.
Throws:
IloException

le

public IloRange le(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val <= expr.

Parameters:
val - Value of the new less-than-or-equal-to constraint.
expr - Expression of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.
Throws:
IloException

le

public IloRange le(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and assigned the name name.

Parameters:
val - Value of the new less-than-or-equal-to constraint.
expr - Expression of the new less-than-or-equal-to constraint.
name - Name assigned to the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.
Throws:
IloException

ge

public IloRange ge(IloNumExpr expr,
                   double rhs)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs.

Parameters:
expr - Expression of the new greater-than-or-equal-to constraint.
rhs - Upper bound of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.
Throws:
IloException

ge

public IloRange ge(IloNumExpr expr,
                   double rhs,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and assigned the name name.

Parameters:
expr - Expression of the new greater-than-or-equal-to constraint.
rhs - Upper bound of the new greater-than-or-equal-to constraint.
name - Name assigned to the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.
Throws:
IloException

ge

public IloConstraint ge(IloNumExpr e1,
                        IloNumExpr e2)
                 throws IloException
Creates and returns an IloRange initialized to represent the constraint e1 >= e2.

Parameters:
e1 - Lefthand side expression of the new greater-than-or-equal-to constraint.
e2 - Righthand side expression of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.
Throws:
IloException

ge

public IloConstraint ge(IloNumExpr e1,
                        IloNumExpr e2,
                        java.lang.String name)
                 throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and assigned the name name.

Parameters:
e1 - Lefthand side expression of the new greater-than-or-equal-to constraint.
e2 - Righthand side expression of the new greater-than-or-equal-to constraint.
name - Name of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.
Throws:
IloException

ge

public IloRange ge(double val,
                   IloNumExpr expr)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val >= expr.

Parameters:
val - Value of the new greater-than-or-equal-to constraint.
expr - Expression of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.
Throws:
IloException

ge

public IloRange ge(double val,
                   IloNumExpr expr,
                   java.lang.String name)
            throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and assigned the name name.

Parameters:
val - Value of the new greater-than-or-equal-to constraint.
expr - Expression of the new greater-than-or-equal-to constraint.
name - Name of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.
Throws:
IloException

range

public IloRange range(double lb,
                      IloNumExpr expr,
                      double ub)
               throws IloException
Creates and returns an instance of IloRange 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.
Throws:
IloException

range

public IloRange range(double lb,
                      IloNumExpr expr,
                      double ub,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and 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.
Throws:
IloException

addEq

public IloRange addEq(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs, and 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.
Throws:
IloException

addEq

public IloRange addEq(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr == rhs, and added to the invoking instance of IloModeler.

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 theconstraint expr == rhs.
Throws:
IloException

addEq

public IloConstraint addEq(IloNumExpr e1,
                           IloNumExpr e2)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2, and added to the invoking instance of IloModeler.

Parameters:
e1 - Lefthand side expression of the new equality constraint.
e2 - Righthand side expression of the new equality constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 == e2.
Throws:
IloException

addEq

public IloConstraint addEq(IloNumExpr e1,
                           IloNumExpr e2,
                           java.lang.String name)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 == e2, and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
e1 - Lefthand side expression of the new equality constraint.
e2 - Righthand 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.
Throws:
IloException

addEq

public IloRange addEq(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val == expr and added to the invoking instance of IloModeler.

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.
Throws:
IloException

addEq

public IloRange addEq(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val == expr and added to the invoking instance of IloModeler.

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.
Throws:
IloException

addLe

public IloRange addLe(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and added to the invoking instance of IloModeler.

Parameters:
expr - Expression of the new less-than-or-equal-to constraint.
rhs - Upper bound of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.
Throws:
IloException

addLe

public IloRange addLe(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr <= rhs and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
expr - Expression of the new less-than-or-equal-to constraint.
rhs - Upper bound of the new less-than-or-equal-to constraint.
name - Name assigned to the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr <= rhs.
Throws:
IloException

addLe

public IloConstraint addLe(IloNumExpr e1,
                           IloNumExpr e2)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2, and added to the invoking instance of IloModeler.

Parameters:
e1 - Lefthand side expression of the new less-than-or-equal-to constraint.
e2 - Righthand side expression of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.
Throws:
IloException

addLe

public IloConstraint addLe(IloNumExpr e1,
                           IloNumExpr e2,
                           java.lang.String name)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 <= e2 and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
e1 - Lefthand side expression of the new less-than-or-equal-to constraint.
e2 - Righthand side expression of the new less-than-or-equal-to constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 <= e2.
Throws:
IloException

addLe

public IloRange addLe(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and added to the invoking instance of IloModeler.

Parameters:
val - Value of the new less-than-or-equal-to constraint.
expr - Expression of the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= exp.
Throws:
IloException

addLe

public IloRange addLe(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val <= expr and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
val - Value of the new less-than-or-equal-to constraint.
expr - Expression of the new less-than-or-equal-to constraint.
name - Name assigned to the new less-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val <= expr.
Throws:
IloException

addGe

public IloRange addGe(IloNumExpr expr,
                      double rhs)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and added to the invoking instance of IloModeler.

Parameters:
expr - Expression of the new greater-than-or-equal-to constraint.
rhs - Upper bound of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.
Throws:
IloException

addGe

public IloRange addGe(IloNumExpr expr,
                      double rhs,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint expr >= rhs and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
expr - Expression of the new greater-than-or-equal-to constraint.
rhs - Upper bound of the new greater-than-or-equal-to constraint.
name - Name of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint expr >= rhs.
Throws:
IloException

addGe

public IloConstraint addGe(IloNumExpr e1,
                           IloNumExpr e2)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and added to the invoking instance of IloModeler.

Parameters:
e1 - Lefthand side expression of the new greater-than-or-equal-to constraint.
e2 - Righthand side expression of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.
Throws:
IloException

addGe

public IloConstraint addGe(IloNumExpr e1,
                           IloNumExpr e2,
                           java.lang.String name)
                    throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint e1 >= e2 and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
e1 - Lefthand side expression of the new greater-than-or-equal-to constraint.
e2 - Righthand side expression of the new greater-than-or-equal-to constraint.
name - Name assigned to the new IloRange constraint.
Returns:
A new IloRange object initialized to represent the constraint e1 >= e2.
Throws:
IloException

addGe

public IloRange addGe(double val,
                      IloNumExpr expr)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and added to the invoking instance of IloModeler.

Parameters:
val - Value of the new greater-than-or-equal-to constraint.
expr - Expression of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.
Throws:
IloException

addGe

public IloRange addGe(double val,
                      IloNumExpr expr,
                      java.lang.String name)
               throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint val >= expr and added to the invoking instance of IloModeler.

The new IloRange object is assigned the name name.

Parameters:
val - Value of the new greater-than-or-equal-to constraint.
expr - Expression of the new greater-than-or-equal-to constraint.
name - Name of the new greater-than-or-equal-to constraint.
Returns:
A new IloRange object initialized to represent the constraint val >= expr.
Throws:
IloException

addRange

public IloRange addRange(double lb,
                         IloNumExpr expr,
                         double ub)
                  throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and added to the invoking instance of IloModeler.

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.
Throws:
IloException

addRange

public IloRange addRange(double lb,
                         IloNumExpr expr,
                         double ub,
                         java.lang.String name)
                  throws IloException
Creates and returns an instance of IloRange initialized to represent the constraint lb <= expr <= ub and added to the invoking instance of IloModeler.

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.
Throws:
IloException

maximize

public IloObjective maximize(IloNumExpr expr)
                      throws IloException
Creates and returns an instance of IloObjective representing an objective to maximize the expression expr.

Parameters:
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.
Throws:
IloException

maximize

public IloObjective maximize(IloNumExpr expr,
                             java.lang.String name)
                      throws IloException
Creates and returns an instance of IloObjective representing an objective to maximize the expression expr and 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.
Throws:
IloException

minimize

public IloObjective minimize(IloNumExpr expr)
                      throws IloException
Creates and returns an instance of IloObjective representing an objective to minimize the expression expr.

Parameters:
expr - Expression to minimize.
Returns:
An IloObjective object representing the objective to minimize expr.
Throws:
IloException

minimize

public IloObjective minimize(IloNumExpr expr,
                             java.lang.String name)
                      throws IloException
Creates and returns an instance of IloObjective representing an objective to minimize the expression expr and 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.
Throws:
IloException

objective

public IloObjective objective(IloObjectiveSense sense,
                              IloNumExpr expr)
                       throws IloException
Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense.

Parameters:
sense - Optimization sense.
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.
Throws:
IloException

objective

public IloObjective objective(IloObjectiveSense sense,
                              IloNumExpr expr,
                              java.lang.String name)
                       throws IloException
Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense and 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.
Throws:
IloException

addMaximize

public IloObjective addMaximize(IloNumExpr expr)
                         throws IloException
Creates and returns an instance of IloObjective representing an objective to maximize the expression expr and added to the invoking model.

Parameters:
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.
Throws:
IloException

addMaximize

public IloObjective addMaximize(IloNumExpr expr,
                                java.lang.String name)
                         throws IloException
Creates and returns an instance of IloObjective, representing an objective to maximize the expression expr, assigned the name name, and 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.
Throws:
IloException

addMinimize

public IloObjective addMinimize(IloNumExpr expr)
                         throws IloException
Creates and returns an instance of IloObjective representing an objective to minimize the expression expr and added to the invoking model.

Parameters:
expr - Expression to minimize.
Returns:
An IloObjective object representing the objective to minimize expr.
Throws:
IloException

addMinimize

public IloObjective addMinimize(IloNumExpr expr,
                                java.lang.String name)
                         throws IloException
Creates and returns an instance of IloObjective representing an objective to minimize the expression expr, assigned the name name, and 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.
Throws:
IloException

addObjective

public IloObjective addObjective(IloObjectiveSense sense,
                                 IloNumExpr expr)
                          throws IloException
Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense and added to the invoking model.

Parameters:
sense - Optimization sense.
expr - Expression to maximize.
Returns:
An IloObjective object representing the objective to maximize expr.
Throws:
IloException

addObjective

public IloObjective addObjective(IloObjectiveSense sense,
                                 IloNumExpr expr,
                                 java.lang.String name)
                          throws IloException
Creates and returns an instance of IloObjective representing an objective to optimize the expression expr with respect to the optimization sense indicated by sense, assigned the name name, and 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.
Throws:
IloException

and

public IloAnd and()
           throws IloException
Creates and returns an empty IloAnd constraint suitable for grouping other constraints or building logical constraints.

Constraints can be added to and removed from the IloAnd constraint by its methods add and remove.

Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint[] cons)
           throws IloException
Groups several constraints together.

Parameters:
cons - The array of constraints to group.
Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint[] cons,
                  java.lang.String name)
           throws IloException
Groups several constraints together.

Parameters:
cons - The array of constraints to group.
name - The name of the resulting and-constraint.
Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint[] cons,
                  int start,
                  int num)
           throws IloException
Groups several constraints together.

Parameters:
cons - The array of constraints to group.
start - Index of the first constraint in the resulting and-constraint.
num - Number of constraints in the resulting and-constraint.
Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint[] cons,
                  int start,
                  int num,
                  java.lang.String name)
           throws IloException
Groups several constraints together.

Parameters:
cons - The array of constraints to group.
start - Index of the first constraint in the resulting and-constraint.
num - Number of constraints in the resulting and-constraint.
name - The name of the and-constraint.
Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint con1,
                  IloConstraint con2)
           throws IloException
Groups two constraints together.

Parameters:
con1 - The first constraint to group.
con2 - The second constraint to group.
Throws:
IloException
See Also:
IloAnd

and

public IloAnd and(IloConstraint con1,
                  IloConstraint con2,
                  java.lang.String name)
           throws IloException
Groups two constraints together and names the group.

Parameters:
con1 - The first constraint to group.
con2 - The second constraint to group.
name - The name of the resulting and-constraint.
Throws:
IloException
See Also:
IloAnd

or

public IloOr or()
         throws IloException
Creates and returns an empty IloOr constraint for expressing disjunctions.

Constraints can be added to and removed from the IloOr constraint by its methods add and remove.

Throws:
IloException
See Also:
IloOr

or

public IloOr or(IloConstraint[] cons)
         throws IloException
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons, an array of constraints.

In other words, it returns the logical-or of two or more constraints.

Throws:
IloException

or

public IloOr or(IloConstraint[] cons,
                java.lang.String name)
         throws IloException
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons, an array of constraints.

In other words, it returns the logical-or of two or more constraints.

It also assigns the string name as the name of that returned constraint.

Throws:
IloException

or

public IloOr or(IloConstraint[] cons,
                int start,
                int num)
         throws IloException
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in the range of indices starting at the index indicated by start and continuing through the number of elements indicated by the number num among the elements of its argument cons, an array of constraints.

In other words, it returns the logical-or of num constraints.

Throws:
IloException

or

public IloOr or(IloConstraint[] cons,
                int start,
                int num,
                java.lang.String name)
         throws IloException
Creates and returns the logical-or of two or more constraints and names the new constraint.

In other words, it returns an or-constraint indicating that at least one and possibly more than one of the elements is true in the range of indices starting at the index indicated by start and continuing through the number of elements indicated by the number num among the elements of its argument cons, an array of constraints.

This method also assigns the string name as the name of the returned constraint.

Throws:
IloException

or

public IloOr or(IloConstraint con1,
                IloConstraint con2)
         throws IloException
Creates and returns an or-constraint indicating that at least one and possibly more than one argument is true.

In other words, it returns the logical-or of two constraints.

Throws:
IloException

or

public IloOr or(IloConstraint con1,
                IloConstraint con2,
                java.lang.String name)
         throws IloException
Creates and returns an or-constraint indicating that at least one and possibly both of its arguments are true, and it names the new constraint.

In other words, it returns the logical-or of two constraints. It also assigns the string name as the name of that returned constraint.

Throws:
IloException

ifThen

public IloConstraint ifThen(IloConstraint con1,
                            IloConstraint con2)
                     throws IloException
Creates and returns a constraint that if con1 is true, then con2 must also be true.

In other words, it returns a conditional constraint based on its arguments.

Throws:
IloException

ifThen

public IloConstraint ifThen(IloConstraint con1,
                            IloConstraint con2,
                            java.lang.String name)
                     throws IloException
Creates and returns a constraint that if con1 is true, then con2 must also be true, and it names the new constraint.

In other words, it returns a conditional constraint based on its arguments. It also assigns the string name as the name of the returned constraint.

Throws:
IloException

not

public IloConstraint not(IloConstraint con1)
                  throws IloException
Creates and returns a constraint that is the logical negation of its argument.

Throws:
IloException

not

public IloConstraint not(IloConstraint con1,
                         java.lang.String name)
                  throws IloException
Creates and returns a constraint that is the logical negation of its argument and assigns the string name as the name of the returned constraint.

Throws:
IloException