|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.cplex.IloCplexModeler
Implements the interface of the math programming modeler and its base interfaces.
Algorithmic methods are implemented in
IloCplex
.
By implementing the modeling methods of IloMPModeler
,
this class makes it possible for you to build models in your Java
application with pure Java objects.
Nested Class Summary | |
static class |
IloCplexModeler.Exception
This class extends the class IloException
by also capturing the CPLEX error code. |
Constructor Summary | |
IloCplexModeler()
|
Method Summary | |
IloIntExpr |
abs(IloIntExpr expr)
Returns an expression representing the absolute value of its argument, the expression specified by expr . |
IloNumExpr |
abs(IloNumExpr expr)
Returns an expression representing the absolute value of its argument, the expression specified by expr . |
IloAddable |
add(IloAddable object)
Adds object to the invoking model. |
IloAddable[] |
add(IloAddable[] objects)
Adds the array of objects to the invoking model. |
IloAddable[] |
add(IloAddable[] objects,
int start,
int num)
Adds part of the array of objects to the invoking model,
starting with the index start and continuing to
the number of objects indicated by num . |
IloRange |
addEq(double v,
IloNumExpr e)
Creates and returns a range initialized to represent the equality of the specified value and expression. |
IloRange |
addEq(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named range initialized to represent the equality of the specified value and expression. |
IloRange |
addEq(IloNumExpr e,
double v)
Creates and returns a range initialized to represent the equality of the specified expression and value. |
IloRange |
addEq(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a named range initialized to represent the equality of the specified expression and value. |
IloConstraint |
addEq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint initialized to represent the equality of the two specified expressions. |
IloConstraint |
addEq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint initialized to represent the equality of the two specified expressions. |
IloRange |
addGe(double v,
IloNumExpr e)
Creates and returns a constraint that the specified value must be greater than or equal to the specified numeric expression. |
IloRange |
addGe(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named constraint that the specified value must be greater than or equal to the specified numeric expression. |
IloRange |
addGe(IloNumExpr e,
double v)
Creates and returns a range representing the constraint that the specified numeric expression must be greater than or equal to the specified value. |
IloRange |
addGe(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a range representing the constraint that the specified numeric expression must be greater than or equal to the specified value. |
IloConstraint |
addGe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint that the first specified numeric expression must be greater than or equal to the second specified numeric expression. |
IloConstraint |
addGe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint that the first specified numeric expression must be greater than or equal to the second specified numeric expression. |
IloRange |
addLe(double v,
IloNumExpr e)
Creates and returns a range forcing the specified value to be less than than or equal to the specified numeric expression. |
IloRange |
addLe(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named range forcing the specified value to be less than than or equal to the specified numeric expression. |
IloRange |
addLe(IloNumExpr e,
double v)
Creates and returns a range forcing the specified numeric expression to be less than than or equal to the specified value. |
IloRange |
addLe(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a named range forcing the specified numeric expression to be less than than or equal to the specified value. |
IloConstraint |
addLe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint forcing the first specified numeric expression to be less than than or equal to the second specified numeric expression. |
IloConstraint |
addLe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint forcing the first specified numeric expression to be less than than or equal to the second specified numeric expression. |
IloLPMatrix |
addLPMatrix()
Creates, returns, and adds an empty LP matrix object to the invoking model. |
IloLPMatrix |
addLPMatrix(java.lang.String name)
Creates, returns, and adds an empty LP matrix object, with the specified name, to the invoking model. |
IloObjective |
addMaximize()
Creates and returns an empty objective function and adds it to the invoking model. |
IloObjective |
addMaximize(IloNumExpr expr)
Creates and returns an objective to maximize the expression and adds it to the invoking model. |
IloObjective |
addMaximize(IloNumExpr expr,
java.lang.String name)
Creates and returns a named objective function and adds it to the invoking model. |
IloObjective |
addMaximize(java.lang.String name)
Creates and returns a named objective function and adds it to the invoking model. |
IloObjective |
addMinimize()
Creates and returns an empty objective function and adds it to the invoking model. |
IloObjective |
addMinimize(IloNumExpr expr)
Creates and returns an objective to minimize the expression and adds it to the invoking model. |
IloObjective |
addMinimize(IloNumExpr expr,
java.lang.String name)
Creates and returns a named objective function and adds it to the invoking model. |
IloObjective |
addMinimize(java.lang.String name)
Creates and returns a named objective function and adds it to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense)
Creates and returns an empty objective function with the specified sense and adds it to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an objective to optimize the expression in the specified sense and adds the objective to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns an objective to optimize the expression with respect to the sense and adds it to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
java.lang.String name)
Creates and returns a named objective function with the specified sense and adds it to the invoking model. |
IloRange |
addRange(double lb,
double ub)
Creates and returns an empty range object with the specified lower and upper bounds. |
IloRange |
addRange(double lb,
double ub,
java.lang.String name)
Creates and returns an empty range object with the specified name and specified lower and upper bounds. |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub)
Creates, returns, and adds to the invoking model a range object with the specified expression as well as upper and lower bounds. |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates, returns, and adds to the invoking model a range object with the specified name, upper and lower bounds, and expression. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val)
Creates a special ordered set (SOS) of type 1 with the specified variables and weights and adds it to the invoking model. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
int start,
int num)
Creates a special ordered set (SOS) of type 1 with the specified variables and weights and adds it to the invoking model. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 1, starting from the specified index and continuing through a number of elements in the array of specified variables and weights, and adds that named SOS1 to the invoking model. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 1 with the specified variables and weights, and adds that SOS1 to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val)
Creates and returns a special ordered set (SOS) of type 2 from the specified array of variables and weights, and adds that SOS2 to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
int start,
int num)
Creates and returns a special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the specified array of variables and weights, and adds that SOS2 to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the specified array of variables and weights, and adds that SOS2 to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 2 from the specified array of variables and weights, and adds that SOS2 to the invoking model. |
void |
addToExpr(IloObjective obj,
IloNumExpr expr)
Adds a numeric experssion to an objective. |
void |
addToExpr(IloRange rng,
IloNumExpr expr)
Adds the specified numeric expression to the specified range. |
IloAnd |
and()
Groups constraints together. |
IloAnd |
and(IloConstraint[] cons)
Groups constraints together. |
IloAnd |
and(IloConstraint[] cons,
int start,
int num)
Groups together part of the constraints in the array cons
starting with the index indicated by start and continuing
to the number of constraints indicated by num . |
IloAnd |
and(IloConstraint[] cons,
int start,
int num,
java.lang.String name)
Groups together part of the constraints from the array cons
starting with the index indicated by start and
continuing to the number of constraints indicated by num . |
IloAnd |
and(IloConstraint[] cons,
java.lang.String name)
Groups constraints together. |
IloAnd |
and(IloConstraint con1,
IloConstraint con2)
Groups together the constraints indicated by its arguments. |
IloAnd |
and(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Groups together the constraints indicated by its arguments and assigns the string name to the group. |
IloIntVar |
boolVar()
Creates and returns a new Boolean variable (domain 0,1). |
IloIntVar |
boolVar(IloColumn column)
Creates and returns a Boolean variable (domain 0, 1) representing a column. |
IloIntVar |
boolVar(IloColumn column,
java.lang.String name)
Creates and returns a Boolean variable (domain 0, 1) representing a column with a name. |
IloIntVar |
boolVar(java.lang.String name)
Creates and returns a new Boolean variable (domain 0,1) with the specified name. |
IloIntVar[] |
boolVarArray(IloColumnArray cols)
Creates and returns an array of Boolean variables (domain 0, 1) representing an array of columns. |
IloIntVar[] |
boolVarArray(IloColumnArray cols,
java.lang.String[] name)
Creates and returns an array of Boolean variables (domain 0, 1) representing an array of named columns. |
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) each with an individually specified name. |
IloColumn |
column(IloLPMatrix lp)
Creates and returns a column from an LP matrix. |
IloColumn |
column(IloLPMatrix lp,
int[] ind,
double[] val)
Creates and returns a column from part of an LP matrix, using the specified indices and values. |
IloColumn |
column(IloLPMatrix lp,
int[] ind,
double[] val,
int start,
int num)
Creates and returns a column suitable for adding a number of variables to an LP matrix, using a number of the specified indices and values, starting from the specified index. |
IloColumn |
column(IloObjective obj,
double val)
Creates and returns a column from the specified objective and value. |
IloColumn |
column(IloRange rng,
double val)
Creates and returns a column from the specified range and value. |
IloColumnArray |
columnArray(IloLPMatrix lp,
int num)
Creates and returns an array of a number of columns from an LP matrix. |
IloColumnArray |
columnArray(IloLPMatrix lp,
int num,
int[][] ind,
double[][] val)
Creates and returns an array of columns suitable for adding new variables as columns in an LP matrix. |
IloColumnArray |
columnArray(IloObjective obj,
double[] val)
Creates and returns an array of columns from the specified objective and array of values. |
IloColumnArray |
columnArray(IloObjective obj,
double[] val,
int start,
int num)
Creates and returns an array of a number of columns, starting from the specified index, of the specified objective and the corresponding array of values. |
IloColumnArray |
columnArray(IloRange rng,
double[] val)
Creates and returns an array of columns from the specified range and array of values. |
IloColumnArray |
columnArray(IloRange rng,
double[] val,
int start,
int num)
Creates and returns an array of a number of columns, starting from the specified index of the range and corresponding array of values. |
IloNumExpr |
constant(double x)
Creates and returns an expression representing a constant term. |
IloIntExpr |
constant(int x)
Creates and returns an integer expression representing a constant integer value. |
IloConversion |
conversion(IloNumVar[] ilovar,
IloNumVarType type)
Converts an array of numeric variables to the specified type. |
IloConversion |
conversion(IloNumVar[] ilovar,
IloNumVarType[] type)
Converts an array of numeric variables to the corresponding specified types. |
IloConversion |
conversion(IloNumVar[] ilovar,
IloNumVarType[] type,
java.lang.String name)
Converts an array of numeric variables, each one converted to the type corresponding to the types in an array of types, and names the conversion object. |
IloConversion |
conversion(IloNumVar[] ilovar,
IloNumVarType type,
java.lang.String name)
Converts an array of numeric variables to the specified type and names the conversion object. |
IloConversion |
conversion(IloNumVar var,
IloNumVarType type)
Converts a numeric variable to a specified type. |
IloConversion |
conversion(IloNumVar var,
IloNumVarType type,
java.lang.String name)
Converts a numeric variable to the specified type and names the converted variable. |
java.util.Iterator |
conversionIterator()
Returns an iterator over all conversion objects in the active model. |
void |
delete(IloCopyable obj)
Deletes a copyable object. |
void |
delete(IloCopyable[] obj)
Deletes an array of copyable objects. |
void |
delete(IloCopyable[] obj,
int beg,
int num)
Deletes a number of copyable objects, starting from the specified index, from an array of copyable objects. |
IloNumExpr |
diff(double v,
IloNumExpr e1)
Creates and returns a numeric expression representing the difference between a value and a numeric expression. |
IloIntExpr |
diff(IloIntExpr e1,
IloIntExpr e2)
Creates and returns an expression representing the difference between two integer expressions. |
IloIntExpr |
diff(IloIntExpr e,
int v)
Creates and returns an integer expression representing the difference between an integer expression and an integer value. |
IloNumExpr |
diff(IloNumExpr e,
double v)
Creates and returns a numeric expression representing the difference between a numeric expression and a value. |
IloNumExpr |
diff(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a numeric expression representing the difference between two numeric expressions. |
IloIntExpr |
diff(int v,
IloIntExpr e1)
Creates and returns an expression representing the difference between a value and an integer expression. |
IloRange |
eq(double v,
IloNumExpr e)
Creates and returns a range forcing the specified value to be equal to the specified numeric expression. |
IloRange |
eq(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named range forcing the specified value to be equal to the specified numeric expression. |
IloRange |
eq(IloNumExpr e,
double v)
Creates and returns a range forcing the specified numeric expression to be equal to the specified value. |
IloRange |
eq(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a named range forcing the specified numeric expression to be equal to the specified value. |
IloConstraint |
eq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint forcing the specified numeric expressions to be equal. |
IloConstraint |
eq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint forcing the specified numeric expressions to be equal. |
IloRange |
ge(double v,
IloNumExpr e)
Creates and returns a range that forces the specified value to be greater than or equal to the specified expression. |
IloRange |
ge(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named range that forces the specified value to be greater than or equal to the specified expression. |
IloRange |
ge(IloNumExpr e,
double v)
Creates and returns a range forcing the specified numeric expression to be greater than or equal to the specified value. |
IloRange |
ge(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a named range forcing the specified numeric expression to be greater than or equal to the specified value. |
IloConstraint |
ge(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint forcing the first specified numeric expression to be greater than or equal to the second specified numeric expression. |
IloConstraint |
ge(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint forcing the first specified numeric expression to be greater than or equal to the second specified numeric expression. |
IloModel |
getModel()
Returns the active model. |
java.lang.String |
getName()
Returns the name of the invoking model, if there is one. |
IloObjective |
getObjective()
Returns the IloObjective object of the
active model, or null if no IloObjective object
is currently in the active model. |
IloConstraint |
ifThen(IloConstraint con1,
IloConstraint con2)
Returns a constraint that if con1 is true, then
con2 must also be true. |
IloConstraint |
ifThen(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Returns a constraint that if con1 is true, then
con2 must also be true. |
IloIntExpr |
intExpr()
Creates and returns an empty integer expression. |
IloIntSet |
intSet(int[] values)
Creates and returns a set of integers populated by values , an array of integers. |
IloIntSet |
intSet(int min,
int max)
Creates and returns a set of integers in which the minimum element is min , the maximum element is
max , and all integers between min and
max are included in the possible set. |
IloIntSetVar[] |
intSetVarArray(int size)
|
IloIntVar |
intVar(IloColumn column,
int lb,
int ub)
Creates and returns an integer variable representing a column with an integer lower and upper bound. |
IloIntVar |
intVar(IloColumn column,
int lb,
int ub,
java.lang.String name)
Creates and returns an integer variable representing a column with an integer lower and upper bound as well as a name. |
IloIntVar |
intVar(int lb,
int ub)
Creates and returns an integer variable with specified upper and lower bound. |
IloIntVar |
intVar(int lb,
int ub,
java.lang.String name)
Creates and returns an integer variable with specified upper bound, lower bound, and name. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int[] lb,
int[] ub)
Creates and returns an array of integer variables representing an array of columns with individually specified integer lower and upper bounds. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int[] lb,
int[] ub,
java.lang.String[] name)
Creates and returns an array of integer variables representing an array of columns with individually specified integer lower and upper bounds as well as individually specified names. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int lb,
int ub)
Creates and returns an array of integer variables representing an array of columns with an integer lower and upper bound. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int lb,
int ub,
java.lang.String[] name)
Creates and returns an array of integer variables representing an array of columns with an integer lower and upper bound as well as individually specified names. |
IloIntVar[] |
intVarArray(int n,
int[] lb,
int[] ub)
Creates and returns an array of integer variables with individually specified upper and lower bounds. |
IloIntVar[] |
intVarArray(int n,
int[] lb,
int[] ub,
java.lang.String[] name)
Creates and returns an array of integer variables each with individually specified upper bound, lower bound, and name. |
IloIntVar[] |
intVarArray(int n,
int lb,
int ub)
Creates and returns an array of integer variables with the same specified upper and lower bound. |
IloIntVar[] |
intVarArray(int n,
int lb,
int ub,
java.lang.String[] name)
Creates and returns an array of integer variables all with the same upper and lower bound, but individually specified names. |
java.util.Iterator |
iterator()
Returns an iterator suitable for the invoking model. |
IloRange |
le(double v,
IloNumExpr e)
Creates and returns a range that forces the specified value to be less than or equal to the specified numeric expression. |
IloRange |
le(double v,
IloNumExpr e,
java.lang.String name)
Creates and returns a named range that forces the specified value to be less than or equal to the specified numeric expression. |
IloRange |
le(IloNumExpr e,
double v)
Creates and returns a range that forces the specified numeric expression to be less than or equal to the specified value. |
IloRange |
le(IloNumExpr e,
double v,
java.lang.String name)
Creates and returns a named range that forces the specified numeric expression to be less than or equal to the specified value. |
IloConstraint |
le(IloNumExpr e1,
IloNumExpr e2)
Creates and returns a constraint that forces the first specified numeric expression to be less than or equal to the second specified numeric expression. |
IloConstraint |
le(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns a named constraint that forces the first specified numeric expression to be less than or equal to the second specified numeric expression. |
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 a constant. |
IloLinearNumExpr |
linearNumExpr()
Creates and returns a zero linear expression. |
IloLinearNumExpr |
linearNumExpr(double val)
Creates and returns a linear expression initialized as the constant. |
IloLPMatrix |
LPMatrix()
Creates and returns an empty LP matrix object. |
IloLPMatrix |
LPMatrix(java.lang.String name)
Creates and returns an empty, named LP matrix object. |
java.util.Iterator |
LPMatrixIterator()
Returns an iterator over all LP matrix objects in the active model. |
IloCopyable |
makeCopy(IloCopyManager copy)
|
IloNumExpr |
max(double expr2,
IloNumExpr expr1)
Returns an expression representing the maximum of its two arguments. |
IloIntExpr |
max(IloIntExpr[] exprs)
Returns an expression representing the maximum of its argument, the elements of an array. |
IloIntExpr |
max(IloIntExpr expr1,
IloIntExpr expr2)
Returns an expression representing the maximum of its two arguments. |
IloIntExpr |
max(IloIntExpr expr1,
int expr2)
Returns an expression representing the maximum of its two arguments. |
IloNumExpr |
max(IloNumExpr[] exprs)
Returns an expression representing the maximum of its argument, the elements of an array. |
IloNumExpr |
max(IloNumExpr expr1,
double expr2)
Returns an expression representing the maximum of its two arguments. |
IloNumExpr |
max(IloNumExpr expr1,
IloNumExpr expr2)
Returns an expression representing the maximum of its two arguments. |
IloIntExpr |
max(int expr1,
IloIntExpr expr2)
Returns an expression representing the maximum of its two arguments. |
IloObjective |
maximize()
Creates and returns an empty maximization objective function. |
IloObjective |
maximize(IloNumExpr expr)
Creates and returns an objective from an expression. |
IloObjective |
maximize(IloNumExpr expr,
java.lang.String name)
Creates and returns a named objective to minimize the expression. |
IloObjective |
maximize(java.lang.String name)
Creates and returns a named empty maximization objective function. |
IloNumExpr |
min(double expr2,
IloNumExpr expr1)
Returns an expression representing the minimum of its two arguments. |
IloIntExpr |
min(IloIntExpr[] exprs)
Returns an expression representing the minimum of its argument, the elements of an array. |
IloIntExpr |
min(IloIntExpr expr1,
IloIntExpr expr2)
Returns an expression representing the minimum of its two arguments. |
IloIntExpr |
min(IloIntExpr expr1,
int expr2)
Returns an expression representing the minimum of its two arguments. |
IloNumExpr |
min(IloNumExpr[] exprs)
Returns an expression representing the minimum of its argument, the elements of an array. |
IloNumExpr |
min(IloNumExpr expr1,
double expr2)
Returns an expression representing the minimum of its two arguments. |
IloNumExpr |
min(IloNumExpr expr1,
IloNumExpr expr2)
Returns an expression representing the minimum of its two arguments. |
IloIntExpr |
min(int expr1,
IloIntExpr expr2)
Returns an expression representing the minimum of its two arguments. |
IloObjective |
minimize()
Creates and returns an empty minimization objective function. |
IloObjective |
minimize(IloNumExpr expr)
Creates and returns an objective from an expression. |
IloObjective |
minimize(IloNumExpr expr,
java.lang.String name)
Creates and returns an objective to minimize the expression. |
IloObjective |
minimize(java.lang.String name)
Creates and returns a named empty minimization objective function. |
void |
needCopy(IloCopyManager.Check check)
|
IloIntExpr |
negative(IloIntExpr e)
Creates and returns a new integer expression representing the negation of its argument. |
IloNumExpr |
negative(IloNumExpr e)
Creates and returns a new numeric expression which is the negation of the original expression. |
IloConstraint |
not(IloConstraint con1)
Returns a constraint that is the logical negation of its argument. |
IloConstraint |
not(IloConstraint con1,
java.lang.String name)
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 numeric variable with specified bounds. |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type)
Creates and returns a numeric variable with bounds and specified type. |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a named numeric variable with bounds and specified type. |
IloNumVar |
numVar(double lb,
double ub,
java.lang.String name)
Creates and returns a numeric variable with specified bounds and name. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub)
Creates and returns a numeric variable representing a column with a specified lower and upper bound. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
IloNumVarType type)
Creates and returns a numeric variable representing a column with specified lower and upper bounds as well as type. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a named numeric variable representing a column with specified lower and upper bounds as well as type. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
java.lang.String name)
Creates and returns a named numeric variable representing representing a column with a specified lower and upper bound. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub)
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as individual types. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as individual types and individual names. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
java.lang.String[] name)
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as names. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub)
Creates and returns an array of numeric variables representing an array of columns with a specified lower and upper bound. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type)
Creates and returns an array of numeric variables representing an array of columns with specified lower and upper bounds as well as type. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of numeric variables representing an array of columns with specified lower and upper bounds as well as a type and individual names. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
java.lang.String[] name)
Creates and returns an array of numeric variables representing an array of columns with a lower and upper bound as well as individually specified names. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub)
Creates an array of numeric variables with individually specified upper and lower bounds. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates and returns an array of numeric variables with individual bounds and types. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns an array of numeric variables, all with individual specified bounds, types, and names. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
java.lang.String[] name)
Creates an array of numeric variables, each with individually specified upper bound, lower bound, and name. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub)
Creates an array of numeric variables, all with the same upper and lower bound. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type)
Creates and returns an array of numeric variables, all with same specified bounds, all of the same type. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of numeric variables, all with same specified bounds, all with same type, and individual names. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
java.lang.String[] name)
Creates an array of numeric variables, all with the same upper and lower bound, but with individually specified names. |
IloObjective |
objective(IloObjectiveSense sense)
Creates and returns an empty objective function with the specified sense. |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an objective from an expression to optimize in the specified sense. |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns a named objective with a sense (maximize or minimize). |
IloObjective |
objective(IloObjectiveSense sense,
java.lang.String name)
Creates and returns a named, empty objective function with the specified sense. |
IloOr |
or()
Returns a constraint 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)
Returns a constraint 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)
Returns a constraint 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)
Returns a constraint 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;
also assigns the string name as the name of
the returned constraint. |
IloOr |
or(IloConstraint[] cons,
java.lang.String name)
Returns a constraint that at least one and possibly more than one of the elements is true in its argument cons , an array
of constraints and also assigns the string name as the
name of that returned constraint. |
IloOr |
or(IloConstraint con1,
IloConstraint con2)
Returns a constraint that at least one and possibly both of its arguments are true. |
IloOr |
or(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Returns a constraint that at least one and possibly both of its arguments are true. |
IloNumExpr |
piecewiseLinear(IloNumExpr expr,
double[] points,
double[] slopes,
double a,
double fa)
Creates and returns a numeric expression representing a piecewise linear function. |
IloNumExpr |
piecewiseLinear(IloNumExpr expr,
double[] points,
int startPoints,
int num,
double[] slopes,
int startSlopes,
double a,
double fa)
Creates and returns a numeric expression representing a piecewise linear function. |
IloNumExpr |
prod(double v,
IloNumExpr e1)
Creates and returns an expression representing the product of a value and a numeric expression. |
IloNumExpr |
prod(double v,
IloNumVar var1,
IloNumVar var2)
Creates and returns an expression representing the product of a value and two numeric variables. |
IloIntExpr |
prod(IloIntExpr e1,
IloIntExpr e2)
Creates and returns an expression representing the product of two integer expressions. |
IloIntExpr |
prod(IloIntExpr e,
int v)
Creates and returns an expression representing the product of an integer expression and a value. |
IloNumExpr |
prod(IloNumExpr e,
double v)
Creates and returns an expression representing the product of a numeric expression and a value. |
IloNumExpr |
prod(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an expression representing the product of two numeric expressions. |
IloNumExpr |
prod(IloNumVar var1,
double v,
IloNumVar var2)
Creates and returns an expression representing the product of a numeric variable, a value, and another numeric variable. |
IloNumExpr |
prod(IloNumVar var1,
IloNumVar var2,
double v)
Creates and returns an expression representing the product of two numeric variables and a value. |
IloIntExpr |
prod(int v,
IloIntExpr e1)
Creates and returns an integer expression representing the product of a value and an integer expression. |
IloRange |
range(double lb,
double ub)
Creates and returns a range with the specified lower and upper bound. |
IloRange |
range(double lb,
double ub,
java.lang.String name)
Creates and returns a named range with the specified lower and upper bound. |
IloRange |
range(double lb,
IloNumExpr expr,
double ub)
Creates and returns a range with the specified lower bound, numeric expression, and upper bound. |
IloRange |
range(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates and returns a named range with the specified lower bound, numeric expression, and upper bound. |
java.util.Iterator |
rangeIterator()
Returns an iterator over all ranges in the active model. |
IloAddable |
remove(IloAddable object)
Removes object from the invoking model. |
IloAddable[] |
remove(IloAddable[] objects)
Removes the array of objects from the invoking model. |
IloAddable[] |
remove(IloAddable[] objects,
int start,
int num)
Removes part of the array of objects from the
invoking model, starting with the index start and
continuing to the number of objects indicated by num . |
IloLinearNumExpr |
scalProd(double[] vals,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearNumExpr |
scalProd(double[] vals,
IloNumVar[] vars,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the values and variables provided in the specified range of indices. |
IloIntExpr |
scalProd(IloIntVar[] vars1,
IloIntVar[] vars2)
Creates and returns a linear expression representing the scalar product of the given variables. |
IloIntExpr |
scalProd(IloIntVar[] vars1,
IloIntVar[] vars2,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the given variables. |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals)
Creates and returns a linear integer expression representing the scalar product of the provided integer variables and integer values. |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals,
int start,
int num)
Creates and returns a linear integer expression representing the scalar product of the provided integer variables and integer values from the specified range of indices. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] vals)
Creates and returns a linear expression representing the scalar product of the provided variables with the provided values. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] vals,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the variables and values provided in the specified range of indices. |
IloNumExpr |
scalProd(IloNumVar[] vars1,
IloNumVar[] vars2)
Creates and returns a linear expression representing the scalar product of the given variables. |
IloNumExpr |
scalProd(IloNumVar[] vars1,
IloNumVar[] vars2,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the given variables. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
int[] vals)
Creates and returns a linear expression representing the scalar product of the numeric variables and integer values provided. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
int[] vals,
int start,
int num)
Creates and returns a new linear expression representing the scalar product of the num variables in vars starting
at element start with the corresponding values in
vals . |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars)
Creates and returns a linear integer expression representing the scalar product of the provided integer values and integer variables. |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars,
int start,
int num)
Creates and returns a linear integer expression representing the scalar product of the provided integer values and integer variables from the specified range of indices. |
IloLinearNumExpr |
scalProd(int[] vals,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the integer values and numeric variables provided. |
IloLinearNumExpr |
scalProd(int[] vals,
IloNumVar[] vars,
int start,
int num)
Creates and returns a new linear expression representing the scalar product of the num values in vals starting
at element start with the corresponding variables in
vars . |
IloSemiContVar |
semiContVar(double lb,
double ub,
IloNumVarType type)
Creates and returns a semi-continuous variable with a specified lower and upper bound and of a specified type. |
IloSemiContVar |
semiContVar(double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a named semi-continuous variable with a specified lower and upper bound and of a specified type. |
IloSemiContVar |
semiContVar(IloColumn column,
double lb,
double ub,
IloNumVarType type)
Creates and returns a semicontinuous variable with a specified lower and upper bound and of a specified type, representing a column. |
IloSemiContVar |
semiContVar(IloColumn column,
double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a named semi-continuous variable with a specified lower and upper bound and of a specified type, representing a column. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates and returns an array of semi-continuous variables with individually specified lower and upper bounds and individually specified types, representing an array of columns. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns an array of named semi-continuous variables with individually specified lower and upper bounds, and individually specified type, representing an array of columns. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type)
Creates and returns an array of semi-continuous variables with a specified lower and upper bound and of a specified type, representing an array of columns. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of named semi-continuous variables with a specified lower and upper bound as well as type, representing an array of columns. |
IloSemiContVar[] |
semiContVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates and returns an array of semi-continuous variables with individually specified lower and upper bounds and individually specified types. |
IloSemiContVar[] |
semiContVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns an array of individually named semi-continuous variables with individually specified lower and upper bounds and individually specified types. |
IloSemiContVar[] |
semiContVarArray(int n,
double lb,
double ub,
IloNumVarType type)
Creates and returns an array of semi-continuous variables with a specified lower and upper bound and of a specified type. |
IloSemiContVar[] |
semiContVarArray(int n,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of individually named semi-continuous variables with a specified lower and upper bound and of a specified type. |
void |
setLinearCoef(IloObjective obj,
double val,
IloNumVar var)
Sets a value as the linear coefficient of the variable in the objective. |
void |
setLinearCoef(IloObjective obj,
IloNumVar var,
double val)
Sets a value as the linear coefficient of the variable in the objective. |
void |
setLinearCoef(IloRange rng,
double val,
IloNumVar var)
Sets the specified value as the linear coefficient of the specified variable in the specified range. |
void |
setLinearCoef(IloRange rng,
IloNumVar var,
double val)
Sets the specified value as the linear coefficient of the specified variable in the specified range. |
void |
setLinearCoefs(IloObjective obj,
double[] val,
IloNumVar[] var)
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective. |
void |
setLinearCoefs(IloObjective obj,
double[] val,
IloNumVar[] var,
int start,
int num)
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective from a starting index for a range of those values and variables. |
void |
setLinearCoefs(IloObjective obj,
IloNumVar[] var,
double[] val)
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective. |
void |
setLinearCoefs(IloObjective obj,
IloNumVar[] var,
double[] val,
int start,
int num)
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective from a starting index for a range of those values and variables. |
void |
setLinearCoefs(IloRange rng,
double[] val,
IloNumVar[] var)
Sets the array of specified values as the linear coefficients of the specified array of variables in the specified range. |
void |
setLinearCoefs(IloRange rng,
double[] val,
IloNumVar[] var,
int start,
int num)
Sets a number of the array of specified values, from a starting index, as the linear coefficients of the corresponding part of the array of variables in the specified range. |
void |
setLinearCoefs(IloRange rng,
IloNumVar[] var,
double[] val)
Sets the array of specified values as the linear coefficients of the specified array of variables in the specified range. |
void |
setLinearCoefs(IloRange rng,
IloNumVar[] var,
double[] val,
int start,
int num)
Sets a number of the array of specified values, from a starting index, as the linear coefficients of the corresponding part of the array of variables in the specified range. |
void |
setModel(IloModel model)
Sets model as the active model. |
void |
setName(java.lang.String str)
Sets str as the name of the invoking model. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val)
Creates and returns a special ordered set (SOS) of type 1 from the specified array of variables and weights. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
int start,
int num)
Creates and returns a special ordered set (SOS) of type 1 consisting of a number of elements from the specified starting index of the specified array of variables and weights. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 1 consisting of a number of elements from the specified starting index of the specified array of variables and weights. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 1 from the specified array of variables and weights. |
java.util.Iterator |
SOS1iterator()
Returns an iterator over all SOS1 objects in the active model. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val)
Creates and returns a special ordered set (SOS) of type 2 from the specified array of variables and weights. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
int start,
int num)
Creates and returns a special ordered set (SOS) of type 2 consisting of a number of elements, starting at the specified index, from the specified array of variables and weights. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the array of variables and weights. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates and returns a named special ordered set (SOS) of type 2 from the specified array of variables and weights. |
java.util.Iterator |
SOS2iterator()
Returns an iterator over all SOS2 objects in the active model. |
IloIntExpr |
square(IloIntExpr e)
Creates and returns an integer expression representing the square of an integer expression. |
IloNumExpr |
square(IloNumExpr e)
Creates and returns an expression representing the square of a numeric expression. |
IloNumExpr |
sum(double v,
IloNumExpr e1)
Creates and returns a numeric expression representing the sum of a value and a numeric expression. |
IloIntExpr |
sum(IloIntExpr[] expr)
Creates and returns an integer expression that is the sum of the elements in an array of integer expressions. |
IloIntExpr |
sum(IloIntExpr[] expr,
int start,
int num)
Creates and returns an integer expression that is the sum of a number of expressions, starting from the specified index, of an array of integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2)
Creates and returns an integer expression representing the sum of two integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3)
Creates and returns an integer expression representing the sum of three integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3,
IloIntExpr expr4)
Creates and returns an integer expression representing the sum of four integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3,
IloIntExpr expr4,
IloIntExpr expr5)
Creates and returns an integer expression representing the sum of five integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3,
IloIntExpr expr4,
IloIntExpr expr5,
IloIntExpr expr6)
Creates and returns an integer expression representing the sum of six integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3,
IloIntExpr expr4,
IloIntExpr expr5,
IloIntExpr expr6,
IloIntExpr expr7)
Creates and returns an integer expression representing the sum of seven integer expressions. |
IloIntExpr |
sum(IloIntExpr expr1,
IloIntExpr expr2,
IloIntExpr expr3,
IloIntExpr expr4,
IloIntExpr expr5,
IloIntExpr expr6,
IloIntExpr expr7,
IloIntExpr expr8)
Creates and returns an integer expression representing the sum of eight integer expressions. |
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 a numeric expression that is the sum of the elements in an array of numeric expressions. |
IloNumExpr |
sum(IloNumExpr[] expr,
int start,
int num)
Creates and returns a numeric expression that is the sum of a number of expressions, starting from the specified index, of an array of numeric expressions. |
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)
Creates and returns an expression representing the sum of two numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3)
Creates and returns a numeric expression representing the sum of three numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3,
IloNumExpr expr4)
Creates and returns a numeric expression representing the sum of four numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3,
IloNumExpr expr4,
IloNumExpr expr5)
Creates and returns a numeric expression representing the sum of five numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3,
IloNumExpr expr4,
IloNumExpr expr5,
IloNumExpr expr6)
Creates and returns a numeric expression representing the sum of six numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3,
IloNumExpr expr4,
IloNumExpr expr5,
IloNumExpr expr6,
IloNumExpr expr7)
Creates and returns a numeric expression representing the sum of seven numeric expressions. |
IloNumExpr |
sum(IloNumExpr expr1,
IloNumExpr expr2,
IloNumExpr expr3,
IloNumExpr expr4,
IloNumExpr expr5,
IloNumExpr expr6,
IloNumExpr expr7,
IloNumExpr expr8)
Creates and returns a numeric expression representing the sum of eight numeric expressions. |
IloIntExpr |
sum(int v,
IloIntExpr e1)
Creates and returns an integer expression representing the sum of a value and an integer expression. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IloCplexModeler()
Method Detail |
public java.lang.String toString()
public IloModel getModel() throws IloException
Returns the active model.
getModel
in interface IloMPModeler
IloException
public void setModel(IloModel model) throws IloException
Sets model
as the active model.
setModel
in interface IloMPModeler
IloException
public java.lang.String getName()
Returns the name of the invoking model, if there is one.
getName
in interface IloAddable
public void setName(java.lang.String str)
Sets str
as the name of the invoking model.
See IloAddable.setName(String)
setName
in interface IloAddable
str
- The name assigned to the invoking modeling object.
null
can be passed as argument to remove an assigned
name from the invoking modeling object.public IloAddable add(IloAddable object) throws IloException
Adds object
to the invoking model.
add
in interface IloModel
object
- The modeling object to be added to the
invoking IloModel
.
IloException
public IloAddable[] add(IloAddable[] objects) throws IloException
Adds the array of objects
to the invoking model.
See IloModel.add(IloAddable[])
add
in interface IloModel
objects
- The array of modeling objects to be added to the
invoking IloModel
.
IloException
public IloAddable[] add(IloAddable[] objects, int start, int num) throws IloException
Adds part of the array of objects
to the invoking model,
starting with the index start
and continuing to
the number of objects indicated by num
.
See IloModel.add(IloAddable[], int, int)
add
in interface IloModel
objects
- The array of modeling objects to be added
to the invoking IloModel
.start
- The first modeling object to be added to the
invoking IloModel
.num
- The number of modeling objects to be added to
the invoking IloModel
.
IloException
public IloAddable remove(IloAddable object) throws IloException
Removes object
from the invoking model.
See IloModel.remove(IloAddable)
remove
in interface IloModel
object
- The modeling object to be removed from the invoking
IloModel
.
IloException
public IloAddable[] remove(IloAddable[] objects) throws IloException
Removes the array of objects
from the invoking model.
See IloModel.remove(IloAddable[])
IloException
public IloAddable[] remove(IloAddable[] objects, int start, int num) throws IloException
Removes part of the array of objects
from the
invoking model, starting with the index start
and
continuing to the number of objects indicated by num
.
See IloModel.remove(IloAddable[], int, int)
IloException
public java.util.Iterator iterator()
Returns an iterator suitable for the invoking model.
iterator
in interface IloModel
public IloNumVar numVar(double lb, double ub, IloNumVarType type) throws IloException
Creates and returns a numeric variable with bounds and specified type.
See IloModeler.numVar(double, double, IloNumVarType)
numVar
in interface IloModeler
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.
IloException
public IloNumVar numVar(double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
Creates and returns a named numeric variable with bounds and specified type.
See IloModeler.numVar(double, double, IloNumVarType, String)
numVar
in interface IloModeler
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.
IloException
public IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns an array of numeric variables, all with same specified bounds, all of the same type.
See IloModeler.numVarArray(int, double, double, IloNumVarType)
numVarArray
in interface IloModeler
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.
n
new numeric variables.
IloException
public IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables, all with same specified bounds, all with same type, and individual names.
See IloModeler.numVarArray(int, double, double, IloNumVarType, String[])
numVarArray
in interface IloModeler
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]
.
n
new numeric variables.
IloException
public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
Creates and returns an array of numeric variables with individual bounds and types.
See IloModeler.numVarArray(int, double[], double[], IloNumVarType[])
.
numVarArray
in interface IloModeler
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]
.
n
new numeric variables.
IloException
public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables, all with individual specified bounds, types, and names.
See IloModeler.numVarArray(int, double[], double[], IloNumVarType[], String[])
numVarArray
in interface IloModeler
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]
.
n
new numeric variables.
IloException
public IloNumVar numVar(double lb, double ub, java.lang.String name) throws IloException
Creates and returns a numeric variable with specified bounds and name.
See IloModeler.numVar(double, double, String)
numVar
in interface IloModeler
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.
IloException
public IloNumVar numVar(double lb, double ub) throws IloException
Creates and returns a numeric variable with specified bounds.
See IloModeler.numVar(double, double)
numVar
in interface IloModeler
lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.
IloException
public IloNumVar[] numVarArray(int n, double lb, double ub) throws IloException
Creates an array of numeric variables, all with the same upper and lower bound.
See IloModeler.numVarArray(int, double, double)
numVarArray
in interface IloModeler
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.
IloException
public IloNumVar[] numVarArray(int n, double[] lb, double[] ub) throws IloException
Creates an array of numeric variables with individually specified upper and lower bounds.
See IloModeler.numVarArray(int, double[], double[])
numVarArray
in interface IloModeler
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]
.
IloException
public IloNumVar[] numVarArray(int n, double lb, double ub, java.lang.String[] name) throws IloException
Creates an array of numeric variables, all with the same upper and lower bound, but with individually specified names.
See IloModeler.numVarArray(int, double, double, String[])
numVarArray
in interface IloModeler
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.
IloException
public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, java.lang.String[] name) throws IloException
Creates an array of numeric variables, each with individually specified upper bound, lower bound, and name.
See IloModeler.numVarArray(int, double[], double[], String[])
numVarArray
in interface IloModeler
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]
.
IloException
public IloIntVar intVar(int lb, int ub, java.lang.String name) throws IloException
Creates and returns an integer variable with specified upper bound, lower bound, and name.
See IloModeler.intVar(int, int, String)
intVar
in interface IloModeler
lb
- The minimum value of the variable.ub
- The maximum value of the variable.name
- The name of the variable.
IloException
public IloIntVar intVar(int lb, int ub) throws IloException
Creates and returns an integer variable with specified upper and lower bound.
See IloModeler.intVar(int, int)
intVar
in interface IloModeler
lb
- The minimum value of the variable.ub
- The maximum value of the variable.
IloException
public IloIntVar[] intVarArray(int n, int lb, int ub) throws IloException
Creates and returns an array of integer variables with the same specified upper and lower bound.
See IloModeler.intVarArray(int, int, int)
intVarArray
in interface IloModeler
lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.
IloException
public IloIntVar[] intVarArray(int n, int[] lb, int[] ub) throws IloException
Creates and returns an array of integer variables with individually specified upper and lower bounds.
See IloModeler.intVarArray(int, int[], int[])
intVarArray
in interface IloModeler
lb
- The lower bounds of the new modeling variable.
Variable i
will be constructed
with a lower bound of min[i]
.ub
- The upper bounds of the new modeling variable.
Variable i
will be constructed
with an upper bound of max[i]
.
IloException
public IloIntVar[] intVarArray(int n, int lb, int ub, java.lang.String[] name) throws IloException
Creates and returns an array of integer variables all with the same upper and lower bound, but individually specified names.
See IloModeler.intVarArray(int, int, int, String[])
intVarArray
in interface IloModeler
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]
.
IloException
public IloIntVar[] intVarArray(int n, int[] lb, int[] ub, java.lang.String[] name) throws IloException
Creates and returns an array of integer variables each with individually specified upper bound, lower bound, and name.
See IloModeler.intVarArray(int, int[], int[], String[])
intVarArray
in interface IloModeler
lb
- The lower bounds of the new modeling variable.
Variable i
will be constructed
with a lower bound of min[i]
.ub
- 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]
.
IloException
public IloIntVar boolVar(java.lang.String name) throws IloException
Creates and returns a new Boolean variable (domain 0,1) with the specified name.
See IloModeler.boolVar(String)
boolVar
in interface IloModeler
name
- The name of the variable.
IloException
public IloIntVar boolVar() throws IloException
Creates and returns a new Boolean variable (domain 0,1).
boolVar
in interface IloModeler
IloException
public IloIntVar[] boolVarArray(int n) throws IloException
Creates and returns an array of n new Boolean variables (domain 0,1).
See IloModeler.boolVarArray(int)
boolVarArray
in interface IloModeler
IloException
public IloIntVar[] boolVarArray(int n, java.lang.String[] name) throws IloException
Creates and returns an array of n new Boolean variables (domain 0,1) each with an individually specified name.
See IloModeler.boolVarArray(int, String[])
boolVarArray
in interface IloModeler
IloException
public IloObjective minimize(IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns an objective to minimize the expression.
See IloModeler.minimize(IloNumExpr, String)
minimize
in interface IloModeler
expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the objective
to minimize expr
.
IloException
public IloObjective maximize(IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns a named objective to minimize the expression.
See IloModeler.maximize(IloNumExpr, String)
maximize
in interface IloModeler
expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the
objective to maximize expr
.
IloException
public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns a named objective with a sense (maximize or minimize).
See IloModeler.objective(IloObjectiveSense, IloNumExpr, String)
objective
in interface IloModeler
sense
- Optimization sense.expr
- Expression to optimize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the objective
to optimize expr
.
IloException
public IloObjective minimize(IloNumExpr expr) throws IloException
Creates and returns an objective from an expression.
See IloModeler.minimize(IloNumExpr)
minimize
in interface IloModeler
expr
- Expression to minimize.
IloObjective
object representing the objective
to minimize expr
.
IloException
public IloObjective maximize(IloNumExpr expr) throws IloException
Creates and returns an objective from an expression.
See IloModeler.maximize(IloNumExpr)
maximize
in interface IloModeler
expr
- Expression to maximize.
IloObjective
object representing the
objective to maximize expr
.
IloException
public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
Creates and returns an objective from an expression to optimize in the specified sense.
See IloModeler.objective(IloObjectiveSense, IloNumExpr)
objective
in interface IloModeler
sense
- Optimization sense.expr
- Expression to optimize.
IloObjective
object representing the objective
to optimize expr
.
IloException
public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns an objective to optimize the expression with respect to the sense and adds it to the invoking model.
See IloModeler.addObjective(IloObjectiveSense, IloNumExpr, String)
addObjective
in interface IloModeler
sense
- Optimization sense.expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the objective
to maximize expr
.
IloException
public IloObjective addMinimize(IloNumExpr expr) throws IloException
Creates and returns an objective to minimize the expression and adds it to the invoking model.
See IloModeler.addMinimize(IloNumExpr)
addMinimize
in interface IloModeler
expr
- Expression to minimize.
IloObjective
object representing
the objective to minimize expr
.
IloException
public IloObjective addMaximize(IloNumExpr expr) throws IloException
Creates and returns an objective to maximize the expression and adds it to the invoking model.
See IloModeler.addMaximize(IloNumExpr)
addMaximize
in interface IloModeler
expr
- Expression to maximize.
IloObjective
object representing the objective
to maximize expr
.
IloException
public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
Creates and returns an objective to optimize the expression in the specified sense and adds the objective to the invoking model.
See IloModeler.addObjective(IloObjectiveSense, IloNumExpr)
addObjective
in interface IloModeler
sense
- Optimization sense.expr
- Expression to maximize.
IloObjective
object representing
the objective to maximize expr
.
IloException
public IloLinearNumExpr linearNumExpr() throws IloException
Creates and returns a zero linear expression.
See IloModeler.linearNumExpr()
linearNumExpr
in interface IloModeler
IloException
public IloLinearNumExpr linearNumExpr(double val) throws IloException
Creates and returns a linear expression initialized as the constant.
See IloModeler.linearNumExpr(double)
linearNumExpr
in interface IloModeler
val
- The constant term of the new linear expression.
val
.
IloException
public IloLinearNumExpr scalProd(double[] vals, IloNumVar[] vars) throws IloException
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables.
See IloModeler.scalProd(double[], IloNumVar[])
scalProd
in interface IloModeler
vals
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, double[] vals) throws IloException
Creates and returns a linear expression representing the scalar product of the provided variables with the provided values.
See IloModeler.scalProd(IloNumVar[], double[])
scalProd
in interface IloModeler
vars
- The variables involved in the new scalar product
expression.vals
- The values involved in the new scalar product
expression.
IloException
public IloLinearNumExpr scalProd(double[] vals, IloNumVar[] vars, int start, int num) throws IloException
Creates and returns a linear expression representing the scalar product of the values and variables provided in the specified range of indices.
See IloModeler.scalProd(double[], IloNumVar[], int, int)
scalProd
in interface IloModeler
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
- 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.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, double[] vals, int start, int num) throws IloException
Creates and returns a linear expression representing the scalar product of the variables and values provided in the specified range of indices.
See IloModeler.scalProd(IloNumVar[], double[], int, int)
scalProd
in interface IloModeler
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
- 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.
IloException
public IloLinearNumExpr scalProd(int[] vals, IloNumVar[] vars) throws IloException
Creates and returns a linear expression representing the scalar product of the integer values and numeric variables provided.
See IloModeler.scalProd(int[], IloNumVar[])
scalProd
in interface IloModeler
vals
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, int[] vals) throws IloException
Creates and returns a linear expression representing the scalar product of the numeric variables and integer values provided.
See IloModeler.scalProd(IloNumVar[], int[])
scalProd
in interface IloModeler
vals
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloLinearIntExpr linearIntExpr(int val) throws IloException
Creates and returns an integer linear expression initialized as a constant.
See IloModeler.linearIntExpr(int)
linearIntExpr
in interface IloModeler
val
- Constant term of the new linear expression.
val
.
IloException
public IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars) throws IloException
Creates and returns a linear integer expression representing the scalar product of the provided integer values and integer variables.
See IloModeler.scalProd(int[], IloIntVar[])
scalProd
in interface IloModeler
vals
- The integer values involved in the new scalar product.vars
- The integer variables involved in the new scalar product
IloException
public IloLinearIntExpr scalProd(IloIntVar[] vars, int[] vals) throws IloException
Creates and returns a linear integer expression representing the scalar product of the provided integer variables and integer values.
See IloModeler.scalProd(IloIntVar[], int[])
scalProd
in interface IloModeler
vars
- The integer variables involved in the new scalar product
expression.vals
- The integer values involved in the new scalar product
expression.
IloException
public IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars, int start, int num) throws IloException
Creates and returns a linear integer expression representing the scalar product of the provided integer values and integer variables from the specified range of indices.
See IloModeler.scalProd(int[], IloIntVar[], int, int)
scalProd
in interface IloModeler
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.
IloException
public IloLinearIntExpr scalProd(IloIntVar[] vars, int[] vals, int start, int num) throws IloException
Creates and returns a linear integer expression representing the scalar product of the provided integer variables and integer values from the specified range of indices.
See IloModeler.scalProd(IloIntVar[], int[], int, int)
scalProd
in interface IloModeler
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.
IloException
public IloIntExpr scalProd(IloIntVar[] vars1, IloIntVar[] vars2) throws IloException
Creates and returns a linear expression representing the scalar product of the given variables.
scalProd
in interface IloModeler
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.
IloException
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 given variables.
scalProd
in interface IloModeler
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
- Index of the term to start the multiplication.num
- Number of consecutive terms to multiply, starting
from the index indicated by start
.
IloException
public IloNumExpr negative(IloNumExpr e) throws IloException
Creates and returns a new numeric expression which is the negation of the original expression.
See IloModeler.negative(IloNumExpr)
negative
in interface IloModeler
e
- An expression for which the negative value is given.
e
.
IloException
public IloNumExpr sum(IloNumExpr e, double v) throws IloException
Creates and returns an expression representing the sum of a numeric expression and a value.
See IloModeler.sum(IloNumExpr, double)
sum
in interface IloModeler
e
- The numeric expression.v
- The value.
e + v
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns an expression representing the sum of two numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr)
sum
in interface IloModeler
e1
- The first numeric expression.e2
- The second numeric expression.
e1 + e2
.
IloException
public IloNumExpr sum(double v, IloNumExpr e1) throws IloException
Creates and returns a numeric expression representing the sum of a value and a numeric expression.
See IloModeler.sum(double, IloNumExpr)
sum
in interface IloModeler
v
- The value.e1
- The numeric expression.
v + e
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3) throws IloException
Creates and returns a numeric expression representing the sum of three numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr, IloNumExpr)
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.
e1 + e2 + e3
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3, IloNumExpr expr4) throws IloException
Creates and returns a numeric expression representing the sum of four numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr)
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.expr4
- The fourth numeric expression.
e1 + e2 + e3 + e4
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3, IloNumExpr expr4, IloNumExpr expr5) throws IloException
Creates and returns a numeric expression representing the sum of five numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr)
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.expr4
- The fourth numeric expression.expr5
- The fifth numeric expression.
e1 + e2 + e3 + e4 + e5
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3, IloNumExpr expr4, IloNumExpr expr5, IloNumExpr expr6) throws IloException
Creates and returns a numeric expression representing the sum of six numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr)
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.expr4
- The fourth numeric expression.expr5
- The fifth numeric expression.expr6
- The sixth numeric expression.
e1 + e2 + e3 + e4 + e5 + e6
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3, IloNumExpr expr4, IloNumExpr expr5, IloNumExpr expr6, IloNumExpr expr7) throws IloException
Creates and returns a numeric expression representing the sum of seven numeric expressions.
See IloModeler.sum(IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr, IloNumExpr)
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.expr4
- The fourth numeric expression.expr5
- The fifth numeric expression.expr6
- The sixth numeric expression.expr7
- The seventh numeric expression.
e1 + e2 + e3 + e4 + e5 + e6 + e7
.
IloException
public IloNumExpr sum(IloNumExpr expr1, IloNumExpr expr2, IloNumExpr expr3, IloNumExpr expr4, IloNumExpr expr5, IloNumExpr expr6, IloNumExpr expr7, IloNumExpr expr8) throws IloException
Creates and returns a numeric expression representing the sum of eight numeric expressions.
sum
in interface IloModeler
expr1
- The first numeric expression.expr2
- The second numeric expression.expr3
- The third numeric expression.expr4
- The fourth numeric expression.expr5
- The fifth numeric expression.expr6
- The sixth numeric expression.expr7
- The seventh numeric expression.expr8
- The eighth numeric expression.
e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.
IloException
public IloIntExpr diff(IloIntExpr e, int v) throws IloException
Creates and returns an integer expression representing the difference between an integer expression and an integer value.
See IloModeler.diff(IloIntExpr, int)
diff
in interface IloModeler
e
- An integer expression to use in the difference.v
- A value to subtract
e - v
.
IloException
public IloNumExpr diff(IloNumExpr e, double v) throws IloException
Creates and returns a numeric expression representing the difference between a numeric expression and a value.
See IloModeler.diff(IloNumExpr, double)
diff
in interface IloModeler
e
- An expression to use in the difference.v
- A value to subtract.
e - v
.
IloException
public IloNumExpr diff(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a numeric expression representing the difference between two numeric expressions.
See IloModeler.diff(IloNumExpr, IloNumExpr)
diff
in interface IloModeler
e1
- An expression to use in the difference.e2
- An expression to subtract.
e1 - e2
.
IloException
public IloNumExpr diff(double v, IloNumExpr e1) throws IloException
Creates and returns a numeric expression representing the difference between a value and a numeric expression.
See IloModeler.diff(double, IloNumExpr)
diff
in interface IloModeler
v
- A value to use in the difference.e1
- An expression to subtract.
v - e1
.
IloException
public final IloAnd and() throws IloException
Groups constraints together.
See IloModeler.and()
and
in interface IloModeler
IloException
IloAnd
public final IloAnd and(IloConstraint[] cons) throws IloException
Groups constraints together.
See IloModeler.and()
and
in interface IloModeler
cons
- The array of constraints to group.
IloException
IloAnd
public final IloAnd and(IloConstraint[] cons, java.lang.String name) throws IloException
Groups constraints together.
See IloModeler.and()
and
in interface IloModeler
cons
- The array of constraints to group.name
- The name of the resulting and-constraint.
IloException
IloAnd
public final IloAnd and(IloConstraint[] cons, int start, int num) throws IloException
Groups together part of the constraints in the array cons
starting with the index indicated by start
and continuing
to the number of constraints indicated by num
.
See IloModeler.and()
and
in interface IloModeler
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.
IloException
IloAnd
public final IloAnd and(IloConstraint[] cons, int start, int num, java.lang.String name) throws IloException
Groups together part of the constraints from the array cons
starting with the index indicated by start
and
continuing to the number of constraints indicated by num
.
This method assigns the string name
to the group.
See IloModeler.and()
and
in interface IloModeler
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.
IloException
IloAnd
public final IloAnd and(IloConstraint con1, IloConstraint con2) throws IloException
Groups together the constraints indicated by its arguments.
See IloModeler.and()
and
in interface IloModeler
con1
- The first constraint to group.con2
- The second constraint to group.
IloException
IloAnd
public final IloAnd and(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
Groups together the constraints indicated by its arguments and
assigns the string name
to the group.
See IloModeler.and()
and
in interface IloModeler
con1
- The first constraint to group.con2
- The second constraint to group.name
- The name of the resulting and-constraint.
IloException
IloAnd
public final IloOr or() throws IloException
Returns a constraint that at least one and possibly more than one
of the elements is true in its argument cons
, an array
of constraints.
See IloModeler.or()
or
in interface IloModeler
IloException
IloOr
public final IloOr or(IloConstraint[] cons) throws IloException
Returns a constraint that at least one and possibly more than one
of the elements is true in its argument cons
, an array
of constraints.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloOr or(IloConstraint[] cons, java.lang.String name) throws IloException
Returns a constraint that at least one and possibly more than one
of the elements is true in its argument cons
, an array
of constraints and also assigns the string name
as the
name of that returned constraint.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloOr or(IloConstraint[] cons, int start, int num) throws IloException
Returns a constraint 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.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloOr or(IloConstraint[] cons, int start, int num, java.lang.String name) throws IloException
Returns a constraint 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;
also assigns the string name
as the name of
the returned constraint.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloOr or(IloConstraint con1, IloConstraint con2) throws IloException
Returns a constraint that at least one and possibly both of its arguments are true.
In other words, it returns the logical-or of two constraints.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloOr or(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
Returns a constraint that at least one and possibly both of its arguments are true.
In other words, it returns the logical-or of
two constraints. It also assigns the string name
as
the name of that returned constraint.
See IloModeler.or()
or
in interface IloModeler
IloException
public final IloConstraint ifThen(IloConstraint con1, IloConstraint con2) throws IloException
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.
See IloModeler.ifThen(ilog.concert.IloConstraint, ilog.concert.IloConstraint)
ifThen
in interface IloModeler
IloException
public final IloConstraint ifThen(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
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. Also assigns
the string name
as the name of the returned constraint.
See IloModeler.ifThen(ilog.concert.IloConstraint, ilog.concert.IloConstraint)
ifThen
in interface IloModeler
IloException
public final IloConstraint not(IloConstraint con1) throws IloException
Returns a constraint that is the logical negation of its argument.
See IloModeler.not(ilog.concert.IloConstraint)
not
in interface IloModeler
IloException
public final IloConstraint not(IloConstraint con1, java.lang.String name) throws IloException
Returns a constraint that is the logical negation of its argument
and assigns the string name
as the name of the
returned constraint.
See IloModeler.not(ilog.concert.IloConstraint)
not
in interface IloModeler
IloException
public IloIntSet intSet(int min, int max) throws IloException
Creates and returns a set of integers in which the minimum
element is min
, the maximum element is
max
, and all integers between min
and
max
are included in the possible set.
In other words, this method turns an interval of integers into a set of integers. Such a set of integers is useful, for example, in creating variables for which the values are sets of integers (that is, integer set variables).
min
- The minimum possible value in the set.max
- The maximum possible value in the set.
IloException
public IloIntSet intSet(int[] values) throws IloException
Creates and returns a set of integers populated by
values
, an array of integers.
In other words, this method turns an array of integers into a set of integers. Such a set of integers is useful, for example, in creating variables for which the values are sets of integers (that is, integer set variables).
values
- The array of integers to put into the set.
IloException
public IloIntSetVar[] intSetVarArray(int size) throws IloException
IloException
public IloNumExpr prod(double v, IloNumVar var1, IloNumVar var2) throws IloException
Creates and returns an expression representing the product of a value and two numeric variables.
See IloModeler.prod(double, IloNumVar, IloNumVar)
prod
in interface IloModeler
v
- 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.
val * var1 * var2
.
IloException
public IloNumExpr prod(IloNumVar var1, double v, IloNumVar var2) throws IloException
Creates and returns an expression representing the product of a numeric variable, a value, and another numeric variable.
See IloModeler.prod(IloNumVar, double, IloNumVar)
prod
in interface IloModeler
var1
- The first variable to be used in the product.v
- The value to be used in the product.var2
- The second variable to be used in the product.
val * var1 * var2
.
IloException
public IloNumExpr prod(IloNumVar var1, IloNumVar var2, double v) throws IloException
Creates and returns an expression representing the product of two numeric variables and a value.
See IloModeler.prod(IloNumVar, IloNumVar, double)
prod
in interface IloModeler
var1
- The first variable to be used in the product.var2
- The second variable to be used in the product.v
- The value to be used in the product.
var1 * var2 * val
.
IloException
public IloNumExpr prod(IloNumExpr e, double v) throws IloException
Creates and returns an expression representing the product of a numeric expression and a value.
See IloModeler.prod(IloNumExpr, double)
prod
in interface IloModeler
e
- An expression to use in the product.v
- A value to add.
e * v
.
IloException
public IloNumExpr prod(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns an expression representing the product of two numeric expressions.
See IloModeler.prod(IloNumExpr, IloNumExpr)
prod
in interface IloModeler
e1
- An expression to use in the product.e2
- An expression to use in the product.
expr1 * expr2
.
IloException
public IloNumExpr prod(double v, IloNumExpr e1) throws IloException
Creates and returns an expression representing the product of a value and a numeric expression.
See IloModeler.prod(double, IloNumExpr)
prod
in interface IloModeler
e1
- An expression to use in the product.v
- A value to use in the product.
e1 * v
.
IloException
public IloNumExpr square(IloNumExpr e) throws IloException
Creates and returns an expression representing the square of a numeric expression.
See IloModeler.square(IloNumExpr)
square
in interface IloModeler
e
- An expression to use in the square.
e * e
.
IloException
public IloNumExpr constant(double x) throws IloException
Creates and returns an expression representing a constant term.
See IloModeler.constant(double)
constant
in interface IloModeler
x
- A value for which to construct a constant expression term.
c
.
IloException
public IloNumExpr numExpr() throws IloException
Creates and returns an empty expression.
numExpr
in interface IloModeler
IloException
public IloIntExpr negative(IloIntExpr e) throws IloException
Creates and returns a new integer expression representing the negation of its argument.
See IloModeler.negative(IloIntExpr)
negative
in interface IloModeler
e
- An integer expression for which the negative value is given.
e
.
IloException
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.
See IloModeler.sum(IloIntExpr, int)
sum
in interface IloModeler
e
- The integer expression.v
- The value.
e + v
.
IloException
public IloIntExpr sum(int v, IloIntExpr e1) throws IloException
Creates and returns an integer expression representing the sum of a value and an integer expression.
See IloModeler.sum(int, IloIntExpr)
sum
in interface IloModeler
v
- The value.e1
- The integer expression.
e + v
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2) throws IloException
Creates and returns an integer expression representing the sum of two integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.
e1 + e2
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3) throws IloException
Creates and returns an integer expression representing the sum of three integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.
exp
, representing the
sum e1 +e2 +e3
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3, IloIntExpr expr4) throws IloException
Creates and returns an integer expression representing the sum of four integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.expr4
- The fourth integer expression.
exp
, representing the
sum e1 + e2 + e3 +e 4
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3, IloIntExpr expr4, IloIntExpr expr5) throws IloException
Creates and returns an integer expression representing the sum of five integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.expr4
- The fourth integer expression.expr5
- The fifth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3, IloIntExpr expr4, IloIntExpr expr5, IloIntExpr expr6) throws IloException
Creates and returns an integer expression representing the sum of six integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.expr4
- The fourth integer expression.expr5
- The fifth integer expression.expr6
- The sixth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3, IloIntExpr expr4, IloIntExpr expr5, IloIntExpr expr6, IloIntExpr expr7) throws IloException
Creates and returns an integer expression representing the sum of seven integer expressions.
See IloModeler.sum(IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr, IloIntExpr)
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.expr4
- The fourth integer expression.expr5
- The fifth integer expression.expr6
- The sixth integer expression.expr7
- The seventh integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6 + e7
.
IloException
public IloIntExpr sum(IloIntExpr expr1, IloIntExpr expr2, IloIntExpr expr3, IloIntExpr expr4, IloIntExpr expr5, IloIntExpr expr6, IloIntExpr expr7, IloIntExpr expr8) throws IloException
Creates and returns an integer expression representing the sum of eight integer expressions.
sum
in interface IloModeler
expr1
- The first integer expression.expr2
- The second integer expression.expr3
- The third integer expression.expr4
- The fourth integer expression.expr5
- The fifth integer expression.expr6
- The sixth integer expression.expr7
- The seventh integer expression.expr8
- The eighth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.
IloException
public IloIntExpr diff(IloIntExpr e1, IloIntExpr e2) throws IloException
Creates and returns an expression representing the difference between two integer expressions.
See IloModeler.diff(IloIntExpr, IloIntExpr)
diff
in interface IloModeler
e1
- An integer expression to use in the difference.e2
- An integer expression to subtract.
expr1 - expr2
.
IloException
public IloIntExpr diff(int v, IloIntExpr e1) throws IloException
Creates and returns an expression representing the difference between a value and an integer expression.
See IloModeler.diff(int, IloIntExpr)
diff
in interface IloModeler
v
- A value to use in the difference.e1
- An integer expression to subtract.
v - e1
.
IloException
public IloIntExpr prod(IloIntExpr e, int v) throws IloException
Creates and returns an expression representing the product of an integer expression and a value.
See IloModeler.prod(IloIntExpr, int)
prod
in interface IloModeler
IloException
public IloIntExpr prod(IloIntExpr e1, IloIntExpr e2) throws IloException
Creates and returns an expression representing the product of two integer expressions.
See IloModeler.prod(IloIntExpr, IloIntExpr)
prod
in interface IloModeler
IloException
public IloIntExpr prod(int v, IloIntExpr e1) throws IloException
Creates and returns an integer expression representing the product of a value and an integer expression.
See IloModeler.prod(int, IloIntExpr)
prod
in interface IloModeler
IloException
public IloIntExpr square(IloIntExpr e) throws IloException
Creates and returns an integer expression representing the square of an integer expression.
See IloModeler.square(IloIntExpr)
square
in interface IloModeler
IloException
public IloIntExpr constant(int x) throws IloException
Creates and returns an integer expression representing a constant integer value.
constant
in interface IloModeler
x
- The value of the constant expression.
IloException
public IloIntExpr intExpr() throws IloException
Creates and returns an empty integer expression.
intExpr
in interface IloModeler
IloException
public IloNumVar numVar(IloColumn column, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns a numeric variable representing a column with specified lower and upper bounds as well as type.
See IloMPModeler.numVar(IloColumn column, double lb, double ub, IloNumVarType type)
numVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.
IloException
public IloNumVar numVar(IloColumn column, double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
Creates and returns a named numeric variable representing a column with specified lower and upper bounds as well as type.
See IloMPModeler.numVar(IloColumn column, double lb, double ub, IloNumVarType type, String name)
numVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.name
- The name of the new modeling variable.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns an array of numeric variables representing an array of columns with specified lower and upper bounds as well as type.
See IloMPModeler.numVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type)
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining
where to install the new variables.lb
- The lower bound of the new modeling variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables representing an array of columns with specified lower and upper bounds as well as a type and individual names.
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bound of the new modeling variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as individual types.
See IloMPModeler.numVarArray(IloColumnArray cols, double[] lb, double[] ub, IloNumVarType[] type)
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with a
upper bound of ub[i]
.type
- The types of the new modeling variables. Variable
i
is constructed with a type of
type[i]
.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as individual types and individual names.
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with a
upper bound of lb[i]
.type
- The types of the new modeling variables. Variable
i
is
constructed with a type of type[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloNumVar numVar(IloColumn column, double lb, double ub, java.lang.String name) throws IloException
Creates and returns a named numeric variable representing representing a column with a specified lower and upper bound.
See IloMPModeler.numVar(IloColumn column, double lb, double ub, String name)
numVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.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.
IloException
public IloNumVar numVar(IloColumn column, double lb, double ub) throws IloException
Creates and returns a numeric variable representing a column with a specified lower and upper bound.
See IloMPModeler.numVar(IloColumn column, double lb, double ub)
numVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double lb, double ub) throws IloException
Creates and returns an array of numeric variables representing an array of columns with a specified lower and upper bound.
See IloMPModeler.numVarArray(IloColumnArray cols, double lb, double ub)
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bound of the new modeling variables.ub
- The upper bound of the new modeling variables.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double[] lb, double[] ub) throws IloException
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds.
See IloMPModeler.numVarArray(IloColumnArray cols, double[] lb, double[] ub)
numVarArray
in interface IloMPModeler
cols
- IloColumnArray
object defining where to
install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double lb, double ub, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables representing an array of columns with a lower and upper bound as well as individually specified names.
See IloMPModeler.numVarArray(IloColumnArray cols, double lb, double ub, String[] name)
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is assigned lower bound
lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is assigned upper bound
ub[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloNumVar[] numVarArray(IloColumnArray cols, double[] lb, double[] ub, java.lang.String[] name) throws IloException
Creates and returns an array of numeric variables representing an array of columns with individually specified lower and upper bounds as well as names.
See IloMPModeler.numVarArray(IloColumnArray cols, double[] lb, double[] ub, String[] name)
numVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining
where to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloIntVar intVar(IloColumn column, int lb, int ub) throws IloException
Creates and returns an integer variable representing a column with an integer lower and upper bound.
See IloMPModeler.intVar(IloColumn column, int lb, int ub)
intVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.
IloException
public IloIntVar intVar(IloColumn column, int lb, int ub, java.lang.String name) throws IloException
Creates and returns an integer variable representing a column with an integer lower and upper bound as well as a name.
See IloMPModeler.intVar(IloColumn column, int lb, int ub, String name)
intVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.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.
IloException
public IloIntVar[] intVarArray(IloColumnArray cols, int lb, int ub, java.lang.String[] name) throws IloException
Creates and returns an array of integer variables representing an array of columns with an integer lower and upper bound as well as individually specified names.
See IloMPModeler.intVarArray(IloColumnArray cols, int lb, int ub, String[] name)
intVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bound of the new modeling variables.ub
- The upper bound of the new modeling variables.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloIntVar[] intVarArray(IloColumnArray cols, int[] lb, int[] ub, java.lang.String[] name) throws IloException
Creates and returns an array of integer variables representing an array of columns with individually specified integer lower and upper bounds as well as individually specified names.
See IloMPModeler.intVarArray(IloColumnArray cols, int[] lb, int[] ub, String[] name)
intVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variable.
Variable i
is constructed with an
upper bound of ub[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloIntVar[] intVarArray(IloColumnArray cols, int lb, int ub) throws IloException
Creates and returns an array of integer variables representing an array of columns with an integer lower and upper bound.
See IloMPModeler.intVarArray(IloColumnArray cols, int lb, int ub)
intVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bound of the new modeling variables.ub
- The upper bound of the new modeling variables.
IloException
public IloIntVar[] intVarArray(IloColumnArray cols, int[] lb, int[] ub) throws IloException
Creates and returns an array of integer variables representing an array of columns with individually specified integer lower and upper bounds.
See IloMPModeler.intVarArray(IloColumnArray cols, int[] lb, int[] ub)
intVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The lower bounds of the new modeling variables.
Variable i
is constructed with a
lower bound of lb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with a
upper bound of ub[i]
.
IloException
public IloIntVar boolVar(IloColumn column, java.lang.String name) throws IloException
Creates and returns a Boolean variable (domain 0, 1) representing a column with a name.
See IloMPModeler.boolVar(IloColumn column, String name)
boolVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.name
- The name of the new modeling variable.
IloException
public IloIntVar boolVar(IloColumn column) throws IloException
Creates and returns a Boolean variable (domain 0, 1) representing a column.
See IloMPModeler.boolVar(IloColumn column)
boolVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.
IloException
public IloIntVar[] boolVarArray(IloColumnArray cols) throws IloException
Creates and returns an array of Boolean variables (domain 0, 1) representing an array of columns.
See IloMPModeler.boolVarArray(IloColumnArray cols)
boolVarArray
in interface IloMPModeler
cols
- The IloColumnArray
object defining
where to install the new variables.
IloException
public IloIntVar[] boolVarArray(IloColumnArray cols, java.lang.String[] name) throws IloException
Creates and returns an array of Boolean variables (domain 0, 1) representing an array of named columns.
See IloMPModeler.boolVarArray(IloColumnArray cols, String[] name)
boolVarArray
in interface IloMPModeler
cols
- The IloColumnArray
object defining
where to install the new variables.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloNumExpr piecewiseLinear(IloNumExpr expr, double[] points, double[] slopes, double a, double fa) throws IloException
Creates and returns a numeric expression representing a piecewise linear function.
See IloMPModeler.piecewiseLinear(IloNumExpr, double[], double[], double, double)
piecewiseLinear
in interface IloMPModeler
expr
- An expression indicating where to evaluate the
piecewise linear function.points
- An array of breakpoints for the piecewise linear
function.slopes
- An array of slopes for the piecewise linear function.a
- First coordinate of the anchor point of the piecewise
linear function.fa
- Second coordinate of the anchor point of the
piecewise linear function.
expr
.
IloException
public IloNumExpr piecewiseLinear(IloNumExpr expr, double[] points, int startPoints, int num, double[] slopes, int startSlopes, double a, double fa) throws IloException
Creates and returns a numeric expression representing a piecewise linear function.
See IloMPModeler.piecewiseLinear(IloNumExpr, double[], int, int, double[], int, double, double)
piecewiseLinear
in interface IloMPModeler
expr
- An expression indicating where to evaluate the
piecewise linear function.points
- An array containing breakpoints that define the
piecewise linear function.startPoints
- An integer indicating the first element in array
points
to use for the definition
of the breakpoints of the piecewise linear function.num
- The number of breakpoints to use from the array
points
. Thus num+1
elements
of array slopes
are used.slopes
- An array containing the slopes that define the
piecewise linear function.startSlopes
- The first element in array slopes
to use
for the definition of the slopes of the piecewise
linear function.a
- The first coordinate of the anchor point of the
piecewise linear function.fa
- The second coordinate of the anchor point of the
piecewise linear function.
expr
.
IloException
public IloNumExpr abs(IloNumExpr expr) throws IloException
Returns an expression representing the absolute value of its argument,
the expression specified by expr
.
abs
in interface IloMPModeler
IloException
public IloIntExpr abs(IloIntExpr expr) throws IloException
Returns an expression representing the absolute value of its argument,
the expression specified by expr
.
abs
in interface IloModeler
IloException
public IloNumExpr max(IloNumExpr expr1, IloNumExpr expr2) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloNumExpr max(IloNumExpr expr1, double expr2) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloNumExpr max(double expr2, IloNumExpr expr1) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloNumExpr max(IloNumExpr[] exprs) throws IloException
Returns an expression representing the maximum of its argument, the elements of an array.
max
in interface IloModeler
exprs
- The array of expressions.
IloException
public IloIntExpr max(IloIntExpr expr1, IloIntExpr expr2) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloIntExpr max(IloIntExpr expr1, int expr2) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloIntExpr max(int expr1, IloIntExpr expr2) throws IloException
Returns an expression representing the maximum of its two arguments.
max
in interface IloModeler
IloException
public IloIntExpr max(IloIntExpr[] exprs) throws IloException
Returns an expression representing the maximum of its argument, the elements of an array.
max
in interface IloModeler
exprs
- the array of expressions
IloException
public IloNumExpr min(IloNumExpr expr1, IloNumExpr expr2) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloNumExpr min(IloNumExpr expr1, double expr2) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloNumExpr min(double expr2, IloNumExpr expr1) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloNumExpr min(IloNumExpr[] exprs) throws IloException
Returns an expression representing the minimum of its argument, the elements of an array.
min
in interface IloModeler
IloException
public IloIntExpr min(IloIntExpr expr1, IloIntExpr expr2) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloIntExpr min(IloIntExpr expr1, int expr2) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloIntExpr min(int expr1, IloIntExpr expr2) throws IloException
Returns an expression representing the minimum of its two arguments.
min
in interface IloModeler
IloException
public IloIntExpr min(IloIntExpr[] exprs) throws IloException
Returns an expression representing the minimum of its argument, the elements of an array.
min
in interface IloModeler
IloException
public void addToExpr(IloObjective obj, IloNumExpr expr) throws IloException
Adds a numeric experssion to an objective.
See IloMPModeler.addToExpr(IloObjective, IloNumExpr)
addToExpr
in interface IloMPModeler
obj
- The objective to modify.expr
- The new expression to add.
IloException
public void setLinearCoef(IloObjective obj, double val, IloNumVar var) throws IloException
Sets a value as the linear coefficient of the variable in the objective.
See IloMPModeler.setLinearCoef(IloObjective, double, IloNumVar)
setLinearCoef
in interface IloMPModeler
obj
- The objective to modify.val
- The coefficient to set.var
- The variable for which to set the coefficient.
IloException
public void setLinearCoef(IloObjective obj, IloNumVar var, double val) throws IloException
Sets a value as the linear coefficient of the variable in the objective.
See IloMPModeler.setLinearCoef(IloObjective, IloNumVar, double)
setLinearCoef
in interface IloMPModeler
obj
- The objective to modify.var
- The variable for which to set the coefficient.val
- The coefficient to set.
IloException
public void setLinearCoefs(IloObjective obj, double[] val, IloNumVar[] var) throws IloException
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective.
See IloMPModeler.setLinearCoefs(IloObjective, double[], IloNumVar[])
setLinearCoefs
in interface IloMPModeler
obj
- The objective to modify.val
- The array of linear coefficient values. The linear
coefficient of variable var[i]
is set
to val[i]
.var
- The array of variables for which to set linear
coefficients. A variable may only appear once in this
array.
IloException
public void setLinearCoefs(IloObjective obj, IloNumVar[] var, double[] val) throws IloException
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective.
See IloMPModeler.setLinearCoefs(IloObjective, IloNumVar[], double[])
setLinearCoefs
in interface IloMPModeler
obj
- The objective to modify.val
- The array of linear coefficient values. The linear
coefficient of variable var[i]
is set
to val[i]
.var
- The array of variables for which to set linear
coefficients. A variable may only appear once in this
array.
IloException
public void setLinearCoefs(IloObjective obj, double[] val, IloNumVar[] var, int start, int num) throws IloException
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective from a starting index for a range of those values and variables.
See IloMPModeler.setLinearCoefs(IloObjective, double[], IloNumVar[], int, int)
setLinearCoefs
in interface IloMPModeler
obj
- The objective to modify.val
- The array containing linear coefficient values. The
linear coefficient of variable var[i]
is
set to val[i]
.var
- The array containing the variables for which to set
linear coefficients. A variable may only appear once
in this array.start
- The first element in val
and
var
to use for setting coefficients.num
- The number of consecutive elements in val
and var
to use for setting coefficients.
IloException
public void setLinearCoefs(IloObjective obj, IloNumVar[] var, double[] val, int start, int num) throws IloException
Sets an array of values as the corresponding linear coefficients of an array of variables in the objective from a starting index for a range of those values and variables.
See IloMPModeler.setLinearCoefs(IloObjective, IloNumVar[], double[], int, int)
setLinearCoefs
in interface IloMPModeler
obj
- The objective to modify.var
- An array containing the variables for which to set
linear coefficients. A variable may only appear once
in this array.val
- An array containing linear coefficient values. The
linear coefficient of variable var[i]
is
set to val[i]
.start
- The first element in val
and
var
to use for setting coefficients.num
- The number of consecutive elements in val
and var
to use for setting coefficients.
IloException
public IloSemiContVar semiContVar(double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
Creates and returns a named semi-continuous variable with a specified lower and upper bound and of a specified type.
See IloMPModeler.semiContVar(double, double, IloNumVarType, String)
semiContVar
in interface IloMPModeler
lb
- The semi-continuous lower bound of the new modeling
variableub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.name
- The name of the new modeling variable.
IloException
public IloSemiContVar semiContVar(double lb, double ub, IloNumVarType type) throws IloException
Creates and returns a semi-continuous variable with a specified lower and upper bound and of a specified type.
See IloMPModeler.semiContVar(double, double, IloNumVarType)
semiContVar
in interface IloMPModeler
lb
- The semi-continuous lower bound of the new modeling
variableub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.
IloException
public IloSemiContVar semiContVar(IloColumn column, double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
Creates and returns a named semi-continuous variable with a specified lower and upper bound and of a specified type, representing a column.
See IloMPModeler.semiContVar(IloColumn, double, double, IloNumVarType, String)
semiContVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The semi-continuous lower bound of the new modeling
variable.ub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.name
- The name of the new modeling variable.
IloException
public IloSemiContVar semiContVar(IloColumn column, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns a semicontinuous variable with a specified lower and upper bound and of a specified type, representing a column.
See IloMPModeler.semiContVar(IloColumn, double, double, IloNumVarType)
semiContVar
in interface IloMPModeler
column
- The column object defining where to install the new
variable.lb
- The semi-continuous lower bound of the new modeling
variable.ub
- The upper bound of the new modeling variable.type
- The type of the new modeling variable.
IloException
public IloSemiContVar[] semiContVarArray(int n, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns an array of semi-continuous variables with a specified lower and upper bound and of a specified type.
See IloMPModeler.semiContVarArray(int, double, double, IloNumVarType)
semiContVarArray
in interface IloMPModeler
n
- The number of new semi-continuous variables to create.lb
- The semi-continuous lower bound of the new modeling
variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.
IloException
public IloSemiContVar[] semiContVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
Creates and returns an array of semi-continuous variables with individually specified lower and upper bounds and individually specified types.
See IloMPModeler.semiContVarArray(int, double[], double[], IloNumVarType[])
semiContVarArray
in interface IloMPModeler
n
- The number of new semi-continuous variables to create.lb
- The semi-continuous lower bounds of the new modeling
variables. Variable i
is constructed
with a semi-continuous lower bound of
sclb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.type
- The types of the new modeling variables. Variable
i
is constructed with a type of
type[i]
.
IloException
public IloSemiContVar[] semiContVarArray(int n, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
Creates and returns an array of individually named semi-continuous variables with a specified lower and upper bound and of a specified type.
See IloMPModeler.semiContVarArray(int, double, double, IloNumVarType, String[])
semiContVarArray
in interface IloMPModeler
n
- The number of new semi-continuous variables to create.lb
- The semi-continuous lower bound of the new modeling
variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloSemiContVar[] semiContVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
Creates and returns an array of individually named semi-continuous variables with individually specified lower and upper bounds and individually specified types.
See IloMPModeler.semiContVarArray(int, double[], double[], IloNumVarType[], String[])
semiContVarArray
in interface IloMPModeler
n
- The number of new semi-continuous variables to create.lb
- The semi-continuous lower bounds of the new modeling
variables.
Variable i
is constructed with a
semi-continuous lower bound of sclb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.type
- The types of the new modeling variables. Variable
i
is constructed with a type of
type[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloSemiContVar[] semiContVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type) throws IloException
Creates and returns an array of semi-continuous variables with a specified lower and upper bound and of a specified type, representing an array of columns.
See IloMPModeler.semiContVarArray(IloColumnArray, double, double, IloNumVarType)
semiContVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining
where to install the new variables.lb
- The semi-continuous lower bound of the new modeling
variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.
IloException
public IloSemiContVar[] semiContVarArray(IloColumnArray cols, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
Creates and returns an array of semi-continuous variables with individually specified lower and upper bounds and individually specified types, representing an array of columns.
See IloMPModeler.semiContVarArray(IloColumnArray, double[], double[], IloNumVarType[])
semiContVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining where
to install the new variables.lb
- The semi-continuous lower bounds of the new modeling
variables. Variable i
is constructed
with a semi-continuous lower bound of
sclb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.type
- The types of the new modeling variables. Variable
i
is constructed with a type of
type[i]
.
IloException
public IloSemiContVar[] semiContVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
Creates and returns an array of named semi-continuous variables with a specified lower and upper bound as well as type, representing an array of columns.
See IloMPModeler.semiContVarArray(IloColumnArray, double, double, IloNumVarType, String[])
semiContVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining
where to install the new variables.lb
- The semi-continuous lower bound of the new modeling
variables.ub
- The upper bound of the new modeling variables.type
- The type of the new modeling variables.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloSemiContVar[] semiContVarArray(IloColumnArray cols, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
Creates and returns an array of named semi-continuous variables with individually specified lower and upper bounds, and individually specified type, representing an array of columns.
semiContVarArray
in interface IloMPModeler
cols
- An IloColumnArray
object defining
where to install the new variables.lb
- The semi-continuous lower bounds of the new modeling
variables. Variable i
is constructed
with a semi-continuous lower bound of
sclb[i]
.ub
- The upper bounds of the new modeling variables.
Variable i
is constructed with an
upper bound of ub[i]
.type
- The types of the new modeling variables. Variable
i
is constructed with a type of
type[i]
.name
- The names of the new modeling variables. Variable
i
is assigned name[i]
.
IloException
public IloObjective minimize() throws IloException
Creates and returns an empty minimization objective function.
minimize
in interface IloMPModeler
IloException
public IloObjective maximize() throws IloException
Creates and returns an empty maximization objective function.
maximize
in interface IloMPModeler
IloException
public IloObjective minimize(java.lang.String name) throws IloException
Creates and returns a named empty minimization objective function.
See IloMPModeler.minimize(String)
minimize
in interface IloMPModeler
name
- The name assigned to the new objective.
IloException
public IloObjective maximize(java.lang.String name) throws IloException
Creates and returns a named empty maximization objective function.
See IloMPModeler.maximize(String)
maximize
in interface IloMPModeler
name
- The name assigned to the new objective.
IloException
public IloObjective objective(IloObjectiveSense sense) throws IloException
Creates and returns an empty objective function with the specified sense.
See IloMPModeler.objective(IloObjectiveSense)
objective
in interface IloMPModeler
sense
- The optimization sense of the new objective.
IloException
public IloObjective objective(IloObjectiveSense sense, java.lang.String name) throws IloException
Creates and returns a named, empty objective function with the specified sense.
See IloMPModeler.objective(IloObjectiveSense, String)
objective
in interface IloMPModeler
sense
- The optimization sense of the new objective.name
- The name assigned to the new objective.
IloException
public IloObjective addMinimize(IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns a named objective function and adds it to the invoking model.
See IloModeler.addMinimize(IloNumExpr, String)
addMinimize
in interface IloModeler
expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing
the objective to minimize expr
.
IloException
public IloObjective addMaximize(IloNumExpr expr, java.lang.String name) throws IloException
Creates and returns a named objective function and adds it to the invoking model.
See IloModeler.addMaximize(IloNumExpr, String)
addMaximize
in interface IloModeler
expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the
objective to maximize expr
.
IloException
public IloObjective addMinimize() throws IloException
Creates and returns an empty objective function and adds it to the invoking model.
See IloMPModeler.addMinimize()
addMinimize
in interface IloMPModeler
IloException
public IloObjective addMaximize() throws IloException
Creates and returns an empty objective function and adds it to the invoking model.
See IloMPModeler.addMaximize()
addMaximize
in interface IloMPModeler
IloException
public IloObjective addObjective(IloObjectiveSense sense) throws IloException
Creates and returns an empty objective function with the specified sense and adds it to the invoking model.
See IloMPModeler.addObjective(IloObjectiveSense)
addObjective
in interface IloMPModeler
sense
- The optimization sense of the new objective.
IloException
public IloObjective addMinimize(java.lang.String name) throws IloException
Creates and returns a named objective function and adds it to the invoking model.
See IloMPModeler.addMinimize(String)
addMinimize
in interface IloMPModeler
name
- The name assigned to the new objective.
IloException
public IloObjective addMaximize(java.lang.String name) throws IloException
Creates and returns a named objective function and adds it to the invoking model.
See IloMPModeler.addMaximize(String)
addMaximize
in interface IloMPModeler
name
- The name assigned to the new objective.
IloException
public IloObjective addObjective(IloObjectiveSense sense, java.lang.String name) throws IloException
Creates and returns a named objective function with the specified sense and adds it to the invoking model.
See IloMPModeler.addObjective(IloObjectiveSense, String)
addObjective
in interface IloMPModeler
sense
- The optimization sense of the new objective.name
- The name assigned to the new objective.
IloException
public IloConversion conversion(IloNumVar var, IloNumVarType type, java.lang.String name) throws IloException
Converts a numeric variable to the specified type and names the converted variable.
See IloMPModeler.conversion(IloNumVar var, IloNumVarType type, String name)
conversion
in interface IloMPModeler
var
- The variable the type of which is to be converted.type
- The converted type for variable var
.name
- The name of the new IloConversion
object.
IloConversion
object.
IloException
public IloConversion conversion(IloNumVar var, IloNumVarType type) throws IloException
Converts a numeric variable to a specified type.
See IloMPModeler.conversion(IloNumVar var, IloNumVarType type)
conversion
in interface IloMPModeler
var
- The variable the type of which is to be converted.type
- The converted type for variable var
.
IloConversion
object.
IloException
public IloConversion conversion(IloNumVar[] ilovar, IloNumVarType type, java.lang.String name) throws IloException
Converts an array of numeric variables to the specified type and names the conversion object.
See IloMPModeler.conversion(IloNumVar[] ilovar, IloNumVarType type, String name)
conversion
in interface IloMPModeler
ilovar
- The array of variables the types of which are to be
converted.type
- The converted type for all variables in var
.name
- The name of the new IloConversion
object.
IloConversion
object.
IloException
public IloConversion conversion(IloNumVar[] ilovar, IloNumVarType type) throws IloException
Converts an array of numeric variables to the specified type.
See IloMPModeler.conversion(IloNumVar[] ilovar, IloNumVarType type)
conversion
in interface IloMPModeler
ilovar
- The array of variables the types of which are to be
converted.type
- The converted type for all variables in var
.
IloConversion
object.
IloException
public IloConversion conversion(IloNumVar[] ilovar, IloNumVarType[] type, java.lang.String name) throws IloException
Converts an array of numeric variables, each one converted to the type corresponding to the types in an array of types, and names the conversion object.
See IloMPModeler.conversion(IloNumVar[] ilovar, IloNumVarType[] type, String name)
conversion
in interface IloMPModeler
ilovar
- The array of variables the types of which are to be
converted.type
- An array of variable types containing the types to which
the variables are converted. The type of variable
var[i]
is converted to
type[i]
.name
- The name of the new IloConversion
object.
IloConversion
object.
IloException
public IloConversion conversion(IloNumVar[] ilovar, IloNumVarType[] type) throws IloException
Converts an array of numeric variables to the corresponding specified types.
See IloMPModeler.conversion(IloNumVar[] ilovar, IloNumVarType[] type)
conversion
in interface IloMPModeler
ilovar
- The array of variables the types of which are to be
converted.type
- An array of variable types containing the types to which
the variables are converted. The type of variable
var[i]
is converted to type[i]
.
IloConversion
object.
IloException
public IloLPMatrix addLPMatrix(java.lang.String name) throws IloException
Creates, returns, and adds an empty LP matrix object, with the specified name, to the invoking model.
See IloMPModeler.addLPMatrix(String name)
addLPMatrix
in interface IloMPModeler
name
- The name for the new IloLPMatrix
object.
IloLPMatrix
object.
IloException
public IloLPMatrix addLPMatrix() throws IloException
Creates, returns, and adds an empty LP matrix object to the invoking model.
See IloMPModeler.addLPMatrix()
addLPMatrix
in interface IloMPModeler
IloLPMatrix
object.
IloException
public IloLPMatrix LPMatrix(java.lang.String name) throws IloException
Creates and returns an empty, named LP matrix object.
See IloMPModeler.LPMatrix(String name)
LPMatrix
in interface IloMPModeler
name
- The name for the new IloLPMatrix
object.
IloLPMatrix
object.
IloException
public IloLPMatrix LPMatrix() throws IloException
Creates and returns an empty LP matrix object.
LPMatrix
in interface IloMPModeler
IloLPMatrix
object.
IloException
public IloRange addRange(double lb, IloNumExpr expr, double ub, java.lang.String name) throws IloException
Creates, returns, and adds to the invoking model a range object with the specified name, upper and lower bounds, and expression.
See IloModeler.addRange(double lb, IloNumExpr expr, double ub, String name)
addRange
in interface IloModeler
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.
IloRange
object initialized to represent
the constraint lb <= expr <= ub
.
IloException
public IloRange addRange(double lb, IloNumExpr expr, double ub) throws IloException
Creates, returns, and adds to the invoking model a range object with the specified expression as well as upper and lower bounds.
See IloModeler.addRange(double lb, IloNumExpr expr, double ub)
addRange
in interface IloModeler
lb
- Lower bound of the new IloRange
constraint.expr
- Expression of the new IloRange
constraint.ub
- Upper bound of the new IloRange
constraint.
IloRange
object initialized to represent
the constraint lb <= expr <= ub
.
IloException
public IloRange addRange(double lb, double ub, java.lang.String name) throws IloException
Creates and returns an empty range object with the specified name and specified lower and upper bounds.
See IloMPModeler.addRange(double lb, double ub, String name)
addRange
in interface IloMPModeler
lb
- The lower bound of the new IloRange
constraint.ub
- The upper bound of the new IloRange
constraint.name
- The name assigned to the new IloRange
constraint.
IloRange
object initialized to represent
the constraint lb <= 0 <= ub
.
IloException
public IloRange addRange(double lb, double ub) throws IloException
Creates and returns an empty range object with the specified lower and upper bounds.
See IloMPModeler.addRange(double lb, double ub)
addRange
in interface IloMPModeler
lb
- The lower bound of the new IloRange
constraint.ub
- The upper bound of the new IloRange
constraint.
IloRange
object initialized to represent
the constraint lb <= 0 <= ub
.
IloException
public IloRange addEq(IloNumExpr e, double v) throws IloException
Creates and returns a range initialized to represent the equality of the specified expression and value.
See IloModeler.addEq(IloNumExpr e, double v)
addEq
in interface IloModeler
e
- Expression of the new equality constraint.v
- Upper bound of the new equality constraint.
IloRange
object initialized
to represent the constraint expr == rhs
.
IloException
public IloRange addEq(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a named range initialized to represent the equality of the specified expression and value.
See IloModeler.addEq(IloNumExpr e, double v, String name)
addEq
in interface IloModeler
e
- Expression of the new equality constraint.v
- Upper bound of the new equality constraint.name
- Name assigned to the new equality constraint.
IloRange
object initialized
to represent theconstraint expr == rhs
.
IloException
public IloConstraint addEq(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint initialized to represent the equality of the two specified expressions.
See IloModeler.addEq(IloNumExpr e1, IloNumExpr e2)
addEq
in interface IloModeler
e1
- Lefthand side expression of the new equality constraint.e2
- Righthand side expression of the new equality constraint.
IloConstraint
object
initialized to represent
the constraint e1 == e2
.
IloException
public IloConstraint addEq(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint initialized to represent the equality of the two specified expressions.
See IloModeler.addEq(IloNumExpr e1, IloNumExpr e2, String name)
addEq
in interface IloModeler
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.
IloConstraint
object initialized to
represent the constraint e1 == e2
.
IloException
public IloRange addEq(double v, IloNumExpr e) throws IloException
Creates and returns a range initialized to represent the equality of the specified value and expression.
See IloModeler.addEq(double v, IloNumExpr e)
addEq
in interface IloModeler
v
- Value of the new equality constraint.e
- Expression of the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange addEq(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named range initialized to represent the equality of the specified value and expression.
See IloModeler.addEq(double v, IloNumExpr e, String name)
addEq
in interface IloModeler
v
- Value of the new equality constraint.e
- Expression of the new equality constraint.name
- Name assigned to the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange addGe(IloNumExpr e, double v) throws IloException
Creates and returns a range representing the constraint that the specified numeric expression must be greater than or equal to the specified value.
See IloModeler.addGe(IloNumExpr e, double v)
addGe
in interface IloModeler
e
- Expression of the new greater-than-or-equal-to constraint.v
- Upper bound of the new greater-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr >= rhs
.
IloException
public IloRange addGe(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a range representing the constraint that the specified numeric expression must be greater than or equal to the specified value.
See IloModeler.addGe(IloNumExpr e, double v, String name)
addGe
in interface IloModeler
e
- Expression of the new greater-than-or-equal-to constraint.v
- Upper bound of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr >= rhs
.
IloException
public IloConstraint addGe(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint that the first specified numeric expression must be greater than or equal to the second specified numeric expression.
See IloModeler.addGe(IloNumExpr e1, IloNumExpr e2)
addGe
in interface IloModeler
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.
IloConstraint
object
initialized to represent
the constraint e1 >= e2
.
IloException
public IloConstraint addGe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint that the first specified numeric expression must be greater than or equal to the second specified numeric expression.
See IloModeler.addGe(IloNumExpr e1, IloNumExpr e2, String name)
addGe
in interface IloModeler
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 constraint.
IloConstraint
object
initialized to represent
the constraint e1 >= e2
.
IloException
public IloRange addGe(double v, IloNumExpr e) throws IloException
Creates and returns a constraint that the specified value must be greater than or equal to the specified numeric expression.
See IloModeler.addGe(double v, IloNumExpr e)
addGe
in interface IloModeler
v
- Value of the new greater-than-or-equal-to constraint.e
- Expression of the new greater-than-or-equal-to
constraint.
IloRange
object initialized to
represent the constraint val >= expr
.
IloException
public IloRange addGe(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named constraint that the specified value must be greater than or equal to the specified numeric expression.
See IloModeler.addGe(double v, IloNumExpr e, String name)
addGe
in interface IloModeler
v
- Value of the new greater-than-or-equal-to constraint.e
- Expression of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object initialized to
represent the constraint val >= expr
.
IloException
public IloRange addLe(IloNumExpr e, double v) throws IloException
Creates and returns a range forcing the specified numeric expression to be less than than or equal to the specified value.
See IloModeler.addLe(IloNumExpr e, double v)
addLe
in interface IloModeler
e
- Expression of the new less-than-or-equal-to constraint.v
- Upper bound of the new less-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr <= rhs
.
IloException
public IloRange addLe(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a named range forcing the specified numeric expression to be less than than or equal to the specified value.
See IloModeler.addLe(IloNumExpr e, double v, String name)
addLe
in interface IloModeler
e
- Expression of the new less-than-or-equal-to constraint.v
- Upper bound of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr <= rhs
.
IloException
public IloConstraint addLe(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint forcing the first specified numeric expression to be less than than or equal to the second specified numeric expression.
See IloModeler.addLe(IloNumExpr e1, IloNumExpr e2)
addLe
in interface IloModeler
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.
IloConstraint
object initialized to represent
the constraint e1 <= e2
.
IloException
public IloConstraint addLe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint forcing the first specified numeric expression to be less than than or equal to the second specified numeric expression.
See IloModeler.addLe(IloNumExpr e1, IloNumExpr e2, String name)
addLe
in interface IloModeler
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 constraint.
IloConstraint
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloRange addLe(double v, IloNumExpr e) throws IloException
Creates and returns a range forcing the specified value to be less than than or equal to the specified numeric expression.
See IloModeler.addLe(double v, IloNumExpr e)
addLe
in interface IloModeler
v
- Value of the new less-than-or-equal-to constraint.e
- Expression of the new less-than-or-equal-to constraint.
IloRange
object initialized to
represent the constraint val <= exp
.
IloException
public IloRange addLe(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named range forcing the specified value to be less than than or equal to the specified numeric expression.
See IloModeler.addLe(double v, IloNumExpr e, String name)
addLe
in interface IloModeler
v
- Value of the new less-than-or-equal-to constraint.e
- Expression of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint val <= expr
.
IloException
public IloRange range(double lb, IloNumExpr expr, double ub, java.lang.String name) throws IloException
Creates and returns a named range with the specified lower bound, numeric expression, and upper bound.
See IloModeler.range(double lb, IloNumExpr expr, double ub, String name)
range
in interface IloModeler
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.
IloRange
object initialized
to represent the constraint lb <= expr <= ub
.
IloException
public IloRange range(double lb, IloNumExpr expr, double ub) throws IloException
Creates and returns a range with the specified lower bound, numeric expression, and upper bound.
See IloModeler.range(double lb, IloNumExpr expr, double ub)
range
in interface IloModeler
lb
- Lower bound of the new IloRange
constraint.expr
- Expression of the new IloRange
constraint.ub
- Upper bound of the new IloRange
constraint.
IloRange
object initialized
to represent the
constraint lb <= expr <= ub
.
IloException
public IloRange range(double lb, double ub, java.lang.String name) throws IloException
Creates and returns a named range with the specified lower and upper bound.
See IloMPModeler.range(double lb, double ub, String name)
range
in interface IloMPModeler
lb
- The lower bound of the new IloRange
constraint.ub
- The upper bound of the new IloRange
constraint.name
- The name assigned to the new IloRange
constraint.
IloRange
object initialized to represent
the constraint lb <= 0 <= ub
.
IloException
public IloRange range(double lb, double ub) throws IloException
Creates and returns a range with the specified lower and upper bound.
See IloMPModeler.range(double lb, double ub)
range
in interface IloMPModeler
lb
- The lower bound of the new IloRange
constraint.ub
- The upper bound of the new IloRange
constraint.
IloRange
object initialized to represent
the constraint lb <= 0 <= ub
.
IloException
public IloRange eq(IloNumExpr e, double v) throws IloException
Creates and returns a range forcing the specified numeric expression to be equal to the specified value.
See IloModeler.eq(IloNumExpr e, double v)
eq
in interface IloModeler
e
- Expression of the new equality constraint.v
- Upper bound of the new equality constraint.
IloRange
object initialized to
represent the constraint expr == rhs
.
IloException
public IloRange eq(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a named range forcing the specified numeric expression to be equal to the specified value.
See IloModeler.eq(IloNumExpr e, double v, String name)
eq
in interface IloModeler
e
- Expression of the new equality constraint.v
- Upper bound of the new equality constraint.name
- Name assigned to the new equality constraint.
IloRange
object
initialized to represent the
constraint expr == rhs
.
IloException
public IloConstraint eq(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint forcing the specified numeric expressions to be equal.
See IloModeler.eq(IloNumExpr e1, IloNumExpr e2)
eq
in interface IloModeler
e1
- Lefthand side expression of the new equality constraint.e2
- Righthand side expression of the new equality constraint.
IloRange
initialized to represent the constraint e1 == e2
.
IloException
public IloConstraint eq(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint forcing the specified numeric expressions to be equal.
See IloModeler.eq(IloNumExpr e1, IloNumExpr e2, String name)
eq
in interface IloModeler
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.
IloRange
object initialized
to represent the constraint e1 == e2
.
IloException
public IloRange eq(double v, IloNumExpr e) throws IloException
Creates and returns a range forcing the specified value to be equal to the specified numeric expression.
See IloModeler.eq(double v, IloNumExpr e)
eq
in interface IloModeler
v
- Value of the new equality constraint.e
- Expression of the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange eq(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named range forcing the specified value to be equal to the specified numeric expression.
See IloModeler.eq(double v, IloNumExpr e, String name)
eq
in interface IloModeler
v
- Value of the new equality constraint.e
- Expression of the new equality constraint.name
- Name assigned to the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange ge(IloNumExpr e, double v) throws IloException
Creates and returns a range forcing the specified numeric expression to be greater than or equal to the specified value.
See IloModeler.ge(IloNumExpr e, double v)
ge
in interface IloModeler
e
- Expression of the new greater-than-or-equal-to constraint.v
- Upper bound of the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint expr >= rhs
.
IloException
public IloRange ge(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a named range forcing the specified numeric expression to be greater than or equal to the specified value.
See IloModeler.ge(IloNumExpr e, double v, String name)
ge
in interface IloModeler
e
- Expression of the new greater-than-or-equal-to constraint.v
- Upper bound of the new greater-than-or-equal-to constraint.name
- Name assigned to the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint expr >= rhs
.
IloException
public IloConstraint ge(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint forcing the first specified numeric expression to be greater than or equal to the second specified numeric expression.
See IloModeler.ge(IloNumExpr e1, IloNumExpr e2)
ge
in interface IloModeler
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.
IloConstraint
object
initialized to represent the
constraint e1 >= e2
.
IloException
public IloConstraint ge(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint forcing the first specified numeric expression to be greater than or equal to the second specified numeric expression.
See IloModeler.ge(IloNumExpr e1, IloNumExpr e2, String name)
ge
in interface IloModeler
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.
IloConstraint
object initialized
to represent the
constraint e1 >= e2
.
IloException
public IloRange ge(double v, IloNumExpr e) throws IloException
Creates and returns a range that forces the specified value to be greater than or equal to the specified expression.
See IloModeler.ge(double v, IloNumExpr e)
ge
in interface IloModeler
v
- Value of the new greater-than-or-equal-to constraint.e
- Expression of the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val >= expr
.
IloException
public IloRange ge(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named range that forces the specified value to be greater than or equal to the specified expression.
See IloModeler.ge(double v, IloNumExpr e, String name)
ge
in interface IloModeler
v
- Value of the new greater-than-or-equal-to constraint.e
- Expression of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val >= expr
.
IloException
public IloRange le(IloNumExpr e, double v) throws IloException
Creates and returns a range that forces the specified numeric expression to be less than or equal to the specified value.
See IloModeler.le(IloNumExpr e, double v)
le
in interface IloModeler
e
- Expression of the new less-than-or-equal-to constraint.v
- Upper bound of the new less-than-or-equal-to constraint.
expr <= rhs
.
IloException
public IloRange le(IloNumExpr e, double v, java.lang.String name) throws IloException
Creates and returns a named range that forces the specified numeric expression to be less than or equal to the specified value.
See IloModeler.le(IloNumExpr e, double v, String name)
le
in interface IloModeler
e
- Expression of the new less-than-or-equal-to
constraint.v
- Upper bound of the new less-than-or-equal-to
constraint.name
- Name assigned to the new less-than-or-equal-to
constraint.
expr <= rhs
.
IloException
public IloConstraint le(IloNumExpr e1, IloNumExpr e2) throws IloException
Creates and returns a constraint that forces the first specified numeric expression to be less than or equal to the second specified numeric expression.
See IloModeler.le(IloNumExpr e1, IloNumExpr e2)
le
in interface IloModeler
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.
IloConstraint
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloConstraint le(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
Creates and returns a named constraint that forces the first specified numeric expression to be less than or equal to the second specified numeric expression.
See IloModeler.le(IloNumExpr e1, IloNumExpr e2, String name)
le
in interface IloModeler
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.
IloConstraint
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloRange le(double v, IloNumExpr e) throws IloException
Creates and returns a range that forces the specified value to be less than or equal to the specified numeric expression.
See IloModeler.le(double v, IloNumExpr e)
le
in interface IloModeler
v
- Value of the new less-than-or-equal-to constraint.e
- Expression of the new less-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val <= expr
.
IloException
public IloRange le(double v, IloNumExpr e, java.lang.String name) throws IloException
Creates and returns a named range that forces the specified value to be less than or equal to the specified numeric expression.
See IloModeler.le(double v, IloNumExpr e, String name)
le
in interface IloModeler
v
- Value of the new less-than-or-equal-to constraint.e
- Expression of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val <= expr
.
IloException
public void addToExpr(IloRange rng, IloNumExpr expr) throws IloException
Adds the specified numeric expression to the specified range.
See IloMPModeler.addToExpr(IloRange rng, IloNumExpr expr)
addToExpr
in interface IloMPModeler
rng
- The range constraint to modify.expr
- The expression to add.
IloException
public void setLinearCoef(IloRange rng, double val, IloNumVar var) throws IloException
Sets the specified value as the linear coefficient of the specified variable in the specified range.
See IloMPModeler.setLinearCoef(IloRange rng, double val, IloNumVar var)
setLinearCoef
in interface IloMPModeler
rng
- The range constraint to modify.val
- The coefficient to set.var
- The variable for which to set the coefficient.
IloException
public void setLinearCoef(IloRange rng, IloNumVar var, double val) throws IloException
Sets the specified value as the linear coefficient of the specified variable in the specified range.
See IloMPModeler.setLinearCoef(IloRange rng, IloNumVar var, double val)
setLinearCoef
in interface IloMPModeler
rng
- The range constraint to modify.val
- The coefficient to set.var
- The variable for which to set the coefficient.
IloException
public void setLinearCoefs(IloRange rng, double[] val, IloNumVar[] var) throws IloException
Sets the array of specified values as the linear coefficients of the specified array of variables in the specified range.
See IloMPModeler.setLinearCoefs(IloRange rng, double[] val, IloNumVar[] var)
setLinearCoefs
in interface IloMPModeler
rng
- The range constraint to modify.val
- The array of linear coefficient values. The linear
coefficient of variable var[i]
is set
to val[i]
.var
- The array of variables for which to set linear coefficients.
A variable may only appear once in this array.
IloException
public void setLinearCoefs(IloRange rng, IloNumVar[] var, double[] val) throws IloException
Sets the array of specified values as the linear coefficients of the specified array of variables in the specified range.
See IloMPModeler.setLinearCoefs(IloRange rng, IloNumVar[] var, double[] val)
setLinearCoefs
in interface IloMPModeler
rng
- The range constraint to modify.var
- The array of variables for which to set linear coefficients.
A variable may only appear once in this array.val
- The array of linear coefficient values. The linear
coefficient of variable var[i]
is set
to val[i]
.
IloException
public void setLinearCoefs(IloRange rng, double[] val, IloNumVar[] var, int start, int num) throws IloException
Sets a number of the array of specified values, from a starting index, as the linear coefficients of the corresponding part of the array of variables in the specified range.
See IloMPModeler.setLinearCoefs(IloRange rng, double[] val, IloNumVar[] var, int start, int num)
setLinearCoefs
in interface IloMPModeler
rng
- The range constraint to modify.val
- An array containing linear coefficient values. The linear
coefficient of variable var[i]
is set to
val[i]
.var
- An array containing the variables for which to set linear
coefficients. A variable may only appear once in this
array.start
- The first element in val
and var
to use for setting coefficients.num
- The number of consecutive elements in val
and
var
to use for setting coefficients.
IloException
public void setLinearCoefs(IloRange rng, IloNumVar[] var, double[] val, int start, int num) throws IloException
Sets a number of the array of specified values, from a starting index, as the linear coefficients of the corresponding part of the array of variables in the specified range.
See IloMPModeler.setLinearCoefs(IloRange rng, IloNumVar[] var, double[] val, int start, int num)
setLinearCoefs
in interface IloMPModeler
rng
- The range constraint to modify.var
- An array containing the variables for which to set linear
coefficients. A variable may only appear once in this
array.val
- An array containing linear coefficient values. The linear
coefficient of variable var[i]
is set
to val[i]
.start
- The first element in val
and var
to use for setting coefficients.num
- The number of consecutive elements in val
and
var
to use for setting coefficients.
IloException
public IloSOS1 addSOS1(IloNumVar[] var, double[] val) throws IloException
Creates a special ordered set (SOS) of type 1 with the specified variables and weights and adds it to the invoking model.
See IloMPModeler.addSOS1(IloNumVar[] var, double[] val)
addSOS1
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.
IloSOS1
object.
IloException
public IloSOS1 addSOS1(IloNumVar[] var, double[] val, int start, int num) throws IloException
Creates a special ordered set (SOS) of type 1 with the specified variables and weights and adds it to the invoking model.
See IloMPModeler.addSOS1(IloNumVar[] var, double[] val, int start, int num)
addSOS1
in interface IloMPModeler
var
- The array containing the variables in the new SOS.val
- The array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.
IloSOS1
object.
IloException
public IloSOS1 addSOS1(IloNumVar[] var, double[] val, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 1 with the specified variables and weights, and adds that SOS1 to the invoking model.
See IloMPModeler.addSOS1(IloNumVar[] var, double[] val, String name)
addSOS1
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.name
- The name of the new SOS.
IloSOS1
object.
IloException
public IloSOS1 addSOS1(IloNumVar[] var, double[] val, int start, int num, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 1, starting from the specified index and continuing through a number of elements in the array of specified variables and weights, and adds that named SOS1 to the invoking model.
See IloMPModeler.addSOS1(IloNumVar[] var, double[] val, int start, int num, String name)
addSOS1
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.name
- The name of the new SOS.
IloSOS1
object.
IloException
public IloSOS1 SOS1(IloNumVar[] var, double[] val) throws IloException
Creates and returns a special ordered set (SOS) of type 1 from the specified array of variables and weights.
See IloMPModeler.SOS1(IloNumVar[] var, double[] val)
SOS1
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.
IloSOS1
object.
IloException
public IloSOS1 SOS1(IloNumVar[] var, double[] val, int start, int num) throws IloException
Creates and returns a special ordered set (SOS) of type 1 consisting of a number of elements from the specified starting index of the specified array of variables and weights.
See IloMPModeler.SOS1(IloNumVar[] var, double[] val, int start, int num)
SOS1
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.
IloSOS1
object.
IloException
public IloSOS1 SOS1(IloNumVar[] var, double[] val, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 1 from the specified array of variables and weights.
See IloMPModeler.SOS1(IloNumVar[] var, double[] val, String name)
SOS1
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.name
- The name of the new SOS.
IloSOS1
object.
IloException
public IloSOS1 SOS1(IloNumVar[] var, double[] val, int start, int num, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 1 consisting of a number of elements from the specified starting index of the specified array of variables and weights.
See IloMPModeler.SOS1(IloNumVar[] var, double[] val, int start, int num, String name)
SOS1
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.name
- The name of the new SOS.
IloSOS1
object.
IloException
public IloSOS2 addSOS2(IloNumVar[] var, double[] val) throws IloException
Creates and returns a special ordered set (SOS) of type 2 from the specified array of variables and weights, and adds that SOS2 to the invoking model.
See IloMPModeler.addSOS2(IloNumVar[] var, double[] val)
addSOS2
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.
IloSOS2
object.
IloException
public IloSOS2 addSOS2(IloNumVar[] var, double[] val, int start, int num) throws IloException
Creates and returns a special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the specified array of variables and weights, and adds that SOS2 to the invoking model.
See IloMPModeler.addSOS2(IloNumVar[] var, double[] val, int start, int num)
addSOS2
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.
IloSOS2
object.
IloException
public IloSOS2 addSOS2(IloNumVar[] var, double[] val, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 2 from the specified array of variables and weights, and adds that SOS2 to the invoking model.
See IloMPModeler.addSOS2(IloNumVar[] var, double[] val, String name)
addSOS2
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.name
- The name of the new SOS.
IloSOS2
object.
IloException
public IloSOS2 addSOS2(IloNumVar[] var, double[] val, int start, int num, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the specified array of variables and weights, and adds that SOS2 to the invoking model.
See IloMPModeler.addSOS2(IloNumVar[] var, double[] val, int start, int num, String name)
addSOS2
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.name
- The name of the new SOS.
IloSOS2
object.
IloException
public IloSOS2 SOS2(IloNumVar[] var, double[] val) throws IloException
Creates and returns a special ordered set (SOS) of type 2 from the specified array of variables and weights.
See IloMPModeler.SOS2(IloNumVar[] var, double[] val)
SOS2
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.
IloSOS2
object.
IloException
public IloSOS2 SOS2(IloNumVar[] var, double[] val, int start, int num) throws IloException
Creates and returns a special ordered set (SOS) of type 2 consisting of a number of elements, starting at the specified index, from the specified array of variables and weights.
See IloMPModeler.SOS2(IloNumVar[] var, double[] val, int start, int num)
SOS2
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.
IloSOS2
object.
IloException
public IloSOS2 SOS2(IloNumVar[] var, double[] val, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 2 from the specified array of variables and weights.
See IloMPModeler.SOS2(IloNumVar[] var, double[] val, String name)
SOS2
in interface IloMPModeler
var
- The variables in the new SOS.val
- The weight values for the variables in the new SOS.name
- The name of the new SOS.
IloSOS2
object.
IloException
public IloSOS2 SOS2(IloNumVar[] var, double[] val, int start, int num, java.lang.String name) throws IloException
Creates and returns a named special ordered set (SOS) of type 2 from a number of elements, starting at the specified index, of the array of variables and weights.
See IloMPModeler.SOS2(IloNumVar[] var, double[] val, int start, int num, String name)
SOS2
in interface IloMPModeler
var
- An array containing the variables in the new SOS.val
- An array containing the weight values for the variables
in the new SOS.start
- The first element in var
and
val
to use for the new SOS.num
- The number of consecutive elements in var
and val
to use for the new SOS.name
- The name of the new SOS.
IloSOS2
object.
IloException
public IloColumn column(IloRange rng, double val) throws IloException
Creates and returns a column from the specified range and value.
See IloMPModeler.column(IloRange rng, double val)
column
in interface IloMPModeler
rng
- The range constraint for which to create the column
term.val
- The linear coefficient the new IloColumn
will use for adding a new variable to rng
.
IloColumn
object.
IloException
public IloColumnArray columnArray(IloRange rng, double[] val) throws IloException
Creates and returns an array of columns from the specified range and array of values.
See IloMPModeler.columnArray(IloRange rng, double[] val)
columnArray
in interface IloMPModeler
rng
- The range constraint for which to create the column
array term.val
- The linear coefficient the IloColumnArray
will use for adding new variables to rng
.
IloColumnArray
object.
IloException
public IloColumnArray columnArray(IloRange rng, double[] val, int start, int num) throws IloException
Creates and returns an array of a number of columns, starting from the specified index of the range and corresponding array of values.
See IloMPModeler.columnArray(IloRange rng, double[] val, int start, int num)
columnArray
in interface IloMPModeler
rng
- The range constraint for which to create the column
array term.val
- An array containing the linear coefficients the
IloColumnArray
will use for adding new
variables to rng
.start
- The first element in val
to use.num
- The number of consecutive elements in val
to use.
IloColumnArray
object.
IloException
public IloColumn column(IloObjective obj, double val) throws IloException
Creates and returns a column from the specified objective and value.
See IloMPModeler.column(IloObjective obj, double val)
column
in interface IloMPModeler
obj
- The objective for which to create the column term.val
- The linear coefficient the new IloColumn
will use for adding a new variable to obj
.
IloColumn
object.
IloException
public IloColumnArray columnArray(IloObjective obj, double[] val) throws IloException
Creates and returns an array of columns from the specified objective and array of values.
See IloMPModeler.columnArray(IloObjective obj, double[] val)
columnArray
in interface IloMPModeler
obj
- The objective for which to create the column array term.val
- The linear coefficients the IloColumnArray
will use for adding new variables to obj
.
IloColumnArray
object.
IloException
public IloColumnArray columnArray(IloObjective obj, double[] val, int start, int num) throws IloException
Creates and returns an array of a number of columns, starting from the specified index, of the specified objective and the corresponding array of values.
See IloMPModeler.columnArray(IloObjective obj, double[] val, int start, int num)
columnArray
in interface IloMPModeler
obj
- The objective for which to create the column array term.val
- An array containing the linear coefficients the
IloColumnArray
will use for adding new
variables to obj
.start
- The first element in val
to use.num
- The number of consecutive elements in val
to use.
IloColumnArray
object.
IloException
public IloColumn column(IloLPMatrix lp) throws IloException
Creates and returns a column from an LP matrix.
See IloMPModeler.column(IloLPMatrix lp)
column
in interface IloMPModeler
lp
- The IloLPMatrix
object for which to create
the new column.
IloColumn
object.
IloException
public IloColumn column(IloLPMatrix lp, int[] ind, double[] val) throws IloException
Creates and returns a column from part of an LP matrix, using the specified indices and values.
See IloMPModeler.column(IloLPMatrix lp, int[] ind, double[] val)
column
in interface IloMPModeler
lp
- The IloLPMatrix
object for which to create
the new column.ind
- An array of indices indicating the row indices of the
nonzeros in the new column. Indices may not occur
multiple times in this list and must be in the range
0
through lp.getNcols()-1
.val
- An array of values indicating the value of the nonzero
entries for the column.
IloColumn
object suitable for creating
a new column in lp
with nonzeros as
specified by the arguments ind
and
val
.
IloException
public IloColumn column(IloLPMatrix lp, int[] ind, double[] val, int start, int num) throws IloException
Creates and returns a column suitable for adding a number of variables to an LP matrix, using a number of the specified indices and values, starting from the specified index.
See IloMPModeler.column(IloLPMatrix lp, int[] ind, double[] val, int start, int num)
column
in interface IloMPModeler
lp
- The IloLPMatrix
object for which to create
the new column.ind
- An array containing the indices indicating the row
indices of the nonzeros in the new column. Indices
may not occur multiple times in this list and must be
in the range 0
through
lp.getNcols()-1
.val
- An array containing values indicating the value of the
nonzero entries for the column.start
- The index of the first element in arrays
ind
and val
to use.num
- The number of consecutive elements in arrays
ind
and val
to use.
IloColumn
object suitable for creating
a new column in lp
with nonzeros as
specified in arguments ind
and
val
.
IloException
public IloColumnArray columnArray(IloLPMatrix lp, int num, int[][] ind, double[][] val) throws IloException
Creates and returns an array of columns suitable for adding new variables as columns in an LP matrix.
See IloMPModeler.columnArray(IloLPMatrix lp, int num, int[][] ind, double[][] val)
columnArray
in interface IloMPModeler
lp
- The IloLPMatrix
object for which to create
the new column array term.num
- The size of the column array term to create or,
equivalently, the number of consecutive elements in
ind
and val
to use.ind
- An array of arrays of row indices of the nonzeros
for each of the new columns. Indices may not occur
multiple times within one column, and they must be in
the range 0
through
lp.getNcols()-1
.val
- An array of arrays of values of the nonzeros for each
of the new columns.
IloColumnArray
object suitable for
creating new columns in the LP matrix lp
as specified by arguments ind
and
val
.
IloException
public IloColumnArray columnArray(IloLPMatrix lp, int num) throws IloException
Creates and returns an array of a number of columns from an LP matrix.
See IloMPModeler.columnArray(IloLPMatrix lp, int num)
columnArray
in interface IloMPModeler
lp
- The IloLPMatrix
object for which to create
the new column.num
- The size of the new column array term to create.
IloColumnArray
object suitable for
creating num
empty columns to the
IloLPMatrix
.
IloException
public void delete(IloCopyable obj) throws IloException
Deletes a copyable object.
See IloMPModeler.delete(IloCopyable obj)
delete
in interface IloMPModeler
obj
- The modeling object to be deleted from the invoking
model.
IloException
public void delete(IloCopyable[] obj) throws IloException
Deletes an array of copyable objects.
See IloMPModeler.delete(IloCopyable[] obj)
delete
in interface IloMPModeler
obj
- The array of modeling objects to be deleted from the
invoking model.
IloException
public void delete(IloCopyable[] obj, int beg, int num) throws IloException
Deletes a number of copyable objects, starting from the specified index, from an array of copyable objects.
See IloMPModeler.delete(IloCopyable[] obj, int beg, int num)
delete
in interface IloMPModeler
obj
- An array containing the modeling objects to be deleted
from the invoking model.beg
- The index of the first modeling object in
obj
to be deleted from the invoking
model.num
- The number of modeling objects in obj
to
be deleted from the invoking model.
IloException
public IloLinearNumExpr scalProd(int[] vals, IloNumVar[] vars, int start, int num) throws IloException
Creates and returns a new linear expression representing the scalar
product of the num
values in vals
starting
at element start
with the corresponding variables in
vars
.
vals
- An array containing the values to use for building the
scalar product.vars
- An array containing the variables to use for building
the scalar product.start
- The index of the first element to use in vals
and vars
.num
- The number of elements to use in vals
and
vars
.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, int[] vals, int start, int num) throws IloException
Creates and returns a new linear expression representing the scalar
product of the num
variables in vars
starting
at element start
with the corresponding values in
vals
.
vars
- An array containing the variables to use for building
the scalar product.vals
- An array containing the values to use for building the
scalar product.start
- The index of the first element to use in vals
and vars
.num
- The number of elements to use in vals
and
vars
.
IloException
public IloNumExpr scalProd(IloNumVar[] vars1, IloNumVar[] vars2) throws IloException
Creates and returns a linear expression representing the scalar product of the given variables.
scalProd
in interface IloModeler
vars1
- The first array of variables involved in the new scalar
product.vars2
- The second array of variables involved in the new scalar * product.
IloException
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 given variables.
scalProd
in interface IloModeler
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 first element to use in the
multiplication.num
- The number of elements to use in the multiplication,
starting from the element indicated by
start
.
IloException
public IloLinearIntExpr linearIntExpr() throws IloException
Creates and returns an integer linear expression initialized as 0 (zero).
See IloModeler.linearIntExpr()
linearIntExpr
in interface IloModeler
IloException
public IloNumExpr sum(IloNumExpr[] expr, int start, int num) throws IloException
Creates and returns a numeric expression that is the sum of a number of expressions, starting from the specified index, of an array of numeric expressions.
See IloModeler.sum(IloNumExpr[] expr, int start, int num)
sum
in interface IloModeler
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.
IloException
public IloNumExpr sum(IloNumExpr[] expr) throws IloException
Creates and returns a numeric expression that is the sum of the elements in an array of numeric expressions.
See IloModeler.sum(IloNumExpr[] expr)
sum
in interface IloModeler
expr
- An array containing the terms to be summed.
IloException
public IloIntExpr sum(IloIntExpr[] expr, int start, int num) throws IloException
Creates and returns an integer expression that is the sum of a number of expressions, starting from the specified index, of an array of integer expressions.
See IloModeler.sum(IloIntExpr[] expr, int start, int num)
sum
in interface IloModeler
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.
IloException
public IloIntExpr sum(IloIntExpr[] expr) throws IloException
Creates and returns an integer expression that is the sum of the elements in an array of integer expressions.
See IloModeler.sum(IloIntExpr[] expr)
sum
in interface IloModeler
expr
- An array containing the expressions to be summed.
IloException
public java.util.Iterator LPMatrixIterator()
Returns an iterator over all LP matrix objects in the active model.
IloLPMatrix
objects in the
active model.public java.util.Iterator rangeIterator()
Returns an iterator over all ranges in the active model.
This iterator accounts only for the IloRange
objects directly added to the active model and not the objects that may
be in an instance of IloLPMatrix
and
have been added indirectly.
IloRange
objects in the
active model.public java.util.Iterator conversionIterator()
Returns an iterator over all conversion objects in the active model.
IloConversion
objects in the
active model.public java.util.Iterator SOS1iterator()
Returns an iterator over all SOS1 objects in the active model.
IloSOS1
objects in the
active model.public java.util.Iterator SOS2iterator()
Returns an iterator over all SOS2 objects in the active model.
IloSOS2
objects in the
active model.public IloObjective getObjective()
Returns the IloObjective
object of the
active model, or null
if no IloObjective
object
is currently in the active model.
IloObjective
object in the active
model, or null
if there is no
IloObjective
.public void needCopy(IloCopyManager.Check check)
public IloCopyable makeCopy(IloCopyManager copy) throws IloException
IloException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |