|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IloMPModeler
is an extension of the IloModeler
modeling interface for mathematical programming (MP).
It adds support for several modeling object interfaces specific to
mathematical programming, including LP
matrices, semi-continuous variables, and special ordered sets (SOSs). It
extends the functionality of IloModeler
to column-wise
modeling and supports modification of variable types and expressions of
ranged constraints and objective functions. This interface is implemented
by the IloCplex
optimizer class.
IloCplex
,
IloModeler
Method Summary | |
IloNumExpr |
abs(IloNumExpr expr)
Returns an expression representing the absolute value of its argument, the expression indicated by expr . |
IloLPMatrix |
addLPMatrix()
Creates, returns, and adds to the invoking model an empty IloLPMatrix object. |
IloLPMatrix |
addLPMatrix(java.lang.String name)
Creates, returns, and adds an empty IloLPMatrix object,
with the specified name, to the invoking model. |
IloObjective |
addMaximize()
Creates and returns an empty maximization objective function and adds it to the invoking model. |
IloObjective |
addMaximize(java.lang.String name)
Creates and returns an empty maximization objective function with the specified name and adds it to the invoking
model. |
IloObjective |
addMinimize()
Creates and returns an empty minimization objective function and adds it to the invoking model. |
IloObjective |
addMinimize(java.lang.String name)
Creates and returns an empty minimization objective function with the specified name
and adds the empty objective to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense)
Creates and returns an empty objective function with the sense specified by sense and adds it to the invoking model. |
IloObjective |
addObjective(IloObjectiveSense sense,
java.lang.String name)
Creates and returns an empty objective function with the specified name and with the specified
sense and adds it to the invoking model. |
IloRange |
addRange(double lb,
double ub)
Creates, returns, and adds to the invoking model an empty IloRange object. |
IloRange |
addRange(double lb,
double ub,
java.lang.String name)
Creates, returns, and adds to the invoking model an empty IloRange object with the specified
name and upper and lower bounds. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val)
Creates an SOS of type 1 with the specified variables and weights and adds it to the invoking model. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
int start,
int num)
Creates an SOS of type 1 with num of
the specified variables and weights,
starting from the index specified by start ,
and adds the SOS to the invoking model. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates an SOS of type 1 with the num
specified variables, weights, and names, starting from the index
specified by start , and adds the SOS to the invoking mode. |
IloSOS1 |
addSOS1(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates an SOS of type 1 with the specified variables, weights, and name, and adds the SOS to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val)
Creates an SOS of type 2 with the specified variables and weights and adds the new SOS to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
int start,
int num)
Creates an SOS of type 2 with num of the
specified variables and weights, starting from the index
specified by start , and adds the SOS to the
invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates an SOS of type 2 with num of the specified
variables and weights, starting from the index specified by
start , and adds the new SOS along with its name
to the invoking model. |
IloSOS2 |
addSOS2(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates an SOS of type 2 with the specified variables, weights, and name, and adds the new SOS to the invoking model. |
void |
addToExpr(IloObjective obj,
IloNumExpr expr)
Adds a term (which may be an expression itself) to the expression of the specified IloObjective object. |
void |
addToExpr(IloRange rng,
IloNumExpr expr)
Adds a term (which may be an expression itself) to the expression of the specified IloRange object. |
IloIntVar |
boolVar(IloColumn column)
Creates a new Boolean (or binary) modeling variable for column-wise modeling. |
IloIntVar |
boolVar(IloColumn column,
java.lang.String name)
Creates a new Boolean (or binary) modeling variable, with the specified name, for column-wise modeling. |
IloIntVar[] |
boolVarArray(IloColumnArray cols)
Creates and returns an array of Boolean (or binary) modeling variables for column-wise modeling. |
IloIntVar[] |
boolVarArray(IloColumnArray cols,
java.lang.String[] name)
Creates and returns an array of Boolean (or binary) modeling variables with names for column-wise modeling. |
IloColumn |
column(IloLPMatrix lp)
Creates an IloColumn object suitable for adding a new
variable to an LP matrix as an empty column. |
IloColumn |
column(IloLPMatrix lp,
int[] ind,
double[] val)
Creates an IloColumn object suitable for adding a new
variable to an LP matrix as a new column. |
IloColumn |
column(IloLPMatrix lp,
int[] ind,
double[] val,
int start,
int num)
Creates an IloColumn object suitable for adding a new
variable to an LP matrix as a new column. |
IloColumn |
column(IloObjective obj,
double val)
Creates an IloColumn object suitable for adding a new
variable to the objective obj as a linear term with
coefficient val . |
IloColumn |
column(IloRange rng,
double val)
Creates an IloColumn object suitable for adding a new
variable to
constraint rng as a linear term with coefficient
val . |
IloColumnArray |
columnArray(IloLPMatrix lp,
int num)
Creates an IloColumnArray object suitable for adding new
variables to an IloLPMatrix as empty columns. |
IloColumnArray |
columnArray(IloLPMatrix lp,
int num,
int[][] ind,
double[][] val)
Creates an IloColumnArray object suitable for adding new
variables to an IloLPMatrix as columns. |
IloColumnArray |
columnArray(IloObjective obj,
double[] val)
Creates an IloColumnArray object suitable for adding new
variables to the objective obj as linear terms with
coefficients specified in val . |
IloColumnArray |
columnArray(IloObjective obj,
double[] val,
int start,
int num)
Creates an IloColumnArray object suitable for adding
num new variables to the objective obj as
linear terms with coefficients specified in val . |
IloColumnArray |
columnArray(IloRange rng,
double[] val)
Creates an IloColumnArray suitable for adding new variables
to constraint rng as linear terms with coefficients specified
in val . |
IloColumnArray |
columnArray(IloRange rng,
double[] val,
int start,
int num)
Creates an IloColumnArray suitable for adding
num new variables to constraint IloRange as
linear terms with coefficients specified in val . |
IloConversion |
conversion(IloNumVar[] var,
IloNumVarType type)
Creates and returns an IloConversion object for converting
the type of the variables in array var in a model. |
IloConversion |
conversion(IloNumVar[] var,
IloNumVarType[] type)
Creates and returns an IloConversion object for converting
the type of the variables in the array var in a model. |
IloConversion |
conversion(IloNumVar[] var,
IloNumVarType[] type,
java.lang.String name)
Creates and returns an IloConversion object,
with the specified name, for converting
the type of the variables in array var in a model. |
IloConversion |
conversion(IloNumVar[] var,
IloNumVarType type,
java.lang.String name)
Creates and returns an IloConversion object with
the specified type and name, for converting
the type of the variables in array var in a model. |
IloConversion |
conversion(IloNumVar var,
IloNumVarType type)
Creates and returns an IloConversion object for converting
the type of a variable in a model. |
IloConversion |
conversion(IloNumVar var,
IloNumVarType type,
java.lang.String name)
Creates and returns an IloConversion object, with
the specified name, for converting the type of a variable in a model. |
void |
delete(IloCopyable obj)
Deletes an object from a model. |
void |
delete(IloCopyable[] obj)
Deletes the modeling objects in an array obj from the
invoking model. |
void |
delete(IloCopyable[] obj,
int start,
int num)
Deletes the modeling objects in obj[start] through
obj[start+num-1] from a model. |
IloModel |
getModel()
Returns the active model. |
IloIntVar |
intVar(IloColumn column,
int lb,
int ub)
Creates an integer modeling variable, with specified upper and lower bound, for column-wise modeling. |
IloIntVar |
intVar(IloColumn column,
int lb,
int ub,
java.lang.String name)
Creates an integer modeling variable with specified upper bound, lower bound, and name for column-wise modeling. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int[] lb,
int[] ub)
Creates and returns integer modeling variables, with individually specified upper bound, lower bound, and name, for column-wise modeling. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int[] lb,
int[] ub,
java.lang.String[] name)
Creates and returns integer modeling variables, each with individually specified upper bound, lower bound, and name, for column-wise modeling. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int lb,
int ub)
Creates and returns integer modeling variables, all with the same upper bound and with the same lower bound, for column-wise modeling. |
IloIntVar[] |
intVarArray(IloColumnArray cols,
int lb,
int ub,
java.lang.String[] name)
Creates and returns integer modeling variables, all with the same specified upper bound and lower bound, with individually specified names, for column-wise modeling. |
IloLPMatrix |
LPMatrix()
Creates and returns an empty IloLPMatrix object. |
IloLPMatrix |
LPMatrix(java.lang.String name)
Creates and returns an empty IloLPMatrix object with
the specified name. |
IloObjective |
maximize()
Creates and returns an empty maximization objective function. |
IloObjective |
maximize(java.lang.String name)
Creates and returns an empty maximization objective function. |
IloObjective |
minimize()
Creates and returns an empty minimization objective function. |
IloObjective |
minimize(java.lang.String name)
Creates and returns an empty minimization objective function. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub)
Creates a continuous modeling variable, of type Float
with upper bound and lower bound as specified,
for column-wise modeling. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
IloNumVarType type)
Creates and returns a new modeling variable for column-wise modeling. |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a new modeling variable with the specified name , type, lower bound, and upper bound
for column-wise modeling in the target column . |
IloNumVar |
numVar(IloColumn column,
double lb,
double ub,
java.lang.String name)
Creates a continuous modeling variable, of type Float
with upper bound, lower bound, and name as specified,
for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub)
Creates and returns continuous modeling variables, all of the same type Float with individually specified upper bound, and
individually specified lower bound, for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type)
Creates and returns modeling variables with the individual type specified by the corresponding entry in the array type , and individual upper and lower bounds as specified
in those arrays, for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns modeling variables with the individual type specified by the corresponding entry in the array type , with individual upper and lower bounds as specified
in those arrays, with the name specified individually by the
corresponding entry in the array name ,
for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double[] lb,
double[] ub,
java.lang.String[] name)
Creates and returns continuous modeling variables, all of type Float with individually
specified upper bound, lower bound, and name, for column-wise
modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub)
Creates and returns continuous modeling variables, all of type Float , all with same upper bound, all with the same
lower bound, for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type)
Creates and returns modeling variables, all of the same specified type , all with same upper bound, all with the same
lower bound, as specified, for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of modeling variables with distinctive names, all with the same lower bound, and all with the same upper bound, as specified, for column-wise modeling. |
IloNumVar[] |
numVarArray(IloColumnArray cols,
double lb,
double ub,
java.lang.String[] name)
Creates and returns continuous modeling variables, all of type Float , with the same specified bounds, but with
individually specified names, for column-wise modeling. |
IloObjective |
objective(IloObjectiveSense sense)
Creates and returns an empty objective function with the sense specified by sense . |
IloObjective |
objective(IloObjectiveSense sense,
java.lang.String name)
Creates and returns an empty objective function with the sense specified by sense and with the name specified by
name . |
IloNumExpr |
piecewiseLinear(IloNumExpr expr,
double[] points,
double[] slopes,
double a,
double fa)
Creates an expression node that represents a continuous or discontinuous piecewise linear function. |
IloNumExpr |
piecewiseLinear(IloNumExpr expr,
double[] points,
int startPoints,
int num,
double[] slopes,
int startSlopes,
double a,
double fa)
Creates an expression node to represent a continuous or discontinuous piecewise linear function. |
IloRange |
range(double lb,
double ub)
Creates and returns an empty IloRange object with
the specified upper and lower bound. |
IloRange |
range(double lb,
double ub,
java.lang.String name)
Creates and returns an empty IloRange object with the
specified name and upper and lower bounds. |
IloSemiContVar |
semiContVar(double sclb,
double ub,
IloNumVarType type)
Creates and returns a new semi-continuous modeling variable with a specified semi-continuous lower bound, upper bound, and type. |
IloSemiContVar |
semiContVar(double sclb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a new semi-continuous modeling variable with specified bounds, type, and name. |
IloSemiContVar |
semiContVar(IloColumn column,
double sclb,
double ub,
IloNumVarType type)
Creates and returns a new semi-continuous modeling variable with specified type and bounds, for column-wise modeling. |
IloSemiContVar |
semiContVar(IloColumn column,
double sclb,
double ub,
IloNumVarType type,
java.lang.String name)
Creates and returns a new semi-continuous modeling variable, with specified bounds, type, and name, for column-wise modeling. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double[] sclb,
double[] ub,
IloNumVarType[] type)
Creates and returns an array of semi-continuous modeling variables, with individually specified type, semi-continuous lower bound, and upper bound, for column-wise modeling. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double[] sclb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns an array of semi-continuous modeling variables, with individually specified type, semi-continuous lower bound, upper bound, and name, for column-wise modeling. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double sclb,
double ub,
IloNumVarType type)
Creates and returns an array of semi-continuous modeling variables, all with the same type and bounds, for column-wise modeling. |
IloSemiContVar[] |
semiContVarArray(IloColumnArray cols,
double sclb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns an array of semi-continuous modeling variables with individually specified type, semi-continuous lower bound, upper bound, and name, for column-wise modeling. |
IloSemiContVar[] |
semiContVarArray(int n,
double[] sclb,
double[] ub,
IloNumVarType[] type)
Creates and returns n semi-continuous modeling variables,
with individually specified type, semi-continuous lower bound, and
upper bound. |
IloSemiContVar[] |
semiContVarArray(int n,
double[] sclb,
double[] ub,
IloNumVarType[] type,
java.lang.String[] name)
Creates and returns n semi-continuous modeling variables,
all of the same type, with the same semi-continuous lower bound and
upper bound, and individually specified names. |
IloSemiContVar[] |
semiContVarArray(int n,
double sclb,
double ub,
IloNumVarType type)
Creates and returns n semi-continuous modeling variables,
all of the same type, with the same semi-continuous lower bound and
upper bound. |
IloSemiContVar[] |
semiContVarArray(int n,
double sclb,
double ub,
IloNumVarType type,
java.lang.String[] name)
Creates and returns n semi-continuous modeling variables,
all with the same type, semi-continuous lower bound, and upper bound,
but with individually specified names. |
void |
setLinearCoef(IloObjective obj,
double val,
IloNumVar var)
Sets linear coefficient for variable var to val
in the expression of the specified IloObjective object. |
void |
setLinearCoef(IloObjective obj,
IloNumVar var,
double val)
Sets linear coefficient for variable var to val
in the expression of the specified IloObjective object. |
void |
setLinearCoef(IloRange rng,
double val,
IloNumVar var)
Sets linear coefficient for variable var to val
in the expression of the specified IloRange object. |
void |
setLinearCoef(IloRange rng,
IloNumVar var,
double val)
Sets linear coefficient for variable var to val
in the expression of the specified IloRange object. |
void |
setLinearCoefs(IloObjective obj,
double[] val,
IloNumVar[] var)
Sets linear coefficients for variables in the expression of the specified IloObjective object. |
void |
setLinearCoefs(IloObjective obj,
double[] val,
IloNumVar[] var,
int start,
int num)
Sets linear coefficients for variables in the expression of the specified IloObjective object. |
void |
setLinearCoefs(IloObjective obj,
IloNumVar[] var,
double[] val)
Sets linear coefficients for variables in the expression of the specified IloObjective object. |
void |
setLinearCoefs(IloObjective obj,
IloNumVar[] var,
double[] val,
int start,
int num)
Sets linear coefficients for variables in the expression of the specified IloObjective object. |
void |
setLinearCoefs(IloRange rng,
double[] val,
IloNumVar[] var)
Sets linear coefficients for variables in the expression of the specified IloRange object. |
void |
setLinearCoefs(IloRange rng,
double[] val,
IloNumVar[] var,
int start,
int num)
Sets linear coefficients for variables in the expression of the specified IloRange object. |
void |
setLinearCoefs(IloRange rng,
IloNumVar[] var,
double[] val)
Sets linear coefficients for variables in the expression of the specified IloRange object. |
void |
setLinearCoefs(IloRange rng,
IloNumVar[] var,
double[] val,
int start,
int num)
Sets linear coefficients for variables in the expression of the specified IloRange object. |
void |
setModel(IloModel model)
Sets model as the active model. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val)
Creates an SOS of type 1 with the specified variables and weights. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
int start,
int num)
Creates an SOS of type 1 with the num
specified variables and weights, starting from the index specified
by start . |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates an SOS of type 1 with the num
specified variables and weights, starting from the index specified
by start , and assigns the new SOS a name. |
IloSOS1 |
SOS1(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates an SOS of type 1 with the specified variables and weights and names the new SOS. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val)
Creates an SOS of type 2 with the specified variables and weights. |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
int start,
int num)
Creates an SOS of type 2 with the num
specified variables and weights, starting from the index specified
by start . |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
int start,
int num,
java.lang.String name)
Creates an SOS of type 2 with the num
specified variables and weights, starting from the index specified by
start , and assigns
the new SOS its name . |
IloSOS2 |
SOS2(IloNumVar[] var,
double[] val,
java.lang.String name)
Creates an SOS of type 2 with the specified variables and weights, and assigns the new SOS its name . |
Methods inherited from interface ilog.concert.IloModel |
add, add, add, iterator, remove |
Methods inherited from interface ilog.concert.IloAddable |
getName, setName |
Method Detail |
public IloModel getModel() throws IloException
IloException
public void setModel(IloModel model) throws IloException
model
as the active model.
IloException
public void delete(IloCopyable obj) throws IloException
After you call this method, the modeling object obj
is no
longer in the model. If the modeling object is referenced multiple
times in a model (for example, a variable used by multiple constraints),
then that object is removed from all places. In particular,
when you delete a variable from a
model, the variable is removed from all the other modeling objects in the
model. Modeling objects that are variables are not of type
IloAddable
. In fact, the type of the removed object is
IloCopyable
, a common base interface of both
IloAddable
and IloNumVar
.
obj
- The modeling object to be deleted from the invoking
model.
IloException
public void delete(IloCopyable[] obj) throws IloException
obj
from the
invoking model.
After you call this method, the deleted objects are no longer in the model. If a modeling object is referenced multiple times in a model (for example, a variable used by multiple constraints), the object is removed from all places. When you delete variables from a model, they are removed from all other modeling objects in the model.
obj
- The array of modeling objects to be deleted from the
invoking model.
IloException
public void delete(IloCopyable[] obj, int start, int num) throws IloException
obj[start]
through
obj[start+num-1]
from a model. Modeling objects
obj[start]
through obj[start+num-1]
are
deleted from the invoking model.
After you call this
method, the deleted objects will no longer be in the model. If a
modeling object is referenced multiple times in a model
(for example, a variable used by multiple constraints),
the object is removed from all places. Thus,
when you delete variables from a model, they are removed from all
other modeling objects in the model.
obj
- An array containing the modeling objects to be deleted
from the invoking model.start
- 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 IloObjective minimize() throws IloException
IloObjective
object
representing a minimization objective function with a zero expression.
This method is typically used in an application that
applies column-wise modeling
to fill in the objective function while creating the variables.
IloException
public IloObjective minimize(java.lang.String name) throws IloException
IloObjective
object
representing a minimization objective function with a zero expression.
The new IloObjective
object is assigned
name
as its name. This method is typically
used in an application that applies
column-wise modeling to fill in the objective function while creating the
variables.
name
- The name assigned to the new objective.
IloException
public IloObjective maximize() throws IloException
IloObjective
object representing a
maximization objective function with a zero expression. This method is
typically used in an application that applies column-wise modeling to fill
in the objective function while creating the variables.
IloException
public IloObjective maximize(java.lang.String name) throws IloException
IloObjective
object representing a
maximization objective function with a zero expression. The new
IloObjective
object is assigned name
as its name. This method is typically used in an application that
applies column-wise modeling
to fill in the objective function while creating the variables.
name
- The name assigned to the new objective.
IloException
public IloObjective objective(IloObjectiveSense sense) throws IloException
sense
.
This method creates and returns an IloObjective
object with
a zero expression and the specified optimization sense. This
method is typically
used in an application that uses column-wise modeling to fill in the
objective function while creating the variables.
sense
- The optimization sense of the new objective.
IloException
public IloObjective objective(IloObjectiveSense sense, java.lang.String name) throws IloException
sense
and with the name specified by
name
.
This method creates and returns an IloObjective
object with
a zero expression and the specified optimization sense. The new
IloObjective
object is assigned name
as its name. This method is typically used in an application that
applies column-wise modeling
to fill in the objective function while creating the variables.
sense
- The optimization sense of the new objective.name
- The name assigned to the new objective.
IloException
public IloObjective addMinimize() throws IloException
This method creates and returns an IloObjective
object
representing a minimization objective function with a zero expression.
The new IloObjective
object is added to the invoking
model. This method is typically used in an application
that applies column-wise modeling to fill in the objective function while
creating the variables.
IloException
public IloObjective addMinimize(java.lang.String name) throws IloException
name
and adds the empty objective to the invoking model.
This method creates and returns an IloObjective
object
representing a minimization objective function with a zero expression.
The new IloObjective
object is assigned the name
name
and added to the invoking model.
This method is typically used in an application that applies column-wise
modeling to fill in the objective function while creating the variables.
name
- The name assigned to the new objective.
IloException
public IloObjective addMaximize() throws IloException
This method creates and returns an IloObjective
object
representing a maximization objective function with a zero expression.
The new IloObjective
object is added to the invoking
model. This method is typically used in an application
that applies column-wise modeling to fill in the objective function while
creating the variables.
IloException
public IloObjective addMaximize(java.lang.String name) throws IloException
name
and adds it to the invoking
model.
This method creates and returns an IloObjective
object
representing a maximization objective function with a zero expression.
The new IloObjective
object is assigned
name
as its name
and added to the invoking model. This method
is typically used in an application that applies column-wise modeling to
fill in the objective function while creating the variables.
name
- The name assigned to the new objective.
IloException
public IloObjective addObjective(IloObjectiveSense sense) throws IloException
sense
and adds it to the invoking model.
This method creates and returns an IloObjective
object with
a zero expression and the specified optimization sense. The new
IloObjective
object is added to the invoking
model. This method is typically used in an application
that applies column-wise modeling to fill in the objective function while
creating the variables.
sense
- The optimization sense of the new objective.
IloException
public IloObjective addObjective(IloObjectiveSense sense, java.lang.String name) throws IloException
name
and with the specified
sense
and adds it to the invoking model.
This method creates and returns an IloObjective
object with
a zero expression and the specified optimization sense. The new
IloObjective
object is assigned name
as
its name and
added to the invoking model. This method is typically
used in an application that applies column-wise modeling to fill in the
objective function while creating the variables.
sense
- The optimization sense of the new objective.name
- The name assigned to the new objective.
IloException
public IloRange addRange(double lb, double ub) throws IloException
IloRange
object.
The new
IloRange
object is initialized
to represent the constraint lb <= 0 <= ub
,
and is added to the invoking model.
This method is typically used in an application that applies column-wise
modeling to fill in the expression for the ranged constraint while
creating the variables.
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 addRange(double lb, double ub, java.lang.String name) throws IloException
IloRange
object with the specified
name
and upper and lower bounds.
The new
IloRange
object is initialized to represent the constraint
lb <= 0 <= ub
, and is added to the invoking model.
The new IloRange
object is assigned
name
as its name.
This method is typically used in an application that applies column-wise
modeling to fill in the expression for the ranged constraint while
creating the variables.
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
IloRange
object with
the specified upper and lower bound.
The new
IloRange
object is
initialized to represent the constraint lb <= 0 <= ub
.
This method is typically used in an application that applies column-wise
modeling to fill in the expression for the ranged constraint while
creating the variables.
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 range(double lb, double ub, java.lang.String name) throws IloException
IloRange
object with the
specified name
and upper and lower bounds.
The new
IloRange
object is initialized to represent the constraint
lb <= 0 <= ub
. The new IloRange
object is
assigned name
as its name.
This method is typically used in an application that applies
column-wise modeling to fill in the expression for
the ranged constraint while creating the variables.
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 IloNumVar numVar(IloColumn column, double lb, double ub, IloNumVarType type, java.lang.String name) throws IloException
name
, type, lower bound, and upper bound
for column-wise modeling in the target column
.
This method returns an object representing a new modeling variable with
the specified bounds, type, and name. The newly created variable is then
installed in existing modeling objects, as defined by the
IloColumn
argument column
.
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 numVar(IloColumn column, double lb, double ub, IloNumVarType type) throws IloException
This method returns an object representing a new modeling variable with
the specified bounds and type. The newly created variable is then
installed in existing modeling objects, as defined by the
IloColumn
argument column
.
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[] numVarArray(IloColumnArray cols, double lb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
This method creates new modeling variables, each with the same specified
bounds and type, and returns them in an array. The number of new variables
is determined by the size of the IloColumnArray
argument
cols
. Each new variable is assigned a separate name, with
the variable i
assigned name[i]
. The new
variables are then installed in existing modeling objects, as defined
by the IloColumnArray
argument cols
.
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
type
, all with same upper bound, all with the same
lower bound, as specified, for column-wise modeling.
This method creates new modeling variables, each with the same specified
bounds and type, and returns them in an array. The number of new variables
is determined by the size of the IloColumnArray
argument
cols
. The new variables are then installed in existing
modeling objects, as defined by the IloColumnArray
argument cols
.
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) throws IloException
type
, and individual upper and lower bounds as specified
in those arrays, for column-wise modeling.
This method creates new modeling variables, each with its own bounds and
type, and returns them in an array. The number of new variables is
determined by the size of the IloColumnArray
argument
cols
. The new variable i
is constructed
with bounds lb[i]
and ub[i]
and type
type[i]
. The new variables are installed in existing
modeling objects, as defined by the cols
argument.
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
type
, with individual upper and lower bounds as specified
in those arrays, with the name specified individually by the
corresponding entry in the array name
,
for column-wise modeling.
This method creates new modeling variables, each with its own bounds and
type, and returns them in an array. The number of new variables is
determined by the size of the IloColumnArray
argument
cols
. Variable i
is constructed with
bounds lb[i]
and ub[i]
and type
type[i]
, and it is assigned name[i]
. The
new variables are installed in existing modeling objects, as defined
by the cols
argument.
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
Float
with upper bound, lower bound, and name as specified,
for column-wise modeling.
This method returns an object representing a new modeling variable of type
IloNumVarType.Float
with the specified bounds and name.
The newly created variable is then installed in existing modeling objects
as defined by the IloColumn
argument column
.
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
Float
with upper bound and lower bound as specified,
for column-wise modeling.
This method returns an object representing a new modeling variable of type
IloNumVarType.Float
with the specified bounds. The newly
created variable
is then installed in existing modeling objects as defined by the
IloColumn
argument column
.
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, java.lang.String[] name) throws IloException
Float
, with the same specified bounds, but with
individually specified names, for column-wise modeling.
This method creates new modeling variables of type
IloNumVarType.Float
, each with the same specified bounds, and
returns them in an array. The number of new variables is determined by
the size of the IloColumnArray
argument cols
.
Each new variable is assigned a separate name, where variable
i
is assigned name[i]
. The new variables
are then installed in existing modeling objects as describe by the
IloColumnArray
argument cols
.
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) throws IloException
Float
, all with same upper bound, all with the same
lower bound, for column-wise modeling.
This method creates new modeling variables of type
IloNumVarType.Float
, each with the same specified bounds, and
returns them in an array. The number of new variables is determined by
the size of the IloColumnArray
argument cols
.
The new variables are then installed in existing modeling objects as
defined by the IloColumnArray
argument cols
.
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
Float
with individually specified upper bound, and
individually specified lower bound, for column-wise modeling.
This method creates new modeling variables of type
IloNumVarType.Float
, each with its own bounds, and returns
them in an array. The number of new variables is determined by the size
of the IloColumnArray
argument cols
.
Variable i
is constructed with bounds lb[i]
and ub[i]
. The new variables are installed in existing
modeling objects as defined by the cols
argument.
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
Float
with individually
specified upper bound, lower bound, and name, for column-wise
modeling.
This method creates new modeling variables of type
IloNumVarType.Float
, each with its own bounds, and returns
them in an array. The number of new variables is determined by the size
of the IloColumnArray
argument cols
.
Variable i
is constructed with bounds
lb[i]
and ub[i]
. and it is assigned
name[i]
. The new variables are installed in existing
modeling objects as defined by the cols
argument.
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, java.lang.String name) throws IloException
This
method returns an object representing a new modeling variable of type
IloNumVarType.Int
with the specified bounds and name. The
newly created variable is then installed in existing modeling objects as
defined by the IloColumn
argument column
.
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 intVar(IloColumn column, int lb, int ub) throws IloException
This
method returns an object representing a new modeling variable of type
IloNumVarType.Int
with the specified bounds. The newly
created variable is then installed in existing modeling objects as
defined by the IloColumn
argument column
.
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[] intVarArray(IloColumnArray cols, int lb, int ub, java.lang.String[] name) throws IloException
This method creates new modeling variables of type
IloNumVarType.Int
, each with the same specified bounds, and
returns them in an array. The number of new variables is determined by
the size of the IloColumnArray
argument cols
.
Each new variable is assigned a separate name, with variable
i
being assigned name[i]
. The new variables
are then installed in existing modeling objects as defined by the
IloColumnArray
argument cols
.
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) throws IloException
This method creates new modeling variables of type
IloNumVarType.Int
, each with the same specified bounds, and
returns them in an array. The number of new variables is determined by
the size of the IloColumnArray
argument cols
.
The new variables are then installed in existing modeling objects as
defined by the IloColumnArray
argument cols
.
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
This method creates new modeling variables of type
IloNumVarType.Int
, each with its own bounds, and returns
them in an array. The number of new variables is determined by the size
of the IloColumnArray
argument cols
. Variable
i
is constructed with bounds lb[i]
and
ub[i]
. The new variables are installed in existing
modeling objects as defined by the cols
argument.
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[] intVarArray(IloColumnArray cols, int[] lb, int[] ub, java.lang.String[] name) throws IloException
This method creates new modeling variables of type
IloNumVarType.Int
, each with its own bounds, and returns
them in an array. The number of new variables is determined by the size
of the IloColumnArray
argument cols
. Variable
i
is constructed with bounds lb[i]
and
ub[i]
and is assigned name[i]
. The
new variables are installed in existing modeling objects as defined
by the cols
argument.
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 boolVar(IloColumn column) throws IloException
This method returns an object representing a new modeling
variable of type IloNumVarType.Bool
. The newly created
variable is then installed in existing modeling objects as defined
by the IloColumn
argument column
.
column
- The column object defining where to install the new
variable.
IloException
public IloIntVar boolVar(IloColumn column, java.lang.String name) throws IloException
This method returns an object representing a new modeling
variable of type IloNumVarType.Bool
with the specified
name. The newly created variable is then installed in existing
modeling objects as defined by the IloColumn
argument
column
.
column
- The column object defining where to install the new
variable.name
- The name of the new modeling variable.
IloException
public IloIntVar[] boolVarArray(IloColumnArray cols) throws IloException
This method creates new modeling variables of type
IloNumVarType.Bool
and returns them in an array. The number
of new variables is determined by the size of the
IloColumnArray
argument cols
. The new
variables are installed in existing modeling objects as defined by
the cols
argument.
cols
- The IloColumnArray
object defining
where to install the new variables.
IloException
public IloIntVar[] boolVarArray(IloColumnArray cols, java.lang.String[] name) throws IloException
This method creates new modeling variables of type
IloNumVarType.Bool
and returns them in an array. The number
of new variables is determined by the size of the
IloColumnArray
argument cols
. Variable
i
will be assigned name[i]
. The new
variables are installed in existing modeling objects as defined by
the cols
argument.
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 IloSemiContVar semiContVar(double sclb, double ub, IloNumVarType type) throws IloException
This method returns an object representing a new semi-continuous modeling variable with the specified bounds and type.
sclb
- 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(double sclb, double ub, IloNumVarType type, java.lang.String name) throws IloException
This method returns an object representing a new semi-continuous modeling variable with the specified bounds, type, and name.
sclb
- 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(IloColumn column, double sclb, double ub, IloNumVarType type) throws IloException
This method returns an object representing a new
semi-continuous modeling variable with the specified bounds and type.
The newly created variable is then installed in existing modeling
objects as defined by the IloColumn
argument
column
.
column
- The column object defining where to install the new
variable.sclb
- 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 semiContVar(IloColumn column, double sclb, double ub, IloNumVarType type, java.lang.String name) throws IloException
This method returns an object representing a new
semi-continuous modeling variable with the specified bounds, type, and
name. The newly created variable is then installed in existing modeling
objects as defined by the IloColumn
argument
column
.
column
- The column object defining where to install the new
variable.sclb
- 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[] semiContVarArray(int n, double sclb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
n
semi-continuous modeling variables,
all with the same type, semi-continuous lower bound, and upper bound,
but with individually specified names.
This method creates n
new semi-continuous modeling
variables, each with the same specified bounds and type, and returns them
in an array. Each new variable is assigned a separate name, with variable
i
assigned name[i]
.
n
- The number of new semi-continuous variables to create.sclb
- 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 sclb, double ub, IloNumVarType type) throws IloException
n
semi-continuous modeling variables,
all of the same type, with the same semi-continuous lower bound and
upper bound.
This method creates n
new semi-continuous modeling
variables, each with the same specified bounds and type, and returns them
in an array.
n
- The number of new semi-continuous variables to create.sclb
- 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[] sclb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
n
semi-continuous modeling variables,
all of the same type, with the same semi-continuous lower bound and
upper bound, and individually specified names.
This method creates new semi-continuous modeling variables, each with
its own bounds and type, and returns them in an array. Variable
i
is constructed with bounds sclb[i]
and
ub[i]
and type type[i]
, and it is assigned
name name[i]
.
n
- The number of new semi-continuous variables to create.sclb
- 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(int n, double[] sclb, double[] ub, IloNumVarType[] type) throws IloException
n
semi-continuous modeling variables,
with individually specified type, semi-continuous lower bound, and
upper bound.
This method creates new semi-continuous modeling variables, each with its
own bounds and type, and returns them in an array. Variable
i
is constructed with bounds sclb[i]
and
ub[i]
and type type[i]
.
n
- The number of new semi-continuous variables to create.sclb
- 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 sclb, double ub, IloNumVarType type, java.lang.String[] name) throws IloException
This method creates an array of new semi-continuous modeling variables,
each with the same specified
bounds and type, and returns them in an array. The number of
new variables is determined by the size of the IloColumnArray
argument cols
. Each new variable is assigned a separate
name, where variable i
is assigned name[i]
.
The new variables are then installed in existing modeling objects as
describe by the IloColumnArray
argument cols
.
cols
- An IloColumnArray
object defining
where to install the new variables.sclb
- 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 sclb, double ub, IloNumVarType type) throws IloException
This method creates new semi-continuous modeling variables,
each with the same specified bounds and type, and returns them in an
array. The number of new variables is determined by the size of the
IloColumnArray
argument cols
. The new
variables are then installed in existing modeling objects as defined
by the IloColumnArray
argument cols
.
cols
- An IloColumnArray
object defining
where to install the new variables.sclb
- 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[] sclb, double[] ub, IloNumVarType[] type) throws IloException
This method creates new semi-continuous modeling variables,
each with its own bounds and type, and returns them in an array. The
number of new variables is determined by the size of the
IloColumnArray
argument cols
. Variable
i
is constructed with bounds sclb[i]
and
ub[i]
and type type[i]
. The new variables will
be installed in existing modeling objects as defined by the
cols
argument.
cols
- An IloColumnArray
object defining where
to install the new variables.sclb
- 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[] sclb, double[] ub, IloNumVarType[] type, java.lang.String[] name) throws IloException
This method creates new semi-continuous modeling variables,
each with its own bounds and type, and returns them in an array. The
number of new variables is determined by the size of the
IloColumnArray
argument cols
. Variable
i
is constructed with bounds sclb[i]
and
ub[i]
and type type[i]
, and it is assigned
name[i]
. The new variables are installed in existing
modeling objects as defined by the cols
argument.
cols
- An IloColumnArray
object defining
where to install the new variables.sclb
- 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 IloNumExpr piecewiseLinear(IloNumExpr expr, double[] points, double[] slopes, double a, double fa) throws IloException
The piecewise linear function is evaluated at expr
and is
defined by the remaining arguments. The array points
contains the n breakpoints for i=1, ... , n-1. The
array slopes
contains the value of the slope
for each piece defined
by the breakpoints. The slope of the function for values less than
points[0]
is slopes[0]
. Similarly,
slopes[i]
specifies the slope between
points[i-1]
and points[i]
. Thus the array
slope
must have one more element than the array points
.
By setting points[i-1] == points[i]
, you can
represent a discontinuous
piecewise linear function. In this case,
the function will
make a step of size slopes[i-1]
at position
points[i]
.
The values a
and fa
define the x and y
coordinates of one point of the piecewise linear function. This point is
referred to as the anchor point.
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
The piecewise linear function is evaluated at expr
and is
defined by the remaining arguments. The array points
contains breakpoints such that points[i-1]
is
less than or equal to points[i]
.
Only num
elements starting with element
startPoints
are considered. The array slopes
contains the slope for each piece defined by the breakpoints. Only
num+1
elements starting with element
startSlopes
are considered.
The element slopes[startSlopes]
specifies the slope of the piecewise linear function for values less than
points[startPoints]
,
and slopes[startSlopes+num]
specifies the slope of the piecewise linear function for values greater
than points[startPoints+num-1]
. For elements in between,
slopes[startSlopes+i]
specifies the slope between
points[startPoints+i-1]
and
points[startPoints+i]
.
By selecting
points[startPoints+i-1] == points[startPoints+i]
,
you can represent
a discontinuous piecewise linear function. At
points[startPoints+i]
, it will make a step of size
slope[startSlopes+i-1]
.
The values a
and fa
define the x and y
coordinates of one point of the piecewise linear function. This point is
referred to as the anchor point.
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
.
IloException
public IloConversion conversion(IloNumVar var, IloNumVarType type) throws IloException
IloConversion
object for converting
the type of a variable in a model.
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 var, IloNumVarType type, java.lang.String name) throws IloException
IloConversion
object, with
the specified name, for converting the type of a variable in a model.
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
IloConversion
object for converting
the type of the variables in array var
in a model.
var
- 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[] var, IloNumVarType type, java.lang.String name) throws IloException
IloConversion
object with
the specified type and name, for converting
the type of the variables in array var
in a model.
var
- 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[] var, IloNumVarType[] type) throws IloException
IloConversion
object for converting
the type of the variables in the array var
in a model.
var
- 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 IloConversion conversion(IloNumVar[] var, IloNumVarType[] type, java.lang.String name) throws IloException
IloConversion
object,
with the specified name, for converting
the type of the variables in array var
in a model.
var
- 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 IloLPMatrix addLPMatrix() throws IloException
IloLPMatrix
object.
The new IloLPMatrix
object is initialized to
0
columns and 0
rows. It can be populated later
by the IloLPMatrix
manipulation API. The new
IloLPMatrix
object is added to the invoking model.
IloLPMatrix
object.
IloException
public IloLPMatrix addLPMatrix(java.lang.String name) throws IloException
IloLPMatrix
object,
with the specified name, to the invoking model.
The new IloLPMatrix
object is initialized to
0
columns and 0
rows. It can be populated later
using the IloLPMatrix
manipulation API. The new
IloLPMatrix
object is added to the invoking model.
The new IloLPMatrix
object is
assigned name
.
name
- The name for the new IloLPMatrix
object.
IloLPMatrix
object.
IloException
public IloLPMatrix LPMatrix() throws IloException
IloLPMatrix
object.
The new IloLPMatrix
object is initialized to
0 (zero) columns and 0 (zero) rows. It can be populated
later by the IloLPMatrix
manipulation API.
IloLPMatrix
object.
IloException
public IloLPMatrix LPMatrix(java.lang.String name) throws IloException
IloLPMatrix
object with
the specified name.
The new IloLPMatrix
object is initialized to
0 (zero) columns and 0(zero) rows. It can be populated
later using the IloLPMatrix
manipulation API. The new
IloLPMatrix
object is assigned the name
.
name
- The name for the new IloLPMatrix
object.
IloLPMatrix
object.
IloException
public IloSOS1 addSOS1(IloNumVar[] var, double[] val) throws IloException
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
num
of
the specified variables and weights,
starting from the index specified by start
,
and adds the SOS to the invoking model.
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
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
num
specified variables, weights, and names, starting from the index
specified by start
, and adds the SOS to the invoking mode.
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
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
num
of the
specified variables and weights, starting from the index
specified by start
, and adds the SOS to the
invoking model.
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
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
num
of the specified
variables and weights, starting from the index specified by
start
, and adds the new SOS along with its name
to the invoking model.
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 IloSOS1 SOS1(IloNumVar[] var, double[] val) throws IloException
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
num
specified variables and weights, starting from the index specified
by start
.
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
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
num
specified variables and weights, starting from the index specified
by start
, and assigns the new SOS a name.
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 SOS2(IloNumVar[] var, double[] val) throws IloException
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
num
specified variables and weights, starting from the index specified
by start
.
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
name
.
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
num
specified variables and weights, starting from the index specified by
start
, and assigns
the new SOS its name
.
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
IloColumn
object suitable for adding a new
variable to
constraint rng
as a linear term with coefficient
val
.
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
IloColumnArray
suitable for adding new variables
to constraint rng
as linear terms with coefficients specified
in val
.
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
IloColumnArray
suitable for adding
num
new variables to constraint IloRange
as
linear terms with coefficients specified in val
.
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
IloColumn
object suitable for adding a new
variable to the objective obj
as a linear term with
coefficient val
.
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
IloColumnArray
object suitable for adding new
variables to the objective obj
as linear terms with
coefficients specified in val
.
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
IloColumnArray
object suitable for adding
num
new variables to the objective obj
as
linear terms with coefficients specified in val
.
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
IloColumn
object suitable for adding a new
variable to an LP matrix as an empty column. Note, that the column of
the LP matrix is only created when creating a variable with the returned
IloColumn
object but not when calling this method.
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
IloColumn
object suitable for adding a new
variable to an LP matrix as a new column. Note, that the column of the
LP matrix is only created when creating a variable with the returned
IloColumn
object but not when calling this method.
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
IloColumn
object suitable for adding a new
variable to an LP matrix as a new column. Note, that the column of the
LP matrix is only created when creating a variable with the returned
IloColumn
object but not when calling this method.
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
IloColumnArray
object suitable for adding new
variables to an IloLPMatrix
as columns. The procedure is
as follows: You create an IloColumnArray
from an
IloLPMatrix
by calling columnArray()
with the
list of nonzeros for each new column given in arrays ind
and
val
. You optionally combine this column array with
IloColumnArray
objects created for other modeling objects.
Then you create an array of variables by passing the so constructed
IloColumnArray
object to the appropriate method of the
IloMPModeler
you use.
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
IloColumnArray
object suitable for adding new
variables to an IloLPMatrix
as empty columns.
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 addToExpr(IloObjective obj, IloNumExpr expr) throws IloException
IloObjective
object.
obj
- The objective to modify.expr
- The new expression to add.
IloException
public void setLinearCoef(IloObjective obj, double val, IloNumVar var) throws IloException
var
to val
in the expression of the specified IloObjective
object.
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
var
to val
in the expression of the specified IloObjective
object.
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
IloObjective
object.
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
IloObjective
object.
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
IloObjective
object.
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
IloObjective
object.
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 void addToExpr(IloRange rng, IloNumExpr expr) throws IloException
IloRange
object.
rng
- The range constraint to modify.expr
- The expression to add.
IloException
public void setLinearCoef(IloRange rng, double val, IloNumVar var) throws IloException
var
to val
in the expression of the specified IloRange
object.
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
var
to val
in the expression of the specified IloRange
object.
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
IloRange
object.
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
IloRange
object.
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
IloRange
object.
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
IloRange
object.
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |