|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | 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.
Note that there are two interfaces derived from IloModeler
:
IloCPModeler
, available in ILOG JSolver and IloMPModeler
, available in ILOG CPLEX.
IloCPModeler
defines the API for constraint-based engines. (An engine is an object whose
function is to manipulate models that include variables and constraints.)
IloMPModeler
is a modeling interface for Mathematical Programming.
It adds support for several new modeling object interfaces, including LP
matrices, semi-continuous variables, and special ordered sets (SOSs). It
extends the functionality of IloModeler
to column-wise
modeling and supports modification of variable types and expressions of ranged
constraints and objective functions.
Method Summary | |
IloRange |
addEq(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
addEq(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addEq(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
addEq(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addEq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
addEq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addGe(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
addGe(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addGe(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
addGe(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addGe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
addGe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addLe(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
addLe(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addLe(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
addLe(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
addLe(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
addLe(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloObjective |
addMaximize(IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
addMaximize(IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloObjective |
addMinimize(IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
addMinimize(IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
addObjective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub)
Creates and returns an IloRange object. |
IloRange |
addRange(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates and returns an IloRange object. |
IloIntVar |
boolVar()
Creates and returns a new Boolean variable (domain 0,1) |
IloIntVar |
boolVar(java.lang.String name)
Creates and returns a new Boolean variable (domain 0,1) and a name. |
IloIntVar[] |
boolVarArray(int n)
Creates and returns an array of n new Boolean variables (domain 0,1). |
IloIntVar[] |
boolVarArray(int n,
java.lang.String[] name)
Creates and returns an array of n new Boolean variables (domain 0,1). |
IloNumExpr |
constant(double x)
Creates and returns an expression object representing the constant term x . |
IloIntExpr |
constant(int x)
Creates and returns a new constant expression equal to x . |
IloNumExpr |
diff(double v,
IloNumExpr e1)
Creates and returns an expression object representing the difference of expression e and value v . |
IloIntExpr |
diff(IloIntExpr expr1,
IloIntExpr expr2)
Creates and returns an integer expression object representing the difference of integer expressions expr1 and expr2 . |
IloIntExpr |
diff(IloIntExpr e,
int v)
Creates and returns an integer expression object representing the difference of integer expression e and value v . |
IloNumExpr |
diff(IloNumExpr e,
double v)
Creates and returns an expression object representing the difference of expression e and value v . |
IloNumExpr |
diff(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an expression object representing the difference of expressions e1 and e2 . |
IloIntExpr |
diff(int v,
IloIntExpr e1)
Creates and returns an integer expression object representing the difference of value v and integer expression e1 . |
IloRange |
eq(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
eq(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
eq(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
eq(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
eq(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
eq(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
ge(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
ge(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
ge(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
ge(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
ge(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
ge(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloIntVar |
intVar(int min,
int max)
Creates and returns a new integer variable with the specified bounds. |
IloIntVar |
intVar(int min,
int max,
java.lang.String name)
Creates and returns a new integer variable with the specified bounds and a name. |
IloIntVar[] |
intVarArray(int n,
int[] min,
int[] max)
Creates an array of length n initialized to n new integer variables,
each variable with its own bounds. |
IloIntVar[] |
intVarArray(int n,
int[] min,
int[] max,
java.lang.String[] name)
Creates an array of length n initialized to n new integer variables,
each variable with its own bounds. |
IloIntVar[] |
intVarArray(int n,
int min,
int max)
Returns a new array of n integer variables
with the specified bounds. |
IloIntVar[] |
intVarArray(int n,
int min,
int max,
java.lang.String[] name)
Creates an array of length n initialized to n new modeling integer
variables, each with the same specified bounds
and returns them in an array. |
IloRange |
le(double val,
IloNumExpr expr)
Creates and returns an IloRange object. |
IloRange |
le(double val,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
le(IloNumExpr expr,
double rhs)
Creates and returns an IloRange object. |
IloRange |
le(IloNumExpr expr,
double rhs,
java.lang.String name)
Creates and returns an IloRange object. |
IloRange |
le(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an IloRange object. |
IloRange |
le(IloNumExpr e1,
IloNumExpr e2,
java.lang.String name)
Creates and returns an IloRange object. |
IloLinearIntExpr |
linearIntExpr()
Creates and returns a zero integer linear expression. |
IloLinearIntExpr |
linearIntExpr(int val)
Creates and returns an integer linear expression initialized to a constant. |
IloLinearNumExpr |
linearNumExpr()
Creates and returns a zero linear expression. |
IloLinearNumExpr |
linearNumExpr(double val)
Creates and returns a linear expression initialized to a constant. |
IloObjective |
maximize(IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
maximize(IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloObjective |
minimize(IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
minimize(IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloIntExpr |
negative(IloIntExpr e)
Creates and returns the new expression -e ,
the negative of the expression e . |
IloNumExpr |
negative(IloNumExpr e)
Creates and returns the new expression -e ,
the negative of the expression e . |
IloNumVar |
numVar(double lb,
double ub)
Creates a new modeling variable object of the type IloNumVarType.Float . |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type)
Creates a new numerical variable object. |
IloNumVar |
numVar(double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates a new modeling variable object. |
IloNumVar |
numVar(double lb,
double ub,
java.lang.String name)
Creates a new modeling variable object of the type IloNumVarType.Float . |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub)
Creates an array of length n initialized to n new modeling variable
objects of type IloNumVarType.Float . |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates n new numerical variable objects and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates n new numerical variable objects and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double[] lb,
double[] ub,
java.lang.String[] name)
Creates an array of length n initialized to n new modeling variable
objects of type IloNumVarType.Float . |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub)
Creates an array of length n initialized to n new modeling variable
objects of the type IloNumVarType.Float . |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type)
Creates n new numerical variable objects and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates n new numerical variable objects and returns them in an array. |
IloNumVar[] |
numVarArray(int n,
double lb,
double ub,
java.lang.String[] name)
Creates an array of length n initialized to n new modeling variable
objects of type IloNumVarType.Float . |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr)
Creates and returns an IloObjective object. |
IloObjective |
objective(IloObjectiveSense sense,
IloNumExpr expr,
java.lang.String name)
Creates and returns an IloObjective object. |
IloNumExpr |
prod(double v,
IloNumExpr e1)
Creates and returns an expression object representing the product of the expression e and the value v . |
IloIntExpr |
prod(IloIntExpr e1,
IloIntExpr e2)
Creates and returns the new expression e1 * e2 . |
IloIntExpr |
prod(IloIntExpr e,
int v)
Creates and returns the new expression e * v . |
IloNumExpr |
prod(IloNumExpr e,
double v)
Creates and returns an expression object representing the product of expression e and value v . |
IloNumExpr |
prod(IloNumExpr expr1,
IloNumExpr expr2)
Creates and returns an expression object representing the product of expressions expr1 and expr2 . |
IloIntExpr |
prod(int v,
IloIntExpr e)
Creates and returns the new expression v * e . |
IloRange |
range(double lb,
IloNumExpr expr,
double ub)
Creates and returns an IloRange object. |
IloRange |
range(double lb,
IloNumExpr expr,
double ub,
java.lang.String name)
Creates and returns an IloRange object. |
IloLinearNumExpr |
scalProd(double[] coefs,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearNumExpr |
scalProd(double[] coefs,
IloNumVar[] vars,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables
provided in vars[start]...vars[start+num-1] . |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals)
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables. |
IloLinearIntExpr |
scalProd(IloIntVar[] vars,
int[] vals,
int start,
int num)
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1]
with the integer variables provided in vars[start]...vars[start+num-1] . |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] coefs)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
double[] coefs,
int start,
int num)
Creates and returns a linear expression representing the scalar product of the values provided in coefs[start]...coefs[start+num-1] with the variables
provided in vars[start]...vars[start+num-1] . |
IloLinearNumExpr |
scalProd(IloNumVar[] vars,
int[] coefs)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars)
Creates and returns an integer linear expression representing the scalar product of the provided integer values with the provided integer variables. |
IloLinearIntExpr |
scalProd(int[] vals,
IloIntVar[] vars,
int start,
int num)
Creates and returns an integer linear expression representing the scalar product of the integer values provided in vals[start]...vals[start+num-1]
with the integer variables provided in vars[start]...vars[start+num-1] . |
IloLinearNumExpr |
scalProd(int[] coefs,
IloNumVar[] vars)
Creates and returns a linear expression representing the scalar product of the provided values with the provided variables. |
IloIntExpr |
square(IloIntExpr e)
Creates and returns the new expression e^2 . |
IloNumExpr |
square(IloNumExpr e)
Creates and returns an expression object representing the square of the expression e (that is, e * e ). |
IloNumExpr |
sum(double v,
IloNumExpr e)
Creates and returns an expression object representing the sum of value v
and expression e . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2)
Creates and returns the expression e1 + e2 , representing the sum of
integer expressions e1 and e2 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2 and e3 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3 and e4 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4 and e5 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5 and e6 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6,
IloIntExpr e7)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6 and e7 . |
IloIntExpr |
sum(IloIntExpr e1,
IloIntExpr e2,
IloIntExpr e3,
IloIntExpr e4,
IloIntExpr e5,
IloIntExpr e6,
IloIntExpr e7,
IloIntExpr e8)
Creates and returns an integer expression object representing the sum of integer expressions e1, e2, e3, e4, e5, e6, e7 and e8 . |
IloIntExpr |
sum(IloIntExpr e,
int v)
Creates and returns the expression e + v , representing the sum of
integer expression e and value v . |
IloNumExpr |
sum(IloNumExpr e,
double v)
Creates and returns an expression object representing the sum of value v
and expression e . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2)
Creates and returns an expression object representing the sum of expressions e1 and e2 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3)
Creates and returns an expression object representing the sum of expressions e1 , e2 and e3 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4)
Creates and returns an expression object representing the sum of expressions e1, e2, e3 and e4 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5)
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4 and e5 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6)
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5 and e6 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6,
IloNumExpr e7)
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6 and e7 . |
IloNumExpr |
sum(IloNumExpr e1,
IloNumExpr e2,
IloNumExpr e3,
IloNumExpr e4,
IloNumExpr e5,
IloNumExpr e6,
IloNumExpr e7,
IloNumExpr e8)
Creates and returns an expression object representing the sum of expressions e1, e2, e3, e4, e5, e6, e7 and e8 . |
IloIntExpr |
sum(int v,
IloIntExpr e)
Creates and returns the expression v + e , representing the sum of
value v and integer expression e . |
Methods inherited from interface ilog.concert.IloModel |
add,
add,
add,
iterator,
remove,
remove,
remove |
Methods inherited from interface ilog.concert.IloAddable |
getName,
setName |
Method Detail |
public IloNumVar numVar(double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
lb
- The lower bound of the new numerical variable.ub
- The upper bound of the new numerical variable.type
- The type of the new numerical variable.name
- The name of the new numerical variable.public IloNumVar numVar(double lb, double ub, IloNumVarType type) throws IloException
lb
- The lower bound of the new numerical variable.ub
- The upper bound of the new numerical variable.type
- The type of the new numerical variable.public IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type) throws IloException
n
new numerical variable objects and returns them in an array.
All variables are created with the same bounds and type.n
- The number of new numerical variables.lb
- The lower bound of the new numerical variables.ub
- The upper bound of the new numerical variables.type
- The type of the new numerical variables.n
new numerical variable
objects.public IloNumVar[] numVarArray(int n, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
n
new numerical variable objects and returns them in an array.
All variables are created with the same bounds and type, but with
different names.lb
- The lower bound of the new numerical variables.ub
- The upper bound of the new numerical variables.type
- The type of the new numerical variables.name
- The names of the new numerical variables. Variable i
is assigned the name name[i]
.n
new numerical variable
objects.public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
n
new numerical variable objects and returns them in an array.lb
- The lower bounds of the new numerical variables.
Variable i
is constructed with
the lower bound lb[i]
.ub
- The upper bounds of the new numerical variables.
Variable i
is constructed with
the upper bound ub[i]
.type
- The types of the new numerical variables.
Variable i
is constructed with
the type type[i]
.name
- The names of the new numerical variables. Variable i
is assigned the name name[i]
.n
new numerical variable
objects.public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, IloNumVarType[] type) throws IloException
n
new numerical variable objects and returns them in an array.lb
- The lower bounds of the new numerical variables.
Variable i
is constructed with the lower bound lb[i]
.ub
- The upper bounds of the new numerical variables.
Variable i
is constructed with the upper bound ub[i]
.type
- The types of the new numerical variables.
Variable i
is constructed with the type type[i]
.n
new numerical variable
objects.public IloNumVar numVar(double lb, double ub, java.lang.String name) throws IloException
IloNumVarType.Float
.
This method returns an object representing a new modeling 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.public IloNumVar numVar(double lb, double ub) throws IloException
IloNumVarType.Float
.
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.public IloNumVar[] numVarArray(int n, double lb, double ub) throws IloException
n
initialized to n
new modeling variable
objects of the type IloNumVarType.Float
. This method creates n
new modeling
variables of the type IloNumVarType.Float
, each with the same specified bounds
and returns them in an array.lb
- The lower bound of the new modeling variable.ub
- The upper bound of the new modeling variable.public IloNumVar[] numVarArray(int n, double lb, double ub, java.lang.String[] name) throws IloException
n
initialized to n
new modeling variable
objects of type IloNumVarType.Float
. This method creates n
new modeling
variables of type IloNumVarType.Float
, each with the same specified bounds,
and returns them in an array. Each new variable is assigned a name, where
variable i
is assigned the name name[i]
.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]
.public IloNumVar[] numVarArray(int n, double[] lb, double[] ub, java.lang.String[] name) throws IloException
n
initialized to n
new modeling variable
objects of type IloNumVarType.Float
. This method creates n
new modeling
variables of the type IloNumVarType.Float
, each with the same specified bounds,
and returns them in an array. Each new variable is assigned a name, where
variable i
is assigned the name name[i]
.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]
.public IloNumVar[] numVarArray(int n, double[] lb, double[] ub) throws IloException
n
initialized to n
new modeling variable
objects of type IloNumVarType.Float
. This method creates n new modeling
variables of the type IloNumVarType.Float
, each with its own bounds, and
returns them in an array. Variable i
will be constructed with bounds
lb[i]
and ub[i]
.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]
.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.public IloIntVar intVar(int min, int max) throws IloException
min
- The minimum value of the variable.max
- The maximum value of the variable.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.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]
.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]
.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]
.public IloIntVar boolVar(java.lang.String name) throws IloException
name
- The name of the variable.public IloIntVar boolVar() throws IloException
public IloIntVar[] boolVarArray(int n) throws IloException
n
new Boolean variables (domain 0,1).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]
.public IloLinearNumExpr linearNumExpr() throws IloException
public IloLinearNumExpr linearNumExpr(double val) throws IloException
val
- The constant term of the new linear expression.val
.public IloLinearNumExpr scalProd(IloNumVar[] vars, double[] coefs) throws IloException
coefs
- The values involved in the new scalar product
expression.vars
- The variables involved in the new scalar product
expression.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/vars
to use for the scalar product.num
- The number of elements in coefs/vars
to use for the scalar product.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.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.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.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.public IloNumExpr negative(IloNumExpr e) throws IloException
-e
,
the negative of the expression e
.e
- An expression for which the negative value is given.e
.public IloNumExpr sum(IloNumExpr e, double v) throws IloException
v
and expression e
.v
- A value to use in the sum.e
- An expression to use in the sum.v + e
.public IloNumExpr sum(double v, IloNumExpr e) throws IloException
v
and expression e
.v
- A value to use in the sum.e
- An expression to use in the sum.v + e
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2) throws IloException
e1
and e2
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e1 + e2
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3) throws IloException
e1
, e2
and e3
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e1 + e2 + e3
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4) throws IloException
e1, e2, e3 and e4
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e4
- An expression to use in the sum.e1 + e2 + e3 + e4
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5) throws IloException
e1, e2, e3, e4 and e5
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e4
- An expression to use in the sum.e5
- An expression to use in the sum.e1 + e2 + e3 + e4 + e5
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6) throws IloException
e1, e2, e3, e4, e5 and e6
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e4
- An expression to use in the sum.e5
- An expression to use in the sum.e6
- An expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7) throws IloException
e1, e2, e3, e4, e5, e6 and e7
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e4
- An expression to use in the sum.e5
- An expression to use in the sum.e6
- An expression to use in the sum.e7
- An expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6 + e7
.public IloNumExpr sum(IloNumExpr e1, IloNumExpr e2, IloNumExpr e3, IloNumExpr e4, IloNumExpr e5, IloNumExpr e6, IloNumExpr e7, IloNumExpr e8) throws IloException
e1, e2, e3, e4, e5, e6, e7 and e8
.e1
- An expression to use in the sum.e2
- An expression to use in the sum.e3
- An expression to use in the sum.e4
- An expression to use in the sum.e5
- An expression to use in the sum.e6
- An expression to use in the sum.e7
- An expression to use in the sum.e8
- An expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.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 use in the difference.e - v
.public IloNumExpr diff(IloNumExpr e1, IloNumExpr e2) throws IloException
e1
and e2
.e1
- An expression to use in the difference.e2
- An expression to use in the difference.e1 - e2
.public IloNumExpr diff(double v, IloNumExpr e1) throws IloException
e
and value v
.e
- An expression to use in the difference.v
- A value to use in the difference.e - v
.public IloNumExpr prod(IloNumExpr e, double v) throws IloException
e
and value v
.e
- An expression to use in the product.v
- A value to use in the product.e * v
.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
.public IloNumExpr prod(double v, IloNumExpr e1) throws IloException
e
and the value v
.e
- An expression to use in the product.v
- A value to use in the product.e * v
.public IloNumExpr square(IloNumExpr e) throws IloException
e
(that is, e * e
).e
- An expression to use in the square.e * e
.public IloNumExpr constant(double x) throws IloException
x
.
This method does not need to be called by the user, as overloaded versions
of all expression methods are available to deal directly with constants.x
- A value for which to construct a constant expression term.x
.public IloLinearIntExpr linearIntExpr() throws IloException
public IloLinearIntExpr linearIntExpr(int val) throws IloException
val
- Constant term of the new linear expression.val
.public IloLinearIntExpr scalProd(int[] vals, IloIntVar[] vars) throws IloException
vals
- The integer values involved in the new scalar product
expression.vars
- The integer variables involved in the new scalar product
expression.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/vars
to be used for the scalar product.num
- Number of elements in vals/vars
to be used for the scalar product.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.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/vars
to be used for the scalar product.num
- Number of elements in vals/vars
to be used for the scalar product.public IloIntExpr negative(IloIntExpr e) throws IloException
-e
,
the negative of the expression e
.e
- An integer expression for which the negative value is given.e
.public IloIntExpr sum(IloIntExpr e, int v) throws IloException
e + v
, representing the sum of
integer expression e
and value v
.e
- An integer expression to use in the sum.v
- A value to use in the sum.e
and v
.public IloIntExpr sum(int v, IloIntExpr e) throws IloException
v + e
, representing the sum of
value v
and integer expression e
.v
- A value to use in the sum.e
- An integer expression to use in the sum.v
and e
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2) throws IloException
e1 + e2
, representing the sum of
integer expressions e1
and e2
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e1 + e2
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3) throws IloException
e1, e2 and e3
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e1 + e2 + e3
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4) throws IloException
e1, e2, e3 and e4
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e4
- An integer expression to use in the sum.e1 + e2 + e3 + e4
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5) throws IloException
e1, e2, e3, e4 and e5
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e4
- An integer expression to use in the sum.e5
- An integer expression to use in the sum.e1 + e2 + e3 + e4 + e5
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6) throws IloException
e1, e2, e3, e4, e5 and e6
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e4
- An integer expression to use in the sum.e5
- An integer expression to use in the sum.e6
- An integer expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7) throws IloException
e1, e2, e3, e4, e5, e6 and e7
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e4
- An integer expression to use in the sum.e5
- An integer expression to use in the sum.e6
- An integer expression to use in the sum.e7
- An integer expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6 + e7
.public IloIntExpr sum(IloIntExpr e1, IloIntExpr e2, IloIntExpr e3, IloIntExpr e4, IloIntExpr e5, IloIntExpr e6, IloIntExpr e7, IloIntExpr e8) throws IloException
e1, e2, e3, e4, e5, e6, e7 and e8
.e1
- An integer expression to use in the sum.e2
- An integer expression to use in the sum.e3
- An integer expression to use in the sum.e4
- An integer expression to use in the sum.e5
- An integer expression to use in the sum.e6
- An integer expression to use in the sum.e7
- An integer expression to use in the sum.e8
- An integer expression to use in the sum.e1 + e2 + e3 + e4 + e5 + e6 + e7 + e8
.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 use in the difference.e - v
.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 use in the difference.expr1 - expr2
.public IloIntExpr diff(int v, IloIntExpr e1) throws IloException
v
and integer expression e1
.v
- A value to use in the difference.e1
- An integer expression to use in the difference.v - e1
.public IloIntExpr prod(IloIntExpr e, int v) throws IloException
e * v
.public IloIntExpr prod(IloIntExpr e1, IloIntExpr e2) throws IloException
e1 * e2
.public IloIntExpr prod(int v, IloIntExpr e) throws IloException
v * e
.public IloIntExpr square(IloIntExpr e) throws IloException
e^2
.public IloIntExpr constant(int x) throws IloException
x
.x
- The value of the constant expression.public IloRange eq(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is
initialized to represent the constraint e1 == e2
.e1
- Left-hand side expression of the new equality constraint.e2
- Right-hand side expression of the new equality constraint.IloRange
object initialized to represent the
constraint e1 == e2
.public IloRange eq(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object.
The new IloRange
object is initialized to represent
the constraint e1 == e2
and is assigned the name name
.e1
- Left-hand side expression of the new equality constraint.e2
- Right-hand side expression of the new equality constraint.name
- Name assigned to the new IloRange
constraint.IloRange
object initialized to represent the
constraint e1 == e2
.public IloRange eq(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is
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
.public IloRange eq(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr == rhs
and 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 the
constraint expr == rhs
.public IloRange eq(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is
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
.public IloRange eq(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val == expr
and 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
.public IloRange le(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is
initialized to represent the constraint expr <= rhs
.expr
- Expression of the new less-equal constraint.rhs
- Upper bound of the new less-equal constraint.IloRange
object initialized to represent the
constraint expr <= rhs
.public IloRange le(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr <= rhs
and is assigned the name name
.expr
- Expression of the new less-equal constraint.rhs
- Upper bound of the new less-equal constraint.name
- Name assigned to the new less-equal constraint.IloRange
object initialized to represent the
constraint expr <= rhs
.public IloRange le(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 <= e2
.e1
- Left-hand side expression of the new less-equal constraint.e2
- Right-hand side expression of the new less-equal constraint.IloRange
object initialized to represent the
constraint e1 <= e2
.public IloRange le(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 <= e2
and is assigned the name name
.e1
- Left-hand side expression of the new less-equal constraint.e2
- Right-hand side expression of the new less-equal constraint.name
- Name assigned to the new IloRange
constraint.IloRange
object initialized to represent the
constraint e1 <= e2
.public IloRange le(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val <= expr
.val
- Value of the new less-equal constraint.expr
- Expression of the new less-equal constraint.IloRange
object initialized to represent the
constraint val <= expr
.public IloRange le(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val <= expr
and is assigned the name name
.val
- Value of the new less-equal constraint.expr
- Expression of the new less-equal constraint.name
- Name assigned to the new less-equal constraint.IloRange
object initialized to represent the
constraint val <= expr
.public IloRange ge(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr >= rhs
.expr
- Expression of the new greater-equal constraint.rhs
- Upper bound of the new greater-equal constraint.IloRange
object initialized to represent the
constraint expr >= rhs
.public IloRange ge(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr >= rhs
and is assigned the name name
.expr
- Expression of the new greater-equal constraint.rhs
- Upper bound of the new greater-equal constraint.name
- Name assigned to the new greater-equal constraint.IloRange
object initialized to represent the
constraint expr >= rhs
.public IloRange ge(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 >= e2
.e1
- Left-hand side expression of the new greater-equal constraint.e2
- Right-hand side expression of the new greater-equal constraint.IloRange
object initialized to represent the
constraint e1 >= e2
.public IloRange ge(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 >= e2
and is assigned the name name
.e1
- Left-hand side expression of the new greater-equal constraint.e2
- Right-hand side expression of the new greater-equal constraint.name
- Name assigned to the new greater-equal constraint.IloRange
object initialized to represent the
constraint e1 >= e2
.public IloRange ge(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val >= expr
.val
- Value of the new greater-equal constraint.expr
- Expression of the new greater-equal constraint.IloRange
object initialized to represent the
constraint val >= expr
.public IloRange ge(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val >= expr
and is assigned the name name
.val
- Value of the new greater-equal constraint.expr
- Expression of the new greater-equal constraint.name
- Name assigned to the new greater-equal constraint.IloRange
object initialized to represent the
constraint val >= expr
.public IloRange range(double lb, IloNumExpr expr, double ub) throws IloException
IloRange
object. The new IloRange
object is 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
.public IloRange range(double lb, IloNumExpr expr, double ub, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint lb <= expr <= ub
and 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
.public IloRange addEq(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr == rhs
,
and is 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
.public IloRange addEq(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr == rhs
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.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
.public IloRange addEq(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 == e2
, and is added to
the invoking IloModel
.e1
- Left-hand side expression of the new equality constraint.e2
- Right-hand side expression of the new equality constraint.IloRange
object initialized to represent the
constraint e1 == e2
.public IloRange addEq(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 == e2
, and is added to
the invoking IloModel
. The new IloRange
object
is assigned the name name
.e1
- Left-hand side expression of the new equality constraint.e2
- Right-hand side expression of the new equality constraint.name
- Name assigned to the new IloRange
constraint.IloRange
object initialized to represent the
constraint e1 == e2
.public IloRange addEq(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val == expr
,
and is added to the invoking IloModel
.val
- Value of the new equality constraint.expr
- Expression of the new equality constraint.IloRange
object initialized to represent the
constraint val == expr
.public IloRange addEq(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val == expr
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.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
.public IloRange addLe(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr <= rhs
,
and is added to the invoking IloModel
.expr
- Expression of the new less-equal constraint.rhs
- Upper bound of the new less-equal constraint.IloRange
object initialized to represent the
constraint expr <= rhs
.public IloRange addLe(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr <= rhs
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.expr
- Expression of the new less-equal constraint.rhs
- Upper bound of the new less-equal constraint.name
- Name assigned to the new less-equal constraint.IloRange
object initialized to represent the
constraint expr <= rhs
.public IloRange addLe(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 <= e2
, and is added to
the invoking IloModel
.e1
- Left-hand side expression of the new less-equal constraint.e2
- Right-hand side expression of the new less-equal constraint.IloRange
object initialized to represent the
constraint e1 <= e2
.public IloRange addLe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 <= e2
, and is added to
the invoking IloModel
. The new IloRange
object
is assigned the name name
.e1
- Left-hand side expression of the new less-equal constraint.e2
- Right-hand side expression of the new less-equal constraint.name
- Name assigned to the new IloRange
constraint.IloRange
object initialized to represent the
constraint e1 <= e2
.public IloRange addLe(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val <= expr
,
and is added to the invoking IloModel
.val
- Value of the new less-equal constraint.expr
- Expression of the new less-equal constraint.IloRange
object initialized to represent the
constraint val <= exp
.public IloRange addLe(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val <= expr
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.val
- Value of the new less-equal constraint.expr
- Expression of the new less-equal constraint.name
- Name assigned to the new less-equal constraint.IloRange
object initialized to represent the
constraint val <= expr
.public IloRange addGe(IloNumExpr expr, double rhs) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr >= rhs
,
and is added to the invoking IloModel
.expr
- Expression of the new greater-equal constraint.rhs
- Upper bound of the new greater-equal constraint.IloRange
object initialized to represent the
constraint expr >= rhs
.public IloRange addGe(IloNumExpr expr, double rhs, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint expr >= rhs
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.expr
- Expression of the new greater-equal constraint.rhs
- Upper bound of the new greater-equal constraint.name
- Name assigned to the new greater-equal constraint.IloRange
object initialized to represent the
constraint expr >= rhs
.public IloRange addGe(IloNumExpr e1, IloNumExpr e2) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 >= e2
,
and is added to the invoking IloModel
.e1
- Left-hand side expression of the new greater-equal constraint.e2
- Right-hand side expression of the new greater-equal constraint.IloRange
object initialized to represent the
constraint e1 >= e2
.public IloRange addGe(IloNumExpr e1, IloNumExpr e2, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint e1 >= e2
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.e1
- Left-hand side expression of the new greater-equal constraint.e2
- Right-hand side expression of the new greater-equal constraint.name
- Name assigned to the new IloRange
constraint.IloRange
object initialized to represent the
constraint e1 >= e2
.public IloRange addGe(double val, IloNumExpr expr) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val >= expr
,
and is added to the invoking IloModel
.val
- Value of the new greater-equal constraint.expr
- Expression of the new greater-equal constraint.IloRange
object initialized to represent the
constraint val >= expr
.public IloRange addGe(double val, IloNumExpr expr, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint val >= expr
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.val
- Value of the new greater-equal constraint.expr
- Expression of the new greater-equal constraint.name
- Name assigned to the new greater-equal constraint.IloRange
object initialized to represent the
constraint val >= expr
.public IloRange addRange(double lb, IloNumExpr expr, double ub) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint lb <= expr <= ub
,
and is added to the invoking 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
.public IloRange addRange(double lb, IloNumExpr expr, double ub, java.lang.String name) throws IloException
IloRange
object. The new IloRange
object is initialized to represent the constraint lb <= expr <= ub
,
and is added to the invoking IloModel
. The new IloRange
object is assigned the name name
.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
.public IloObjective maximize(IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to maximize the expression expr
.expr
- Expression to maximize.IloObjective
object representing the objective
to maximize expr
.public IloObjective maximize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to maximize the expression expr
and is assigned the name
name
.expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to maximize expr
.public IloObjective minimize(IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to minimize the expression expr
.expr
- Expression to minimize.IloObjective
object representing the objective
to minimize expr
.public IloObjective minimize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to minimize the expression expr
and is assigned the name
name
.expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to minimize expr
.public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to optimize the expression expr
with respect to the
optimization sense sense
.sense
- Optimization sense.expr
- Expression to maximize.IloObjective
object representing the objective
to maximize expr
.public IloObjective objective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to optimize the expression expr
with respect to the
optimization sense sense
and is assigned the name name
.sense
- Optimization sense.expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to maximize expr
.public IloObjective addMaximize(IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to maximize the expression expr
. The new objective
is added to the invoking model.expr
- Expression to maximize.IloObjective
object representing the objective
to maximize expr
.public IloObjective addMaximize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to maximize the expression expr
and is assigned the name
name
. The new objective is added to the invoking model.expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to maximize expr
.public IloObjective addMinimize(IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to minimize the expression expr
. The new objective
is added to the invoking model.expr
- Expression to minimize.IloObjective
object representing the objective
to minimize expr
.public IloObjective addMinimize(IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to minimize the expression expr
and is assigned the name
name
. The new objective is added to the invoking model.expr
- Expression to minimize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to minimize expr
.public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to optimize the expression expr
with respect to the
optimization sense sense
. The new objective is added to the invoking model.sense
- Optimization sense.expr
- Expression to maximize.IloObjective
object representing the objective
to maximize expr
.public IloObjective addObjective(IloObjectiveSense sense, IloNumExpr expr, java.lang.String name) throws IloException
IloObjective
object. The IloObjective
object
represents an objective to optimize the expression expr
with respect to the
optimization sense sense
and is assigned the name name
.
The new objective is added to the invoking model.sense
- Optimization sense.expr
- Expression to maximize.name
- Name assigned to the new IloObjective
object.IloObjective
object representing the objective
to maximize expr
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |