|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for basic modeling.
IloModeler
defines an interface for building
basic optimization
models. This interface contains methods for constructing variables, basic
constraints, and objective function objects. It is typically implemented by
such optimizer classes as IloCplex
, available in ILOG CPLEX
or IloSolverFactory
, available in ILOG JSolver.
By using this interface rather than the actual implementation class,
you can create optimization models that can be solved by any optimizer
implementing the interface.
This interface is an extension of the IloModel
interface,
and allows you to add modeling objects
(instances of IloAddable
) to an IloModeler
object. For an optimizer implementing this interface,
the model built corresponds to the
model the optimizer will solve using its solve
method.
There are two interfaces derived from IloModeler
:
IloCPModeler
, available in ILOG JSolver,
and IloMPModeler
, available in ILOG CPLEX.
IloCPModeler
defines the API for constraint-based engines.
(An engine is an object whose
function is to manipulate models that include variables and constraints.)
IloMPModeler
is a modeling interface for
Mathematical Programming.
It adds support for several modeling object interfaces, including LP
matrices, semi-continuous variables, and special ordered sets (SOSs). It
extends the functionality of IloModeler
to column-wise
modeling and supports modification of variable types and
expressions of ranged
constraints and objective functions.
Method Summary | |
IloIntExpr |
abs(IloIntExpr e)
Creates and returns the new integer expression abs(e) ,
the absolute value of its argument. |
IloRange |
addEq(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val == expr
and added to the invoking instance of IloModeler . |
IloRange |
addEq(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val == expr
and added to the invoking instance of IloModeler . |
IloRange |
addEq(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr == rhs ,
and added to the invoking IloModel . |
IloRange |
addEq(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr == rhs ,
and added to the invoking instance of IloModeler . |
IloConstraint |
addEq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 == e2 ,
and added to the invoking instance of IloModeler . |
IloConstraint |
addEq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 == e2 ,
and added to the invoking instance of IloModeler . |
IloRange |
addGe(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val >= expr
and added to the invoking instance of IloModeler . |
IloRange |
addGe(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val >= expr
and added to the invoking instance of IloModeler . |
IloRange |
addGe(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr >= rhs
and added to the invoking instance of IloModeler . |
IloRange |
addGe(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr >= rhs
and added to the invoking instance of IloModeler . |
IloConstraint |
addGe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 >= e2
and added to the invoking instance of IloModeler . |
IloConstraint |
addGe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 >= e2
and added to the invoking instance of IloModeler . |
IloRange |
addLe(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val <= expr
and added to the invoking instance of IloModeler . |
IloRange |
addLe(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val <= expr
and added to the invoking instance of IloModeler . |
IloRange |
addLe(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr <= rhs
and added to the invoking instance of IloModeler . |
IloRange |
addLe(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr <= rhs
and added to the invoking instance of IloModeler . |
IloConstraint |
addLe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 <= e2 ,
and added to the invoking instance of IloModeler . |
IloConstraint |
addLe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 <= e2
and added to the invoking instance of IloModeler . |
IloObjective |
addMaximize(IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to maximize the expression expr
and added to the invoking model. |
IloObjective |
addMaximize(IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective ,
representing an objective to maximize the expression expr ,
assigned the name name , and added to the invoking model. |
IloObjective |
addMinimize(IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to minimize the expression expr
and added to the invoking model. |
IloObjective |
addMinimize(IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective
representing an objective to minimize the expression expr ,
assigned the name name , and added to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to optimize the expression
expr with respect to the optimization sense
indicated by sense and added to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective
representing an objective to optimize the expression expr
with respect to the optimization sense indicated by sense ,
assigned the name name , and
added to the invoking model. |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub)
Creates and returns an instance of IloRange
initialized to represent the constraint
lb <= expr <= ub
and added to the invoking instance of IloModeler . |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint
lb <= expr <= ub
and added to the invoking instance of IloModeler . |
IloAnd |
and()
Creates and returns an empty IloAnd constraint
suitable for grouping
other constraints or building logical constraints. |
IloAnd |
and(IloConstraint[] cons)
Groups several constraints together. |
IloAnd |
and(IloConstraint[] cons,
int start,
int num)
Groups several constraints together. |
IloAnd |
and(IloConstraint[] cons,
int start,
int num,
java.lang.String name)
Groups several constraints together. |
IloAnd |
and(IloConstraint[] cons,
java.lang.String name)
Groups several constraints together. |
IloAnd |
and(IloConstraint con1,
IloConstraint con2)
Groups two constraints together. |
IloAnd |
and(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Groups two constraints together and names the group. |
IloIntVar |
boolVar()
Creates and returns a new Boolean variable (domain 0,1). |
IloIntVar |
boolVar(java.lang.String name)
Creates and returns a new Boolean variable (domain 0,1) with its name. |
IloIntVar[] |
boolVarArray(int n)
Creates and returns an array of n
new Boolean variables (domain 0,1). |
IloIntVar[] |
boolVarArray(int n,
java.lang.String[] name)
Creates and returns an array of n
new Boolean variables (domain 0,1). |
IloNumExpr |
constant(double c)
Creates and returns an expression representing the constant term c . |
IloIntExpr |
constant(int c)
Creates and returns a new integer constant expression equal to c . |
IloNumExpr |
diff(double v,
IloNumExpr e1)
Creates and returns an expression representing the difference between the value v and the expression e1 . |
IloIntExpr |
diff(IloIntExpr expr1,
IloIntExpr expr2)
Creates and returns an integer expression representing the difference between the integer expressions expr1
and expr2 . |
IloIntExpr |
diff(IloIntExpr e,
int v)
Creates and returns an integer expression representing the difference between integer expression e and value v . |
IloNumExpr |
diff(IloNumExpr e,
double v)
Creates and returns an expression representing the difference between expression e and value v . |
IloNumExpr |
diff(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an expression representing the difference between the expressions e1 and e2 . |
IloIntExpr |
diff(int v,
IloIntExpr e1)
Creates and returns an integer expression representing the difference between the value v and the integer expression e1 . |
IloRange |
eq(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val == expr . |
IloRange |
eq(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val == expr
and assigned the name name . |
IloRange |
eq(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr == rhs . |
IloRange |
eq(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr == rhs
and assigned the name name . |
IloConstraint |
eq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 == e2 . |
IloConstraint |
eq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 == e2 and
assigned the name name . |
IloRange |
ge(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val >= expr . |
IloRange |
ge(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val >= expr
and assigned the name name . |
IloRange |
ge(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr >= rhs . |
IloRange |
ge(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr >= rhs
and assigned the name name . |
IloConstraint |
ge(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange
initialized to represent the constraint e1 >= e2 . |
IloConstraint |
ge(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 >= e2
and assigned the name name . |
IloConstraint |
ifThen(IloConstraint con1,
IloConstraint con2)
Creates and returns a constraint that if con1 is true, then
con2 must also be true. |
IloConstraint |
ifThen(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Creates and returns a constraint that if con1 is true, then
con2 must also be true, and it names the new constraint. |
IloIntExpr |
intExpr()
Creates and returns an empty integer expression as an object. |
IloIntVar |
intVar(int min,
int max)
Creates and returns a new integer variable with the specified bounds. |
IloIntVar |
intVar(int min,
int max,
java.lang.String name)
Creates and returns a new integer variable with the specified bounds and a name. |
IloIntVar[] |
intVarArray(int n,
int[] min,
int[] max)
Creates an array of length n
initialized to n new integer variables,
each variable with its own bounds. |
IloIntVar[] |
intVarArray(int n,
int[] min,
int[] max,
java.lang.String[] name)
Creates an array of length n
initialized to n new integer variables,
each variable with its own bounds. |
IloIntVar[] |
intVarArray(int n,
int min,
int max)
Creates and returns a new array of n integer variables
with the specified bounds. |
IloIntVar[] |
intVarArray(int n,
int min,
int max,
java.lang.String[] name)
Creates an array of length n initialized
to n new modeling integer
variables, each with the same specified bounds
and returns them in an array. |
IloRange |
le(double val,
IloNumExpr expr)
Creates and returns an instance of IloRange
initialized to represent the constraint val <= expr . |
IloRange |
le(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint val <= expr
and assigned the name name . |
IloRange |
le(IloNumExpr expr,
double rhs)
Creates and returns an instance of IloRange
initialized to represent the constraint expr <= rhs . |
IloRange |
le(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint expr <= rhs
and assigned the name name . |
IloConstraint |
le(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 <= e2 . |
IloConstraint |
le(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint e1 <= e2
and assigned the name name . |
IloLinearIntExpr |
linearIntExpr()
Creates and returns an integer linear expression initialized as 0 (zero). |
IloLinearIntExpr |
linearIntExpr(int val)
Creates and returns an integer linear expression initialized as the constant val . |
IloLinearNumExpr |
linearNumExpr()
Creates and returns a zero linear expression. |
IloLinearNumExpr |
linearNumExpr(double val)
Creates and returns a linear expression initialized as the constant. |
IloNumExpr |
max(double val,
IloNumExpr e2)
Creates and returns the new numeric expression max(val, e2) . |
IloIntExpr |
max(IloIntExpr[] e)
Creates and returns the new integer expression max(e) . |
IloIntExpr |
max(IloIntExpr e1,
IloIntExpr e2)
Creates and returns the new integer expression max(e1, e2) . |
IloIntExpr |
max(IloIntExpr e1,
int val)
Creates and returns the new integer expression max(e1, val) . |
IloNumExpr |
max(IloNumExpr[] e)
Creates and returns the new numeric expression max(e) ,
the maximum over the array. |
IloNumExpr |
max(IloNumExpr e1,
double val)
Creates and returns the new numeric expression max(e1, val) . |
IloNumExpr |
max(IloNumExpr e1,
IloNumExpr e2)
Creates and returns the new numeric expression max(e1, e2) . |
IloIntExpr |
max(int val,
IloIntExpr e2)
Creates and returns the new integer expression max(val, e2) . |
IloObjective |
maximize(IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to maximize the expression expr . |
IloObjective |
maximize(IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective
representing an objective to maximize the expression
expr and assigned the name name . |
IloNumExpr |
min(double val,
IloNumExpr e2)
Creates and returns the new numeric expression min(val, e2) . |
IloIntExpr |
min(IloIntExpr[] e)
Creates and returns the new integer expression min(e) . |
IloIntExpr |
min(IloIntExpr e1,
IloIntExpr e2)
Creates and returns the new integer expression min(e1, e2) . |
IloIntExpr |
min(IloIntExpr e1,
int val)
Creates and returns the new integer expression min(e1, val) . |
IloNumExpr |
min(IloNumExpr[] e)
Creates and returns the new numeric expression min(e) ,
the minimum over the array. |
IloNumExpr |
min(IloNumExpr e1,
double val)
Creates and returns the new numeric expression min(e1, val) . |
IloNumExpr |
min(IloNumExpr e1,
IloNumExpr e2)
Creates and returns the new numeric expression min(e1, e2) . |
IloIntExpr |
min(int val,
IloIntExpr e2)
Creates and returns the new integer expression min(val, e2) . |
IloObjective |
minimize(IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to minimize the expression expr . |
IloObjective |
minimize(IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective
representing an objective to minimize the expression
expr and assigned the name name . |
IloIntExpr |
negative(IloIntExpr e)
Creates and returns the new integer expression -e ,
the negation of the expression e . |
IloNumExpr |
negative(IloNumExpr e)
Creates and returns the new numeric expression -e ,
the negation of the expression e . |
IloConstraint |
not(IloConstraint con1)
Creates and returns a constraint that is the logical negation of its argument. |
IloConstraint |
not(IloConstraint con1,
java.lang.String name)
Creates and returns a constraint that is the logical negation of its argument and assigns the string name as the name of the
returned constraint. |
IloNumExpr |
numExpr()
Creates and returns an empty expression. |
IloNumVar |
numVar(double lb,
double ub)
Creates and returns a new modeling object, a numeric variable of the type IloNumVarType.Float with specified bounds. |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type)
Creates and returns a new modeling object, a numeric variable with bounds and type. |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a new modeling object, a numeric variable with bounds, type, and name. |
IloNumVar |
numVar(double lb,
double ub,
java.lang.String name)
Creates and returns a new modeling ojbect, a numeric variable of the type IloNumVarType.Float with bounds and name. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub)
Creates and returns an array of length n
initialized to n new modeling objects that are
numeric variables of type IloNumVarType.Float
with distinct bounds. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates n new modeling objects,
numeric variables with distinct
bounds and types, and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates n new modeling objects,
numeric variables with distinct bounds, types, and names,
and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
java.lang.String[] name)
Creates and returns an array of length n
initialized to n new modeling objects that are
numeric variables of type IloNumVarType.Float
with distinct bounds and distinct names. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub)
Creates and returns an array of length n
initialized to n new modeling objects that are
numerica variables all of the same type
IloNumVarType.Float and same bounds. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type)
Creates n new modeling objects,
numeric variables with the same
bounds and type, and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates n new modeling objects, numeric variables
with the same bounds and type and distinct names,
and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
java.lang.String[] name)
Creates and returns an array of length n
initialized to n new modeling objects that are
numeric variables
of type IloNumVarType.Float . |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an instance of IloObjective
representing an objective to optimize the expression
expr with respect to the
optimization sense indicated by sense . |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns an instance of IloObjective
representing an objective to optimize the expression
expr with respect to the
optimization sense indicated by sense and
assigned the name name . |
IloOr |
or()
Creates and returns an empty IloOr constraint
for expressing disjunctions. |
IloOr |
or(IloConstraint[] cons)
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons , an array
of constraints. |
IloOr |
or(IloConstraint[] cons,
int start,
int num)
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in the range of indices starting at the index indicated by start and continuing through the number
of elements indicated by the number num among the elements
of its argument cons , an array of constraints. |
IloOr |
or(IloConstraint[] cons,
int start,
int num,
java.lang.String name)
Creates and returns the logical-or of two or more constraints and names the new constraint. |
IloOr |
or(IloConstraint[] cons,
java.lang.String name)
Creates and returns an or-constraint indicating that at least one and possibly more than one of the elements is true in its argument cons , an array
of constraints. |
IloOr |
or(IloConstraint con1,
IloConstraint con2)
Creates and returns an or-constraint indicating that at least one and possibly more than one argument is true. |
IloOr |
or(IloConstraint con1,
IloConstraint con2,
java.lang.String name)
Creates and returns an or-constraint indicating that at least one and possibly both of its arguments are true, and it names the new constraint. |
IloNumExpr |
prod(double v,
IloNumExpr e1)
Creates and returns an expression representing the product of the expression e1 and the value v . |
IloNumExpr |
prod(double val,
IloNumVar var1,
IloNumVar var2)
Creates and returns an expression representing the product of the value val , the variable var1 ,
and the variable var2 . |
IloIntExpr |
prod(IloIntExpr e1,
IloIntExpr e2)
Creates and returns the new integer expression e1 * e2 . |
IloIntExpr |
prod(IloIntExpr e,
int v)
Creates and returns the new integer expression e * v . |
IloNumExpr |
prod(IloNumExpr e,
double v)
Creates and returns an expression representing the product of the expression e and the value v . |
IloNumExpr |
prod(IloNumExpr expr1,
IloNumExpr expr2)
Creates and returns an expression representing the product of the expressions expr1 and expr2 . |
IloNumExpr |
prod(IloNumVar var1,
double val,
IloNumVar var2)
Creates and returns an expression representing the product of the variable var1 ,
the value val ,
and the variable var2 . |
IloNumExpr |
prod(IloNumVar var1,
IloNumVar var2,
double val)
Creates and returns an expression representing the product of the variable var1 ,
the variable var2 , and
the value val . |
IloIntExpr |
prod(int v,
IloIntExpr e)
Creates and returns the new integer expression v * e . |
IloRange |
range(double lb,
IloNumExpr expr,
double ub)
Creates and returns an instance of IloRange
initialized to represent the constraint
lb <= expr <= ub . |
IloRange |
range(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates and returns an instance of IloRange
initialized to represent the constraint
lb <= expr <= ub
and assigned the name name . |
IloLinearNumExpr |
scalProd(double[] coefs,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearNumExpr |
scalProd(double[] coefs,
IloNumVar[] vars,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1]
with the variables
provided in vars[start]...vars[start+num-1] . |
IloIntExpr |
scalProd(IloIntVar[] vars1,
IloIntVar[] vars2)
Creates and returns a linear expression representing the scalar product of the provided variables. |
IloIntExpr |
scalProd(IloIntVar[] vars1,
IloIntVar[] vars2,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the variables provided as arguments. |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals)
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables. |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals,
int start,
int num)
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1]
with the integer variables provided in
vars[start]...vars[start+num-1] . |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] coefs)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] coefs,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1]
with the variables
provided in vars[start]...vars[start+num-1] . |
IloNumExpr |
scalProd(IloNumVar[] vars1,
IloNumVar[] vars2)
Creates and returns a linear expression representing the scalar product of the variables provided as arguments. |
IloNumExpr |
scalProd(IloNumVar[] vars1,
IloNumVar[] vars2,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the variables provided in vars1[start]...vars1[start+num-1]
with the variables prodived in
vars2[start]...vars2[start+num-1] . |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
int[] coefs)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars)
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables. |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars,
int start,
int num)
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1]
with the integer variables provided in
vars[start]...vars[start+num-1] . |
IloLinearNumExpr |
scalProd(int[] coefs,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloIntExpr |
square(IloIntExpr e)
Creates and returns the new integer expression e^2 . |
IloNumExpr |
square(IloNumExpr e)
Creates and returns an expression representing the square of the expression e (that is, e * e ). |
IloNumExpr |
sum(double v,
IloNumExpr e)
Creates and returns an expression representing the sum of a value and a numeric expression. |
IloIntExpr |
sum(IloIntExpr[] expr)
Creates and returns an integer expression representing the sum of the expressions provided in the array expr . |
IloIntExpr |
sum(IloIntExpr[] expr,
int start,
int num)
Creates and returns an integer expression representing the sum of the num expressions provided in the array expr
starting with element start . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2)
Adds two integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3)
Adds three integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4)
Adds four integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5)
Adds five integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6)
Adds six integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6,
IloIntExpr e7)
Adds seven integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6,
IloIntExpr e7,
IloIntExpr e8)
Adds eight integer expressions and returns the sum. |
IloIntExpr |
sum(IloIntExpr e,
int v)
Creates and returns an integer expression representing the sum of an integer expression and a value. |
IloNumExpr |
sum(IloNumExpr[] expr)
Creates and returns an expression representing the sum of the expressions provided as terms in the array expr . |
IloNumExpr |
sum(IloNumExpr[] expr,
int start,
int num)
Creates and returns an expression representing the sum of the num expressions provided as terms
in the array expr
starting with element start . |
IloNumExpr |
sum(IloNumExpr e,
double v)
Creates and returns an expression representing the sum of a numeric expression and a value. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2)
Adds two numeric expressions and returns the sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3)
Adds three numeric expressions and returns their sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4)
Adds four numeric expressions and returns the sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5)
Adds five numeric expressions and returns the sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6)
Adds six numeric expressions and returns the sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6,
IloNumExpr e7)
Adds seven numeric expressions and returns the sum. |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6,
IloNumExpr e7,
IloNumExpr e8)
Adds eight numeric expressions and returns the sum. |
IloIntExpr |
sum(int v,
IloIntExpr e)
Creates and returns an integer expression representing the sum of a value and an integer expression. |
Methods inherited from interface ilog.concert.IloModel |
add, add, add, iterator, remove |
Methods inherited from interface ilog.concert.IloAddable |
getName, setName |
Method Detail |
public IloNumVar numVar(double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
This method returns an object representing a new modeling variable with the specified bounds, type, and name.
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 numVar(double lb, double ub, IloNumVarType type) throws IloException
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[] numVarArray(int n, double lb, double ub, IloNumVarType type) throws IloException
n
new modeling objects,
numeric variables with the same
bounds and type, and returns them in an array.
All variables are created with the same bounds and type.
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
n
new modeling objects, numeric variables
with the same bounds and type and distinct names,
and returns them in an array.
All variables are created with the same bounds and type, but with different names.
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, java.lang.String[] name) throws IloException
n
new modeling objects,
numeric variables with distinct bounds, types, and names,
and returns them in an array.
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[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
n
new modeling objects,
numeric variables with distinct
bounds and types, and returns them in an array.
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 numVar(double lb, double ub, java.lang.String name) throws IloException
IloNumVarType.Float
with bounds and name.
This method returns an object representing a new numeric
variable of type IloNumVarType.Float
with the specified bounds and name.
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
IloNumVarType.Float
with specified bounds.
This method returns an object representing a new
modeling variable of the type
IloNumVarType.Float
with the specified bounds.
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
n
initialized to n
new modeling objects that are
numerica variables all of the same type
IloNumVarType.Float
and same bounds.
This method creates n
new modeling
objects of the type IloNumVarType.Float
.
Each new variable has the same specified bounds.
The method returns the new variables in an array.
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, java.lang.String[] name) throws IloException
n
initialized to n
new modeling objects that are
numeric variables
of type IloNumVarType.Float
.
This method creates n
new modeling
objects of type IloNumVarType.Float
.
Each new variable has the same specified bounds.
Each new variable is assigned a name;
variable i
is assigned the name name[i]
.
The method returns the new variables in an array.
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
n
initialized to n
new modeling objects that are
numeric variables of type IloNumVarType.Float
with distinct bounds and distinct names.
This method creates n
new modeling
objects of the type IloNumVarType.Float
.
Each new variable has the same specified bounds.
Each new variable is assigned a name;
Variable i
is assigned the name name[i]
.
The method returns the new variables in an array.
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 IloNumVar[] numVarArray(int n, double[] lb, double[] ub) throws IloException
n
initialized to n
new modeling objects that are
numeric variables of type IloNumVarType.Float
with distinct bounds.
This method creates n
new modeling
objects of the type IloNumVarType.Float
,
each with its own bounds.
Variable i
will be constructed with bounds
lb[i]
and ub[i]
.
It returns the new variables in an array.
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 IloIntVar intVar(int min, int max, java.lang.String name) throws IloException
min
- The minimum value of the variable.max
- The maximum value of the variable.name
- The name of the variable.
IloException
public IloIntVar intVar(int min, int max) throws IloException
min
- The minimum value of the variable.max
- The maximum value of the variable.
IloException
public IloIntVar[] intVarArray(int n, int min, int max) throws IloException
n
integer variables
with the specified bounds.
min
- The lower bound of the new modeling variable.max
- The upper bound of the new modeling variable.
IloException
public IloIntVar[] intVarArray(int n, int min, int max, java.lang.String[] name) throws IloException
n
initialized
to n
new modeling integer
variables, each with the same specified bounds
and returns them in an array.
Each new variable is assigned a name, where
variable i
is assigned the name name[i]
.
min
- The lower bound of the new modeling variable.max
- The upper bound of the new modeling variable.name
- The names of the new modeling variables.
Variable i
is assigned the name name[i]
.
IloException
public IloIntVar[] intVarArray(int n, int[] min, int[] max) throws IloException
n
initialized to n
new integer variables,
each variable with its own bounds.
Variable i
will be constructed with
bounds min[i]
and max[i]
.
min
- The lower bounds of the new modeling variable.
Variable i
will be constructed
with a lower bound of min[i]
.max
- The upper bounds of the new modeling variable.
Variable i
will be constructed
with an upper bound of max[i]
.
IloException
public IloIntVar[] intVarArray(int n, int[] min, int[] max, java.lang.String[] name) throws IloException
n
initialized to n
new integer variables,
each variable with its own bounds.
Variable i
will be constructed with bounds
min[i]
and max[i]
and
will be assigned the name name[i]
.
min
- The lower bounds of the new modeling variable.
Variable i
will be constructed
with a lower bound of min[i]
.max
- The upper bounds of the new modeling variable.
Variable i
will be constructed
with an upper bound of max[i]
.name
- The names of the new modeling variables.
Variable i
will be assigned the name name[i]
.
IloException
public IloIntVar boolVar(java.lang.String name) throws IloException
name
- The name of the variable.
IloException
public IloIntVar boolVar() throws IloException
IloException
public IloIntVar[] boolVarArray(int n) throws IloException
n
new Boolean variables (domain 0,1).
IloException
public IloIntVar[] boolVarArray(int n, java.lang.String[] name) throws IloException
n
new Boolean variables (domain 0,1).
Variable i
will be assigned
the name name[i]
.
IloException
public IloLinearNumExpr linearNumExpr() throws IloException
IloException
public IloLinearNumExpr linearNumExpr(double val) throws IloException
val
.
val
- The constant term of the new linear expression.
val
.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, double[] coefs) throws IloException
vars
- The variables involved in the new scalar product
expression.coefs
- The values involved in the new scalar product
expression.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, double[] coefs, int start, int num) throws IloException
coefs[start]...coefs[start+num-1]
with the variables
provided in vars[start]...vars[start+num-1]
.
coefs
- An array containing the values to be used for the
scalar product.vars
- An array containing the variables to be used for the
scalar product.start
- The first element in coefs
and in
vars
to use for the scalar product.num
- The number of elements in coefs
and in
vars
to use for the scalar product.
IloException
public IloLinearNumExpr scalProd(double[] coefs, IloNumVar[] vars) throws IloException
coefs
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloLinearNumExpr scalProd(double[] coefs, IloNumVar[] vars, int start, int num) throws IloException
coefs[start]...coefs[start+num-1]
with the variables
provided in vars[start]...vars[start+num-1]
.
coefs
- An array containing the values to be used
for the scalar product.vars
- An array containing the variables to be used
for the scalar product.start
- The first element in coefs/vars
to use
for the scalar product.num
- The number of elements in coefs/vars
to use for the scalar product.
IloException
public IloLinearNumExpr scalProd(IloNumVar[] vars, int[] coefs) throws IloException
coefs
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloLinearNumExpr scalProd(int[] coefs, IloNumVar[] vars) throws IloException
coefs
- The values involved in the new scalar product expression.vars
- The variables involved in the new scalar product expression.
IloException
public IloNumExpr scalProd(IloNumVar[] vars1, IloNumVar[] vars2) throws IloException
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 IloNumExpr scalProd(IloNumVar[] vars1, IloNumVar[] vars2, int start, int num) throws IloException
vars1[start]...vars1[start+num-1]
with the variables prodived in
vars2[start]...vars2[start+num-1]
.
This signature of the method allows you to indicate a starting
point and a number of consecutive terms for the scalar multiplication.
In other words, the entire array vars1
will not be
involved in the scalar multiplication. The method will take into
account only the term at the starting point and num
consecutive terms in total.
vars1
- The first array of variables involved in the new scalar
product.vars2
- The second array of variables involved in the
new scalar product.start
- The index of the starting term for the multiplication,
that is, the first element to use in the scalar product.num
- The total number of terms in the multiplication;
that is, the number of elements in each array to use
in the scalar product.
IloException
public IloNumExpr negative(IloNumExpr e) throws IloException
-e
,
the negation of the expression e
.
e
- An expression for which the negative value is given.
e
.
IloException
public IloNumExpr sum(IloNumExpr e, double v) throws IloException
e
- The numeric expression.v
- The value.
e + v
.
IloException
public IloNumExpr sum(double v, IloNumExpr e) throws IloException
v
- The value.e
- The numeric expression.
v + e
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.
e1 + e2
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.
e1 + e2 + e3
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.e4
- The fourth numeric expression.
e1 + e2 + e3 + e4
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.e4
- The fourth numeric expression.e5
- The fifth numeric expression.
e1 + e2 + e3 + e4 + e5
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.e4
- The fourth numeric expression.e5
- The fifth numeric expression.e6
- The sixth numeric expression.
e1 + e2 + e3 + e4 + e5 + e6
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.e4
- The fourth numeric expression.e5
- The fifth numeric expression.e6
- The sixth numeric expression.e7
- The seventh numeric expression.
e1 + e2 + e3 + e4 + e5 + e6 + e7
.
IloException
public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7, IloNumExpr e8) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first numeric expression.e2
- The second numeric expression.e3
- The third numeric expression.e4
- The fourth numeric expression.e5
- The fifth numeric expression.e6
- The sixth numeric expression.e7
- The seventh numeric expression.e8
- The eighth numeric expression.
e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.
IloException
public IloNumExpr sum(IloNumExpr[] expr, int start, int num) throws IloException
num
expressions provided as terms
in the array expr
starting with element start
.
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
expr
.
expr
- An array containing the terms to be summed.
IloException
public IloNumExpr diff(IloNumExpr e, double v) throws IloException
e
and value v
.
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
e1
and e2
.
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
v
and the expression e1
.
v
- A value to use in the difference.e1
- An expression to subtract.
v - e1
.
IloException
public IloNumExpr prod(IloNumExpr e, double v) throws IloException
e
and the value v
.
e
- An expression to use in the product.v
- A value to add.
e * v
.
IloException
public IloNumExpr prod(IloNumExpr expr1, IloNumExpr expr2) throws IloException
expr1
and expr2
.
expr1
- An expression to use in the product.expr2
- An expression to use in the product.
expr1 * expr2
.
IloException
public IloNumExpr prod(double v, IloNumExpr e1) throws IloException
e1
and the value v
.
e1
- An expression to use in the product.v
- A value to use in the product.
e1 * v
.
IloException
public IloNumExpr prod(double val, IloNumVar var1, IloNumVar var2) throws IloException
val
, the variable var1
,
and the variable var2
.
val
- The value to be used in the product.var1
- The first variable to be used in the product.var2
- The second variable to be used in the product.
val * var1 * var2
.
IloException
public IloNumExpr prod(IloNumVar var1, double val, IloNumVar var2) throws IloException
var1
,
the value val
,
and the variable var2
.
var1
- The first variable to be used in the product.val
- The value to be used in the product.var2
- The second variable to be used in the product.
val * var1 * var2
.
IloException
public IloNumExpr prod(IloNumVar var1, IloNumVar var2, double val) throws IloException
var1
,
the variable var2
, and
the value val
.
var1
- The first variable to be used in the product.var2
- The second variable to be used in the product.val
- The value to be used in the product.
var1 * var2 * val
.
IloException
public IloNumExpr square(IloNumExpr e) throws IloException
e
(that is, e * e
).
e
- An expression to use in the square.
e * e
.
IloException
public IloNumExpr constant(double c) throws IloException
c
.
This method does not need to be called by the user, as overloaded versions of all methods involving expressions are available to deal directly with constants.
c
- A value for which to construct a constant expression term.
c
.
IloException
public IloNumExpr numExpr() throws IloException
IloException
public IloNumExpr max(IloNumExpr e1, IloNumExpr e2) throws IloException
max(e1, e2)
.
IloException
public IloNumExpr max(double val, IloNumExpr e2) throws IloException
max(val, e2)
.
IloException
public IloNumExpr max(IloNumExpr e1, double val) throws IloException
max(e1, val)
.
IloException
public IloNumExpr max(IloNumExpr[] e) throws IloException
max(e)
,
the maximum over the array.
e
- The array of expressions.
IloException
public IloNumExpr min(IloNumExpr e1, IloNumExpr e2) throws IloException
min(e1, e2)
.
IloException
public IloNumExpr min(double val, IloNumExpr e2) throws IloException
min(val, e2)
.
IloException
public IloNumExpr min(IloNumExpr e1, double val) throws IloException
min(e1, val)
.
IloException
public IloNumExpr min(IloNumExpr[] e) throws IloException
min(e)
,
the minimum over the array.
IloException
public IloLinearIntExpr linearIntExpr() throws IloException
IloException
public IloLinearIntExpr linearIntExpr(int val) throws IloException
val
.
val
- Constant term of the new linear expression.
val
.
IloException
public IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars) throws IloException
vals
- The integer values involved in the new scalar product.vars
- The integer variables involved in the new scalar product
IloException
public IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars, int start, int num) throws IloException
vals[start]...vals[start+num-1]
with the integer variables provided in
vars[start]...vars[start+num-1]
.
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) throws IloException
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(IloIntVar[] vars, int[] vals, int start, int num) throws IloException
vals[start]...vals[start+num-1]
with the integer variables provided in
vars[start]...vars[start+num-1]
.
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
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
vars1
- The first array of variables involved in the new scalar
product expression.vars2
- The second array of variables involved in the new
scalar product expression.start
- First element in vars1
and
vars2
to be used for the scalar product.num
- Number of elements in vars1
and
vars2
to be used for the scalar product.
IloException
public IloIntExpr negative(IloIntExpr e) throws IloException
-e
,
the negation of the expression e
.
e
- An integer expression for which the negative value is given.
e
.
IloException
public IloIntExpr sum(IloIntExpr e, int v) throws IloException
e
- The integer expression.v
- The value.
e + v
.
IloException
public IloIntExpr sum(int v, IloIntExpr e) throws IloException
v
- The value.e
- The integer expression.
e + v
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.
e1 + e2
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.
exp
, representing the
sum e1 +e2 +e3
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.e4
- The fourth integer expression.
exp
, representing the
sum e1 + e2 + e3 +e 4
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.e4
- The fourth integer expression.e5
- The fifth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.e4
- The fourth integer expression.e5
- The fifth integer expression.e6
- The sixth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.e4
- The fourth integer expression.e5
- The fifth integer expression.e6
- The sixth integer expression.e7
- The seventh integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6 + e7
.
IloException
public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7, IloIntExpr e8) throws IloException
The domain of the resulting expression is computed from the domains of the combined expressions.
e1
- The first integer expression.e2
- The second integer expression.e3
- The third integer expression.e4
- The fourth integer expression.e5
- The fifth integer expression.e6
- The sixth integer expression.e7
- The seventh integer expression.e8
- The eighth integer expression.
exp
, representing the
sum e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.
IloException
public IloIntExpr sum(IloIntExpr[] expr, int start, int num) throws IloException
num
expressions provided in the array expr
starting with element start
.
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
expr
.
expr
- An array containing the expressions to be summed.
IloException
public IloIntExpr diff(IloIntExpr e, int v) throws IloException
e
and value v
.
e
- An integer expression to use in the difference.v
- A value to subtract
e - v
.
IloException
public IloIntExpr diff(IloIntExpr expr1, IloIntExpr expr2) throws IloException
expr1
and expr2
.
expr1
- An integer expression to use in the difference.expr2
- An integer expression to subtract.
expr1 - expr2
.
IloException
public IloIntExpr diff(int v, IloIntExpr e1) throws IloException
v
and the integer expression e1
.
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
e * v
.
IloException
public IloIntExpr prod(IloIntExpr e1, IloIntExpr e2) throws IloException
e1 * e2
.
IloException
public IloIntExpr prod(int v, IloIntExpr e) throws IloException
v * e
.
IloException
public IloIntExpr square(IloIntExpr e) throws IloException
e^2
.
IloException
public IloIntExpr constant(int c) throws IloException
c
.
c
- The value of the constant expression.
IloException
public IloIntExpr intExpr() throws IloException
IloException
public IloIntExpr max(IloIntExpr e1, IloIntExpr e2) throws IloException
max(e1, e2)
.
IloException
public IloIntExpr max(int val, IloIntExpr e2) throws IloException
max(val, e2)
.
IloException
public IloIntExpr max(IloIntExpr e1, int val) throws IloException
max(e1, val)
.
IloException
public IloIntExpr max(IloIntExpr[] e) throws IloException
max(e)
.
e
- the array of expressions
IloException
public IloIntExpr min(IloIntExpr e1, IloIntExpr e2) throws IloException
min(e1, e2)
.
IloException
public IloIntExpr min(int val, IloIntExpr e2) throws IloException
min(val, e2)
.
IloException
public IloIntExpr min(IloIntExpr e1, int val) throws IloException
min(e1, val)
.
IloException
public IloIntExpr min(IloIntExpr[] e) throws IloException
min(e)
.
IloException
public IloIntExpr abs(IloIntExpr e) throws IloException
abs(e)
,
the absolute value of its argument.
IloException
public IloConstraint eq(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
initialized to represent the constraint e1 == e2
.
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
IloRange
initialized to represent the constraint e1 == e2
and
assigned the name name
.
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(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr == rhs
.
expr
- Expression of the new equality constraint.rhs
- Upper bound of the new equality constraint.
IloRange
object initialized to
represent the constraint expr == rhs
.
IloException
public IloRange eq(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr == rhs
and assigned the name name
.
expr
- Expression of the new equality constraint.rhs
- 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 IloRange eq(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val == expr
.
val
- Value of the new equality constraint.expr
- Expression of the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange eq(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val == expr
and assigned the name name
.
val
- Value of the new equality constraint.expr
- 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 le(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr <= rhs
.
expr
- Expression of the new less-than-or-equal-to constraint.rhs
- Upper bound of the new less-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint expr <= rhs
.
IloException
public IloRange le(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr <= rhs
and assigned the name name
.
expr
- Expression of the new less-than-or-equal-to
constraint.rhs
- Upper bound of the new less-than-or-equal-to
constraint.name
- Name assigned to the new less-than-or-equal-to
constraint.
IloRange
object
initialized to represent the
constraint expr <= rhs
.
IloException
public IloConstraint le(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
initialized to represent the constraint e1 <= e2
.
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.
IloRange
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloConstraint le(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint e1 <= e2
and assigned the name name
.
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.
IloRange
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloRange le(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val <= expr
.
val
- Value of the new less-than-or-equal-to constraint.expr
- Expression of the new less-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val <= expr
.
IloException
public IloRange le(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val <= expr
and assigned the name name
.
val
- Value of the new less-than-or-equal-to constraint.expr
- Expression of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val <= expr
.
IloException
public IloRange ge(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr >= rhs
.
expr
- Expression of the new greater-than-or-equal-to constraint.rhs
- 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 expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr >= rhs
and assigned the name name
.
expr
- Expression of the new greater-than-or-equal-to constraint.rhs
- Upper bound of the new greater-than-or-equal-to constraint.name
- Name assigned to the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint expr >= rhs
.
IloException
public IloConstraint ge(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
initialized to represent the constraint e1 >= e2
.
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.
IloRange
object
initialized to represent the
constraint e1 >= e2
.
IloException
public IloConstraint ge(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint e1 >= e2
and assigned the name name
.
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.
IloRange
object initialized
to represent the
constraint e1 >= e2
.
IloException
public IloRange ge(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val >= expr
.
val
- Value of the new greater-than-or-equal-to constraint.expr
- Expression of the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val >= expr
.
IloException
public IloRange ge(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val >= expr
and assigned the name name
.
val
- Value of the new greater-than-or-equal-to constraint.expr
- Expression of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object
initialized to represent the
constraint val >= expr
.
IloException
public IloRange range(double lb, IloNumExpr expr, double ub) throws IloException
IloRange
initialized to represent the constraint
lb <= expr <= ub
.
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, IloNumExpr expr, double ub, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint
lb <= expr <= ub
and assigned the name name
.
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 addEq(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr == rhs
,
and added to the invoking IloModel
.
expr
- Expression of the new equality constraint.rhs
- Upper bound of the new equality constraint.
IloRange
object initialized
to represent the constraint expr == rhs
.
IloException
public IloRange addEq(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr == rhs
,
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
expr
- Expression of the new equality constraint.rhs
- 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
IloRange
initialized to represent the constraint e1 == e2
,
and added to the invoking instance of IloModeler
.
e1
- Lefthand side expression of the new equality constraint.e2
- Righthand side expression of the new equality constraint.
IloRange
object initialized to represent
the constraint e1 == e2
.
IloException
public IloConstraint addEq(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint e1 == e2
,
and added to the invoking instance of IloModeler
.
The new IloRange
object
is assigned the name name
.
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 addEq(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val == expr
and added to the invoking instance of IloModeler
.
val
- Value of the new equality constraint.expr
- Expression of the new equality constraint.
IloRange
object
initialized to represent the
constraint val == expr
.
IloException
public IloRange addEq(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val == expr
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
val
- Value of the new equality constraint.expr
- 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 addLe(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr <= rhs
and added to the invoking instance of IloModeler
.
expr
- Expression of the new less-than-or-equal-to constraint.rhs
- 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 expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr <= rhs
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
expr
- Expression of the new less-than-or-equal-to constraint.rhs
- Upper bound of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr <= rhs
.
IloException
public IloConstraint addLe(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
initialized to represent the constraint e1 <= e2
,
and added to the invoking instance of 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.
IloRange
object initialized to represent
the constraint e1 <= e2
.
IloException
public IloConstraint addLe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint e1 <= e2
and added to the invoking instance of IloModeler
.
The new IloRange
object
is assigned the name name
.
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.
IloRange
object
initialized to represent the
constraint e1 <= e2
.
IloException
public IloRange addLe(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val <= expr
and added to the invoking instance of IloModeler
.
val
- Value of the new less-than-or-equal-to constraint.expr
- Expression of the new less-than-or-equal-to constraint.
IloRange
object initialized to
represent the constraint val <= exp
.
IloException
public IloRange addLe(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val <= expr
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
val
- Value of the new less-than-or-equal-to constraint.expr
- Expression of the new less-than-or-equal-to constraint.name
- Name assigned to the new less-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint val <= expr
.
IloException
public IloRange addGe(IloNumExpr expr, double rhs) throws IloException
IloRange
initialized to represent the constraint expr >= rhs
and added to the invoking instance of IloModeler
.
expr
- Expression of the new greater-than-or-equal-to constraint.rhs
- 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 expr, double rhs, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint expr >= rhs
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
expr
- Expression of the new greater-than-or-equal-to constraint.rhs
- Upper bound of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object initialized to represent
the constraint expr >= rhs
.
IloException
public IloConstraint addGe(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
initialized to represent the constraint e1 >= e2
and added to the invoking instance of 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.
IloRange
object initialized to represent
the constraint e1 >= e2
.
IloException
public IloConstraint addGe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint e1 >= e2
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
e1
- Lefthand side expression of the new
greater-than-or-equal-to constraint.e2
- Righthand side expression of the new
greater-than-or-equal-to constraint.name
- Name assigned to the new IloRange
constraint.
IloRange
object initialized to represent
the constraint e1 >= e2
.
IloException
public IloRange addGe(double val, IloNumExpr expr) throws IloException
IloRange
initialized to represent the constraint val >= expr
and added to the invoking instance of IloModeler
.
val
- Value of the new greater-than-or-equal-to constraint.expr
- Expression of the new greater-than-or-equal-to
constraint.
IloRange
object initialized to
represent the constraint val >= expr
.
IloException
public IloRange addGe(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint val >= expr
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
val
- Value of the new greater-than-or-equal-to constraint.expr
- Expression of the new greater-than-or-equal-to constraint.name
- Name of the new greater-than-or-equal-to constraint.
IloRange
object initialized to
represent the constraint val >= expr
.
IloException
public IloRange addRange(double lb, IloNumExpr expr, double ub) throws IloException
IloRange
initialized to represent the constraint
lb <= expr <= ub
and added to the invoking instance of 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, IloNumExpr expr, double ub, java.lang.String name) throws IloException
IloRange
initialized to represent the constraint
lb <= expr <= ub
and added to the invoking instance of IloModeler
.
The new IloRange
object is assigned the name name
.
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 IloObjective maximize(IloNumExpr expr) throws IloException
IloObjective
representing an objective to maximize the expression expr
.
expr
- Expression to maximize.
IloObjective
object representing the
objective to maximize expr
.
IloException
public IloObjective maximize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
representing an objective to maximize the expression
expr
and assigned the name name
.
expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the
objective to maximize expr
.
IloException
public IloObjective minimize(IloNumExpr expr) throws IloException
IloObjective
representing an objective to minimize the expression expr
.
expr
- Expression to minimize.
IloObjective
object representing the objective
to minimize expr
.
IloException
public IloObjective minimize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
representing an objective to minimize the expression
expr
and assigned the name name
.
expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing the objective
to minimize expr
.
IloException
public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
IloObjective
representing an objective to optimize the expression
expr
with respect to the
optimization sense indicated by sense
.
sense
- Optimization sense.expr
- Expression to maximize.
IloObjective
object representing the objective
to maximize expr
.
IloException
public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
representing an objective to optimize the expression
expr
with respect to the
optimization sense indicated by sense
and
assigned the name name
.
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 addMaximize(IloNumExpr expr) throws IloException
IloObjective
representing an objective to maximize the expression expr
and added to the invoking model.
expr
- Expression to maximize.
IloObjective
object representing the objective
to maximize expr
.
IloException
public IloObjective addMaximize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
,
representing an objective to maximize the expression expr
,
assigned the name name
, and added to the invoking model.
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
IloObjective
representing an objective to minimize the expression expr
and added to the invoking model.
expr
- Expression to minimize.
IloObjective
object representing
the objective to minimize expr
.
IloException
public IloObjective addMinimize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
representing an objective to minimize the expression expr
,
assigned the name name
, and added to the invoking model.
expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.
IloObjective
object representing
the objective to minimize expr
.
IloException
public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
IloObjective
representing an objective to optimize the expression
expr
with respect to the optimization sense
indicated by sense
and added to the invoking model.
sense
- Optimization sense.expr
- Expression to maximize.
IloObjective
object representing
the objective to maximize expr
.
IloException
public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
representing an objective to optimize the expression expr
with respect to the optimization sense indicated by sense
,
assigned the name name
, and
added to the invoking model.
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 IloAnd and() throws IloException
IloAnd
constraint
suitable for grouping
other constraints or building logical constraints. Constraints can be
added to and removed from the IloAnd
constraint by its
methods add
and remove
.
IloException
IloAnd
public IloAnd and(IloConstraint[] cons) throws IloException
cons
- The array of constraints to group.
IloException
IloAnd
public IloAnd and(IloConstraint[] cons, java.lang.String name) throws IloException
cons
- The array of constraints to group.name
- The name of the resulting and-constraint.
IloException
IloAnd
public IloAnd and(IloConstraint[] cons, int start, int num) throws IloException
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 IloAnd and(IloConstraint[] cons, int start, int num, java.lang.String name) throws IloException
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 IloAnd and(IloConstraint con1, IloConstraint con2) throws IloException
con1
- The first constraint to group.con2
- The second constraint to group.
IloException
IloAnd
public IloAnd and(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
con1
- The first constraint to group.con2
- The second constraint to group.name
- The name of the resulting and-constraint.
IloException
IloAnd
public IloOr or() throws IloException
IloOr
constraint
for expressing disjunctions.
Constraints can be
added to and removed from the IloOr
constraint by its
methods add
and remove
.
IloException
IloOr
public IloOr or(IloConstraint[] cons) throws IloException
cons
, an array
of constraints.
In other words, it returns the logical-or of two or more constraints.
IloException
public IloOr or(IloConstraint[] cons, java.lang.String name) throws IloException
cons
, an array
of constraints.
In other words, it returns the logical-or of two or more constraints.
It also assigns the string name
as the
name of that returned constraint.
IloException
public IloOr or(IloConstraint[] cons, int start, int num) throws IloException
start
and continuing through the number
of elements indicated by the number num
among the elements
of its argument cons
, an array of constraints.
In other words, it returns the logical-or of
num
constraints.
IloException
public IloOr or(IloConstraint[] cons, int start, int num, java.lang.String name) throws IloException
In other words, it returns
an or-constraint indicating that at least one and
possibly more than one
of the elements is true in the range of indices starting at the index
indicated by start
and continuing through the number
of elements indicated by the number num
among the elements
of its argument cons
, an array of constraints.
This method also assigns the string name
as the name of
the returned constraint.
IloException
public IloOr or(IloConstraint con1, IloConstraint con2) throws IloException
In other words, it returns the logical-or of two constraints.
IloException
public IloOr or(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
In other words, it returns the logical-or of
two constraints. It also assigns the string name
as
the name of that returned constraint.
IloException
public IloConstraint ifThen(IloConstraint con1, IloConstraint con2) throws IloException
con1
is true, then
con2
must also be true.
In other words, it returns a conditional constraint based on its arguments.
IloException
public IloConstraint ifThen(IloConstraint con1, IloConstraint con2, java.lang.String name) throws IloException
con1
is true, then
con2
must also be true, and it names the new constraint.
In other words, it returns
a conditional constraint based on its arguments. It also assigns
the string name
as the name of the returned constraint.
IloException
public IloConstraint not(IloConstraint con1) throws IloException
IloException
public IloConstraint not(IloConstraint con1, java.lang.String name) throws IloException
name
as the name of the
returned constraint.
IloException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |