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