public class IloCplex extends IloCplexModeler implements java.lang.AutoCloseable
IloCplex is the class used to create and solve
a large variety of Mathematical Programming models.
Such models include:
This class implements the modeling interface
IloMPModeler
and its base interfaces. See the topic
Modeling an optimization problem with Concert Technology
in the Java API in the
CPLEX User's Manual for more information about modeling.
Models to be solved by
IloCplex
should be built by the methods of
IloMPModeler
(and base interface) to construct
objects from the following list:
IloNumVar
and its extensions
IloIntVar
and
IloSemiContVar
IloRange
with (piecewise) linear or quadratic expressionsIloConstraint
of the form expr1 relation expr2,
where both expressions are linear or quadratic and may optionally
contain piecewise linear terms.IloLPMatrix
IloObjective
with a (piecewise) linear and/or quadratic expressionsIloConversion
IloSOS1
or
IloSOS2
IloCplex stores such models internally in the standard
math programming matrix representation:
Minimize (or Maximize) c'x + x'Qx
subject to L <= Ax <= U
a_i'x + x'Q_i x <= r_i, for i = 1, ..., q
l <= x <= u.
Thus A is the matrix of linear constraint coefficients, and L and U are the vectors of lower and upper bounds on the vector of variables, x. The Q matrix must be positive semi-definite (or negative semi-definite in the maximization case) and represents the quadratic terms of the objective function. The matrices Q_i must be positive semi-definite and represent the quadratic terms of the i-th quadratic constraint, and the a_i are vectors containing the corresponding linear terms. For more about the Q_i, see the chapter about QCP in the CPLEX User's Manual.
If the model contains integer, Boolean, or semi-continuous variables,
or if the model has special ordered sets (SOSs), the model is referred to
as a mixed integer program (MIP). You can query whether the
active model is a MIP with the method
IloCplex.isMIP.
A model with quadratic terms in the objective is referred to as
a mixed integer quadratic program (MIQP) if it is also a MIP,
and a quadratic program (QP) otherwise.
You can query whether the active model has a quadratic objective
by calling method
IloCplex.isQO.
A model with quadratic constraints is referred to as a quadratically
constrained program (MIQCP) if it is also a MIP, and as QCP otherwise.
You can query whether the active model is
quadratically constrained by calling the method
IloCplex.isQC.
A QCP may or may not have a quadratic objective; that is, a given problem
may be both QP and QCP. Likewise, a MIQCP may
or may not have a quadratic objective; that is, a given problem may be
both MIQP and MIQCP.
If there are no quadratic terms in the objective, no integer constraints, and the problem is not quadratically constrained, it is called a linear program (LP).
If there are no quadratic terms in the objective, and the problem is not quadratically constrained, but there are integer variables, it is called a mixed integer linear program (MILP).
Special ordered sets (SOS) fall outside the conventional representation in terms of A and Q matrices and are stored separately.
Information related to the matrix representation of the model can be queried through these methods:
IloCplex.getNcols
for querying the number of columns of A,IloCplex.getNrows
for querying the number of rows of A; that is,
the number of linear constraints,IloCplex.getNQCs
for querying the number of quadratic constraints,IloCplex.getNNZs
for querying the number of nonzero elements in A, and IloCplex.getNSOSs
for querying the number of SOSs.Additional information about the active model can be obtained through iterators defined on the different types of modeling objects.
IloCplex effectively treats all models as MIQCP models.
That is, it allows the most general case, although the solution algorithms
make efficient use of special cases, such as the absence of quadratic
terms in the formulation.
The method
IloCplex.solve
is used to solve the
active model. It begins by solving the root relaxation of the
MIQCP model, where all integrality constraints and SOSs are ignored. If
the model has no integrality constraints or SOSs, then the optimization
is complete once the root relaxation is solved. Otherwise,
IloCplex uses a branch and cut procedure to reintroduce
the integrality constraints and SOS constraints. See the
CPLEX User's Manual for more information
about branch and cut.
Most users can simply call the method
IloCplex.solve
to solve their models.
However, several parameters are available for users who require more
control.
Perhaps the most important one is
IloCplex.IntParam.RootAlg,
which determines the algorithm used to solve the root relaxation.
Possible settings, as defined in
IloCplex.Algorithm
are:
IloCplex.Algorithm.Auto
IloCplex automatically selects an algorithm. This is the
default setting.IloCplex.Algorithm.Primal
Use the primal simplex algorithm.IloCplex.Algorithm.Dual
Use the dual simplex algorithm.IloCplex.Algorithm.Network
Use network simplex on the embedded network part of the model,
followed by dual simplex on the entire model.IloCplex.Algorithm.Barrier
Use the barrier algorithm.IloCplex.Algorithm.Sifting
Use the sifting algorithm. This option is not available for quadratic
problems. If selected nonetheless, IloCplex defaults to
the IloCplex.Algorithm.Auto setting.IloCplex.Algorithm.Concurrent
Use several algorithms concurrently. This option is not available
for quadratic problems. If selected nonetheless, IloCplex
defaults to the IloCplex.Algorithm.Auto setting.Numerous other parameters allow you to control algorithmic aspects of
the optimizer. See
IloCplex.IntParam,
IloCplex.LongParam,
IloCplex.DoubleParam,
IloCplex.BooleanParam, and
IloCplex.StringParam
for further information.
Parameters are set with the method
setParam.
Even higher levels of control can be achieved through the use of goals
(see
IloCplex.Goal)
or callbacks (see
IloCplex.Callback
and its extensions).
The
IloCplex.solve
method returns a Boolean value reporting whether
(true) or not
(false) a solution (not necessarily the optimal one) has been
found. Further information about the solution can be queried with the method
getStatus. The return code of type
IloCplex.Status reports whether the
solution is feasible, bounded, or optimal,
or whether the model has been proven
to be infeasible or unbounded. See
IloCplex.Status
for more information.
The method
IloCplex.getCplexStatus
provides more detailed information about the status of the optimizer after
IloCplex.solve
returns. For example, it can provide
information about why the optimizer terminated prematurely (time limit,
iteration limit, or other limits). The methods
IloCplex.isPrimalFeasible
and
IloCplex.isDualFeasible
determine whether a primal or dual feasible solution has been found
and can be queried.
The most important solution information computed by IloCplex
are usually the solution vector and the objective function value.
The method
IloCplex.getValue
queries the solution vector and
IloCplex.getObjValue
queries the value of the objective function.
Most optimizers also compute additional solution information.
(for example, dual values, reduced costs, simplex bases, etc.) This
additional information can also be queried through various methods of
IloCplex. If you attempt to retrieve solution information
that is not available from a particular optimizer, IloCplex
will throw an exception.
If you are solving an LP and a basis is available, the solution can be
further analyzed by performing sensitivity analysis. This information tells * you how sensitive the solution is with respect to changes in
variable bounds, constraint bounds, or objective coefficients.
The information is computed and accessed with the methods
IloCplex.getBoundSA,
IloCplex.getRangeSA,
IloCplex.getRHSSA, and
IloCplex.getObjSA.
An important consideration when you access solution information is the
numeric quality of the solution.
Since IloCplex performs arithmetic operations using
finite precision, solutions are always subject to numeric errors.
For most problems, numeric errors are well within reasonable tolerances.
However, for numerically difficult models, you
are advised to verify the quality of the solution using the method
IloCplex.getQuality,
which offers a variety of quality measures.
| Modifier and Type | Class and Description |
|---|---|
static class |
IloCplex.Aborter
Gracefully terminates the solve and tuning methods of CPLEX.
|
static class |
IloCplex.Algorithm
Enumeration of types of algorithms (algorithm-type)
used by
IloCplex. |
static class |
IloCplex.Annotation
Base class for annotations.
|
static class |
IloCplex.BarrierCallback
This is the callback class to use when
IloCplex uses the
barrier optimizer. |
static class |
IloCplex.BasisStatus
Enumeration of possible basis status codes.
|
static class |
IloCplex.BendersStrategy
Enumeration of possible values for the
IloCplex.Param.Benders.Strategy parameter. |
static class |
IloCplex.BooleanParam
Symbolic names for parameters in
IloCplex that are
Boolean-valued. |
static class |
IloCplex.BooleanParameter
Members of this class access parameters that take a Boolean value.
|
static class |
IloCplex.BranchCallback
Base class for user-written callbacks that control branching.
|
static class |
IloCplex.BranchDirection
Enumeration of branch direction values.
|
static class |
IloCplex.BranchType
Identifies a branch type for a user-written callback.
|
static class |
IloCplex.CalcQCPDuals
Enumeration of possible values for the QCP dual computation parameter
IloCplex.IntParam.CalcQCPDuals. |
static class |
IloCplex.Callback
The callback base class.
|
static class |
IloCplex.ConflictAlgorithm
Enumeration of possible values for the conflict algorithm
IloCplex.Param.Conflict.Algorithm. |
static class |
IloCplex.ConflictStatus
The class of status values returned by
IloCplex.refineConflict. |
static class |
IloCplex.ContinuousCallback
The callback base class for user-written callbacks invoked at
every iteration of the simplex or barrier optimizers when they
are solving a continuous model.
|
static class |
IloCplex.ControlCallback
Base class for all callback classes querying or taking control of
the MIP branch-and-cut search.
|
static class |
IloCplex.CplexEndedException
Exceptions of this class are thrown when a method is called for an
IloCplex object or any object that has been created with it
after the end method has been called. |
static class |
IloCplex.CplexStatus
Enumeration of possible
IloCplex algorithm
status codes. |
static class |
IloCplex.CrossoverCallback
The base class for user-written callbacks during crossover from a barrier
solution to a simplex basis.
|
static class |
IloCplex.CutManagement
Enumeration of possible values to specify how
CPLEX should treat a cut.
|
static class |
IloCplex.CutType
Enumeration of cut types.
|
static class |
IloCplex.DataCheck
Enumeration of possible values for the
IloCplex.IntParam.DataCheck parameter. |
static class |
IloCplex.DeleteMode
Enumeration of possible values for the delete mode of
IloCplex, as controlled by the methods
setDeleteMode and getDeleteMode. |
static class |
IloCplex.DisjunctiveCutCallback
This is the callback class to use to control the progress
of the generation of disjunctive cuts when a mixed integer
programming problem (MIP) is being solved.
|
static class |
IloCplex.DisjunctiveCutInfoCallback
Monitors the progress
of the generation of disjunctive cuts when a mixed integer
programming problem (MIP) is being solved.
|
static class |
IloCplex.DoubleAnnotation
An annotation that stores data of type
double. |
static class |
IloCplex.DoubleParam
Symbolic parameter names for double-valued
IloCplex parameters. |
static class |
IloCplex.DoubleParameter
Members of this class access parameters that take a double value.
|
static class |
IloCplex.DualPricing
Enumeration of possible values for the dual pricing parameter
IloCplex.IntParam.DPriInd. |
static class |
IloCplex.FilterIndex
An instance of this class represents the index of a filter
associated with the solution pool.
|
static class |
IloCplex.FilterType
An instance of this class represents the type of a filter
associated with the solution pool.
|
static class |
IloCplex.FlowMIRCutCallback
This is the callback class to use to control the progress
of the generation of flow cover and mixed integer rounding (MIR)
cuts when a mixed integer programming problem (MIP) is being solved.
|
static class |
IloCplex.FlowMIRCutInfoCallback
Monitors the progress
of the generation of flow cover and mixed integer rounding (MIR)
cuts when a mixed integer programming problem (MIP) is being solved.
|
static class |
IloCplex.FractionalCutCallback
This is the callback class to use to control or query the progress
of the generation of fractional cuts when a mixed integer
programming problem (MIP) is being solved.
|
static class |
IloCplex.FractionalCutInfoCallback
Monitors the progress
of the generation of fractional cuts when a mixed integer
programming problem (MIP) is being solved.
|
static class |
IloCplex.Goal
Base class of user-written implementation classes of goals.
|
static class |
IloCplex.HeuristicCallback
Base class for user-written callbacks injecting integer-feasible
solutions during search.
|
static class |
IloCplex.IncumbentCallback
Class of callbacks called when a new incumbent is found.
|
static class |
IloCplex.IntegerFeasibilityStatus
Objects of this class report the integer feasibility status of
a variable.
|
static class |
IloCplex.IntParam
Symbolic parameter names for integer-valued
IloCplex parameters. |
static class |
IloCplex.IntParameter
Members of this class access parameters that take integer values.
|
static class |
IloCplex.LazyConstraintCallback
Callback class for lazy constraints.
|
static class |
IloCplex.LongAnnotation
An annotation that stores data of type
long. |
static class |
IloCplex.LongParam
Symbolic parameter names for integer-valued
IloCplex parameters. |
static class |
IloCplex.LongParameter
Members of this class access parameters that take integer values.
|
static class |
IloCplex.MIPCallback
The base class for MIP control and query callbacks.
|
static class |
IloCplex.MIPEmphasis
Enumeration of possible values for the
IloCplex.IntParam.MIPEmphasis parameter. |
static class |
IloCplex.MIPInfoCallback
The base class for all MIP informational callbacks.
|
static class |
IloCplex.MIPSearch
Enumeration of possible values for the MIP search parameter
|
static class |
IloCplex.MIPStartEffort
Levels of effort for CPLEX to expend to solve a MIP start.
|
static class |
IloCplex.MultiObjIntInfo
The enumeration
IloCplex::MultiObjIntInfo lists types of
solution information of type int that can be retrieved
about the solution of a subproblem solved during multiobjective
optimization. |
static class |
IloCplex.MultiObjLongInfo
The enumeration
IloCplex::MultiObjLongInfo lists types of
solution information of type long that can be retrieved
about the solution of a subproblem solved during multiobjective
optimization. |
static class |
IloCplex.MultiObjNumInfo
The enumeration
IloCplex::MultiObjNumInfo lists types of
solution information of type double that can be retrieved
about the solution of a subproblem solved during multiobjective
optimization. |
static class |
IloCplex.MultipleUseException
Exceptions of this class are thrown when a modeling object that is used
by one instance of
IloCplex is attempted to be used
by anotherIloCplex object at the same time. |
static class |
IloCplex.NetworkCallback
This is the callback class to use when
IloCplex uses the
network optimizer. |
static class |
IloCplex.NodeCallback
Base class for user-written callbacks
selecting the next node to process
during the branch-and-cut search.
|
static class |
IloCplex.NodeEvaluator
Represents a node evaluator.
|
static class |
IloCplex.NodeId
A class for uniquely identifying a MIP node
in a branch-and-cut tree.
|
static class |
IloCplex.NodeSelect
Enumeration of possible values for the node selection parameter
IloCplex.IntParam.NodeSel. |
static class |
IloCplex.OptimalityTarget
Enumeration of possible values for the QP solution target parameter
|
static class |
IloCplex.OptimizationCallback
Base class for legacy callbacks to be used in optimization.
|
static class |
IloCplex.ParallelMode
Enumeration of possible values for the dual pricing parameter
IloCplex.IntParam.ParallelMode. |
static class |
IloCplex.Param
For documentation, see parameters by name in the
CPLEX Parameters Reference Manual.
|
static class |
IloCplex.Parameter
Members of this class enumerate the types of parameters.
|
static class |
IloCplex.ParameterSet
A parameter set for IloCplex.
|
static class |
IloCplex.PrimalPricing
Enumeration of possible values for the primal pricing parameter
IloCplex.IntParam.PPriInd. |
static class |
IloCplex.ProbingCallback
Base class for user-written control and query callbacks
that control probing progress.
|
static class |
IloCplex.ProbingInfoCallback
Monitors probing progress for user-written callbacks in
a mixed integer program (MIP).
|
static class |
IloCplex.Quality
Objects of this class contain information
computed to measure the quality of a solution.
|
static class |
IloCplex.QualityType
This class contains symbolic names to identify measures of the quality
of a solution.
|
static class |
IloCplex.Relaxation
Enumeration of possible values for the parameter
FeasOptMode. |
static class |
IloCplex.SearchLimit
Represents a limit of the search to a specified subtree.
|
static class |
IloCplex.SimplexCallback
This is the callback class to use when
IloCplex uses the
simplex optimizer. |
static class |
IloCplex.SolutionSource
This enumeration lists the values that tell for which type
of solution the incumbent callback or lazy constraint callback was invoked.
|
static class |
IloCplex.SolutionType
Enumeration of solution types.
|
static class |
IloCplex.SolveCallback
The base class for user-written solve callbacks to control how
subproblems (for example, node and heuristic subproblems)
are solved within branch and cut.
|
static class |
IloCplex.Status
Enumeration of possible solution status values, as returned by the
method
cplex.getStatus. |
static class |
IloCplex.StringParam
Symbolic parameter names for string-valued
IloCplex parameters. |
static class |
IloCplex.StringParameter
Members of this class access parameters that take a string as a value.
|
static class |
IloCplex.TuningCallback
Base class for callbacks to use in a tuning session.
|
static class |
IloCplex.TuningStatus
Members of this class represent the status of a tuning session.
|
static class |
IloCplex.UnknownObjectException
Exceptions of this class are thrown if operations are attempted for
modeling objects that not part of the active model.
|
static class |
IloCplex.UnsupportedObjectException
Exceptions of this class are thrown when a modeling object that
cannot be extracted is added to
the invoking
IloCplex object. |
static class |
IloCplex.UnsupportedQException
An instance of this exception is thrown by
IloCplex when
a quadratic expression is encountered where it is not supported by
IloCplex. |
static class |
IloCplex.UserCutCallback
This is the callback class to use to add user-written
cuts during the branch-and-cut search.
|
static class |
IloCplex.VariableSelect
Enumeration of possible values for the
IloCplex.IntParam.VarSel parameter. |
static class |
IloCplex.WriteLevel
Levels of detail when MIP starts and solutions are written
to formatted files.
|
IloCplexModeler.Exception| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CPX_BENDERS_ANNOTATION
Name of the Benders annotation.
|
static int |
CPX_BENDERS_MASTERVALUE
Value for the master partition of a Benders annotation.
|
static int |
IncumbentId
This constant identifies the incumbent solution for a MIP
in methods which require a solution index.
|
| Constructor and Description |
|---|
IloCplex()
This constructor creates an instance of
IloCplex
with an empty active model. |
| Modifier and Type | Method and Description |
|---|---|
IloRange |
addCut(IloRange cut)
Adds the constraint
cut as a cut to the invoking
IloCplex object. |
IloRange[] |
addCuts(IloRange[] cut)
Adds the constraints given in
cut as cuts to the invoking
IloCplex object. |
IloRange[] |
addCuts(IloRange[] cut,
int start,
int num)
Adds
num constraints given in cut
as cuts to the invoking IloCplex object, starting
with element cut[start]. |
IloCplex.FilterIndex |
addDiversityFilter(double lower_bound,
double upper_bound,
IloNumVar[] vars,
double[] weights,
double[] refval)
Creates and installs a diversity filter
for the designated variables with the specified
lower and upper bounds, reference values, and weights.
|
IloCplex.FilterIndex |
addDiversityFilter(double lower_bound,
double upper_bound,
IloNumVar[] vars,
double[] weights,
double[] refval,
java.lang.String fname)
Creates and installs a named diversity filter
for the designated variables with the specified
lower and upper bounds, reference values, and weights.
|
IloRange |
addLazyConstraint(IloRange cut)
This is an advanced method.
|
IloRange[] |
addLazyConstraints(IloRange[] cut)
This is an advanced method.
|
IloRange[] |
addLazyConstraints(IloRange[] cut,
int start,
int num)
This is an advanced method.
|
int |
addMIPStart()
Adds an empty MIP start to the current problem.
|
int |
addMIPStart(IloCplex.MIPStartEffort effort)
Adds a MIP start with its specified level of effort to the current
problem.
|
int |
addMIPStart(IloCplex.MIPStartEffort effort,
java.lang.String name)
Adds the MIP start, its name, and an effort level to the current problem.
|
int |
addMIPStart(IloNumVar[] vars,
double[] values)
Adds the MIP start specified by its variables and values to
the current problem.
|
int |
addMIPStart(IloNumVar[] vars,
double[] values,
IloCplex.MIPStartEffort effort)
Adds a MIP start, as defined by its variables and values, with
its specified level of effort, to the current problem.
|
int |
addMIPStart(IloNumVar[] vars,
double[] values,
IloCplex.MIPStartEffort effort,
java.lang.String name)
Adds a MIP start as specified by its variables and values,
along with its specified level of effort and its name, to
the current problem.
|
int |
addMIPStart(IloNumVar[] vars,
double[] values,
int vstart,
int vnum,
IloCplex.MIPStartEffort effort,
java.lang.String name)
Adds a MIP start, defined by a range of numeric variables
and corresponding values, with its name and an effort level.
|
int |
addMIPStart(IloNumVar[] vars,
double[] values,
java.lang.String name)
Adds the MIP start specified by its variables and values,
along with its name, to the current problem.
|
int |
addMIPStart(java.lang.String name)
Adds a MIP start with its specified name to the current problem.
|
IloCplex.FilterIndex |
addRangeFilter(double lb,
double ub,
IloNumVar[] ind,
double[] val)
Creates and installs a range filter
with the specified lower and upper bounds
for the designated variables and weights.
|
IloCplex.FilterIndex |
addRangeFilter(double lb,
double ub,
IloNumVar[] ind,
double[] val,
java.lang.String fname)
Creates and installs a named range filter
with the specified lower and upper bounds
for the designated variables and weights.
|
IloRange |
addUserCut(IloRange cut)
This is an advanced method.
|
IloRange[] |
addUserCuts(IloRange[] cuts)
This is an advanced method.
|
IloRange[] |
addUserCuts(IloRange[] cuts,
int start,
int num)
This is an advanced method.
|
IloCplex.Goal |
and(IloCplex.Goal goal1,
IloCplex.Goal goal2)
Creates and returns a conjunctive goal
(that is, an and-goal) from two arguments.
|
IloCplex.Goal |
and(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3)
Creates and returns a conjunctive goal
(that is, an and-goal) from three arguments.
|
IloCplex.Goal |
and(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4)
Creates and returns a conjunctive goal
(that is, an and-goal) from four arguments.
|
IloCplex.Goal |
and(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4,
IloCplex.Goal goal5)
Creates and returns a conjunctive goal (that is, an and-goal)
from five arguments.
|
IloCplex.Goal |
and(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4,
IloCplex.Goal goal5,
IloCplex.Goal goal6)
Creates and returns a conjunctive goal (that is, an and-goal)
from six arguments.
|
IloCplex.Goal |
apply(IloCplex.Goal goal,
IloCplex.NodeEvaluator evaluator)
Returns a goal that applies the specified evaluator to
the search tree defined by the specified goal.
|
void |
basicPresolve(IloNumVar[] vars,
double[] redlb,
double[] redub,
IloRange[] rngs,
boolean[] redundant)
Performs bound strengthening and detects redundant rows.
|
IloNumVarBound |
bound(IloNumVar var,
IloNumVarBoundType type)
Creates and returns an object of type
IloNumVarBound
to represent the specified bound of the variable var. |
IloCplex.Goal |
branchAsCplex()
Creates and returns a goal that branches the same
way
IloCplex
would in the absence of any goal at the current node. |
void |
changeMIPStart(int mipstartindex,
IloCplex.MIPStartEffort effort)
Changes the MIP start designated by its index and associates
a specified level of effort with the changed MIP start.
|
void |
changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values)
Changes the MIP start designated by its index by substituting the
the corresponding values for the designated variables.
|
void |
changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values,
IloCplex.MIPStartEffort effort)
Changes the MIP start specified by its index in the current problem
by substituting the corresponding values of the designated variables
and associates a level of effort with the changed MIP start.
|
void |
changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values,
int vstart,
int vnum,
IloCplex.MIPStartEffort effort)
Changes the MIP start specified by its index in the current
problem, by substituting the corresponding number of values from the
starting variable specified by the variable index.
|
void |
clearCallbacks()
Removes all callbacks from the invoking
IloCplex object. |
void |
clearCuts()
Deletes all cuts added by the user
to the invoking
IloCplex object
with the methods addCut and addCuts. |
void |
clearLazyConstraints()
This is an advanced method.
|
void |
clearModel()
Removes all modeling objects from the active model.
|
void |
clearUserCuts()
This is an advanced method.
|
void |
close()
Releases the
IloCplex object and the associated objects
created by calls of the methods of the invoking object. |
IloCplex.Goal |
constraintGoal(IloConstraint cut)
Creates and returns a constraint goal for the specified
constraint
cut. |
IloCplex.Goal |
constraintGoal(IloConstraint[] cut)
Creates and returns a constraint goal for the constraints
specified in the array
cut. |
void |
delAnnotation(IloCplex.DoubleAnnotation annotation)
Deletes a
DoubleAnnotation. |
void |
delAnnotation(IloCplex.LongAnnotation annotation)
Deletes a
LongAnnotation. |
void |
delDirection(IloNumVar var)
Removes any existing branching direction assignments from the variable
var. |
void |
delDirections(IloNumVar[] var)
Removes any existing assignments of branching direction from all the
variables in the specified array.
|
void |
delDirections(IloNumVar[] var,
int start,
int num)
Removes any existing branching direction assignments from
num
consecutive variables in the array var,
starting with the variable var[start]. |
void |
deleteMIPStarts(int first)
Deletes the MIP start designated by its index.
|
void |
deleteMIPStarts(int first,
int num)
Deletes a number of MIP starts, starting with the MIP start
designated by its index.
|
void |
deleteNames()
Removes all names from the active model.
|
void |
delFilter(IloCplex.FilterIndex i)
Deletes the specified range filter from the solution pool.
|
void |
delPriorities(IloNumVar[] var)
Removes any existing branch priority assignment from the variables in
array
var. |
void |
delPriorities(IloNumVar[] var,
int start,
int num)
Removes any existing branch priority assignment from
num
consecutive variables in the array var,
starting with the variable var[start]. |
void |
delPriority(IloNumVar var)
Removes any existing branch priority assignment from variable
var. |
void |
delSolnPoolSoln(int soln)
Deletes the designated solution from the solution pool.
|
void |
delSolnPoolSolns(int start,
int num)
Deletes a range of solutions from the solution pool.
|
double |
dualFarkas(IloConstraint[] rng,
double[] y)
Returns a Farkas proof of infeasibility.
|
void |
end()
Releases the
IloCplex object and the associated objects
created by calls of the methods of the invoking object. |
void |
endModel()
Deletes all objects from a model, leaving an empty model behind.
|
IloCplex.Goal |
eqGoal(double lhs,
IloNumExpr expr)
Creates a constraint goal for the constraint
lhs == expr. |
IloCplex.Goal |
eqGoal(IloNumExpr expr,
double rhs)
Creates a constraint goal for the constraint
expr == rhs. |
IloCplex.Goal |
eqGoal(IloNumExpr expr1,
IloNumExpr expr2)
Creates a constraint goal for the constraint
expr1 == expr2. |
void |
exportModel(java.lang.String name)
Writes the active model to the file specified by
filename. |
IloCplex.Goal |
failGoal()
Creates and returns a goal that always fails.
|
boolean |
feasOpt(IloConstraint[] cts,
double[] prefs)
This method computes a minimum-cost relaxation
in order to make the active model feasible by relaxing the constraints
specified in
cts. |
boolean |
feasOpt(IloNumVar[] vars,
double[] varlb,
double[] varub)
This method computes a minimum-cost relaxation
in order to make the active model feasible by relaxing the bounds
of the variables specified in the array
vars. |
boolean |
feasOpt(IloRange[] rngs,
double[] rnglb,
double[] rngub)
This method computes a minimum-cost relaxation
in order to make the active model feasible by relaxing the
bounds of the range constraints specified in
the array
rngs. |
boolean |
feasOpt(IloRange[] rngs,
double[] rnglb,
double[] rngub,
IloNumVar[] vars,
double[] varlb,
double[] varub)
This method computes a minimum-cost relaxation
in order to make the active model feasible by relaxing the bounds
of the variables specified in the array
vars and
by relaxing the bounds of the range constraints specified in
the array rngs. |
IloCplex.DoubleAnnotation |
findDoubleAnnotation(int num)
Gets a reference to
DoubleAnnotation number num. |
IloCplex.DoubleAnnotation |
findDoubleAnnotation(java.lang.String name)
Gets a reference to
DoubleAnnotation called name. |
IloCplex.LongAnnotation |
findLongAnnotation(int num)
Gets a reference to
LongAnnotation number num. |
IloCplex.LongAnnotation |
findLongAnnotation(java.lang.String name)
Gets a reference to
LongAnnotation called name. |
IloCplex.Goal |
geGoal(double lhs,
IloNumExpr expr)
Creates a constraint goal for the constraint
lhs >= expr. |
IloCplex.Goal |
geGoal(IloNumExpr expr,
double rhs)
Creates a constraint goal for the constraint
expr >= rhs. |
IloCplex.Goal |
geGoal(IloNumExpr expr1,
IloNumExpr expr2)
Creates a constraint goal for the constraint
expr1 >= expr2. |
IloCplex.Aborter |
getAborter()
Returns a handle to the aborter being used by the invoking object.
|
int |
getAlgorithm()
Returns the algorithm that was used to generate the current solution.
|
double[] |
getAnnotation(IloCplex.DoubleAnnotation annotation,
IloAddable[] items)
Gets the annotation values for an array of objects.
|
double |
getAnnotation(IloCplex.DoubleAnnotation annotation,
IloConstraint con)
Gets the annotation value for a constraint.
|
double |
getAnnotation(IloCplex.DoubleAnnotation annotation,
IloIntVar var)
Gets the annotation value for an instance of
IloIntVar. |
double |
getAnnotation(IloCplex.DoubleAnnotation annotation,
IloNumVar var)
Gets the annotation value for an instance of
IloNumVar. |
double |
getAnnotation(IloCplex.DoubleAnnotation annotation,
IloObjective obj)
Gets the annotation value for an objective function.
|
long[] |
getAnnotation(IloCplex.LongAnnotation annotation,
IloAddable[] items)
Gets the annotations values for an array of objects.
|
long |
getAnnotation(IloCplex.LongAnnotation annotation,
IloConstraint con)
Gets the annotation value for a constraint.
|
long |
getAnnotation(IloCplex.LongAnnotation annotation,
IloIntVar var)
Gets the annotation value for an
IloIntVar. |
long |
getAnnotation(IloCplex.LongAnnotation annotation,
IloNumVar var)
Gets the annotation value for an instance of
IloNumVar. |
long |
getAnnotation(IloCplex.LongAnnotation annotation,
IloObjective obj)
Gets the annotation value for an objective function.
|
java.lang.String |
getAnnotationName(IloCplex.DoubleAnnotation annotation)
Gets the name for a
LongAnnotation. |
java.lang.String |
getAnnotationName(IloCplex.LongAnnotation annotation)
Gets the name for a
LongAnnotation. |
double[] |
getAX(IloLPMatrix matrix)
Returns an array containing the row activity values for the constraints
corresponding to the rows of an LP matrix.
|
double[] |
getAX(IloLPMatrix matrix,
int start,
int num)
Returns row activity values for a range of
num consecutive rows, starting from the
index specified by start, of an LP matrix. |
double |
getAX(IloRange rng)
Returns the row activity value for a range constraint.
|
double[] |
getAX(IloRange[] rng)
Returns row activity values for an array of range constraints.
|
double[] |
getAX(IloRange[] rng,
int start,
int num)
Queries row activity values for a set of range constraints.
|
IloCplex.BasisStatus |
getBasisStatus(IloConstraint con)
Returns basis status for a specified constraint.
|
IloCplex.BasisStatus |
getBasisStatus(IloNumVar var)
Returns the basis status for the variable
var. |
IloCplex.BasisStatus[] |
getBasisStatuses(IloConstraint[] con)
Returns basis status for consecutive constraints.
|
IloCplex.BasisStatus[] |
getBasisStatuses(IloConstraint[] con,
int start,
int num)
Returns basis status for consecutive constraints.
|
IloCplex.BasisStatus[] |
getBasisStatuses(IloNumVar[] var)
Returns basis statuses for the variables in the specified array.
|
IloCplex.BasisStatus[] |
getBasisStatuses(IloNumVar[] var,
int start,
int num)
Returns basis status of consecutive variables.
|
double |
getBestObjValue()
Accesses the currently best known bound
of all the remaining open nodes in a branch-and-cut tree.
|
void |
getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix)
Computes and returns sensitivity analysis for the
bounds of all variables in the specified LP matrix.
|
void |
getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix,
int start,
int num)
Computes and returns sensitivity analysis for the
bounds of
num consecutive variables, starting from
the index specified by start,
in the specified LP matrix. |
void |
getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloNumVar[] var)
Computes and returns sensitivity analysis for the bounds of
the variables in the array
vars. |
void |
getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloNumVar[] var,
int start,
int num)
Computes and returns sensitivity analysis for the bounds of the
num consecutive variables, starting from the index
specified by start, in the array var. |
IloCplex.ConflictStatus |
getConflict(IloConstraint ct)
Accesses a conflict previously computed by the method
refineConflict and returns the conflict status for the
constraint ct. |
IloCplex.ConflictStatus[] |
getConflict(IloConstraint[] cts)
Accesses the constraints of a conflict previously computed by the method
refineConflict and returns the status of the constraints
in the array cts. |
IloCplex.ConflictStatus[] |
getConflict(IloConstraint[] cts,
int start,
int num)
Accesses a conflict (or a subset of a conflict)
previously computed by the method
refineConflict and returns the conflict status
of num consecutive constraints in the
array cts. |
IloCplex.CplexStatus |
getCplexStatus()
Returns the status of the
IloCplex algorithm. |
IloCplex.CplexStatus |
getCplexSubStatus()
Returns the
IloCplex.CplexStatus
status of the last node problem solved. |
double |
getCplexTime()
Returns a time stamp.
|
double |
getCutoff()
Returns the cutoff for the objective value
when nodes are being solved during
branch-and-cut search.
|
boolean |
getDefault(IloCplex.BooleanParam which)
Returns the default value of a Boolean parameter.
|
double |
getDefault(IloCplex.DoubleParam which)
Returns the default value of a double parameter.
|
int |
getDefault(IloCplex.IntParam which)
Returns the default value of an integer parameter.
|
long |
getDefault(IloCplex.LongParam which)
Returns the default value of an integer parameter.
|
java.lang.String |
getDefault(IloCplex.StringParam which)
Returns the default value of a string parameter.
|
double |
getDefaultValue(IloCplex.DoubleAnnotation annotation)
Gets the default value for an annotation.
|
long |
getDefaultValue(IloCplex.LongAnnotation annotation)
Gets the default value for an annotation.
|
IloCplex.DeleteMode |
getDeleteMode()
Returns the current delete mode of the invoking
IloCplex
object. |
double |
getDetTime()
This method returns a deterministic time stamp in ticks.
|
IloCplex.BranchDirection |
getDirection(IloNumVar var)
Returns the branch direction for a variable.
|
IloCplex.BranchDirection[] |
getDirections(IloNumVar[] var)
Returns the branch directions for an array of variables.
|
IloCplex.BranchDirection[] |
getDirections(IloNumVar[] var,
int start,
int num)
Returns branch directions for
num consecutive
variables, starting from the index specified by var[start]. |
IloCopyable |
getDiverging()
Returns the diverging variable or constraint from a model
found infeasible by the primal simplex algorithm.
|
double |
getDiversityFilterLowerCutoff(IloCplex.FilterIndex i)
Accesses the lower cutoff of a diversity filter, specified
by its index.
|
double[] |
getDiversityFilterRefVals(IloCplex.FilterIndex i)
Accesses the reference values of a diversity filter, specified
by its index.
|
double |
getDiversityFilterUpperCutoff(IloCplex.FilterIndex i)
Accesses the upper cutoff of a diversity filter, specified
by its index.
|
double[] |
getDiversityFilterWeights(IloCplex.FilterIndex i)
Accesses the weights of a diversity filter, specified
by its index.
|
double |
getDual(IloRange rng)
Returns the dual solution value for a constraint.
|
double[] |
getDuals(IloLPMatrix matrix)
Returns the dual solution vector for the constraints
corresponding to the rows of an LP matrix.
|
double[] |
getDuals(IloLPMatrix matrix,
int start,
int num)
Returns dual solution values for the constraints corresponding to
a range of
num rows of an LP matrix. |
double[] |
getDuals(IloRange[] rng)
Returns dual solution values for an array of range constraints.
|
double[] |
getDuals(IloRange[] rng,
int start,
int num)
Returns dual solution values for
num
consecutive range constraints, starting from
the index specified by start. |
IloCplex.FilterIndex |
getFilterIndex(java.lang.String s)
Accesses the index of the filter specified by the name.
|
int |
getFilterType(IloCplex.FilterIndex i)
Accesses the type of the filter specified by its index.
|
IloNumVar[] |
getFilterVars(IloCplex.FilterIndex i)
Accesses the variables of a diversity filter, specified
by its index.
|
int |
getIncumbentNode()
Returns the node number where the current incumbent was found.
|
long |
getIncumbentNode64()
Returns the node number where the current incumbent was found.
|
double[] |
getInfeasibilities(IloConstraint[] con)
Returns infeasibility values for an array of constraints.
|
double[] |
getInfeasibilities(IloConstraint[] con,
int start,
int num)
Returns infeasibility values for
num consecutive constraints,
starting from the index specified by start, from
an array con of constraints. |
double[] |
getInfeasibilities(IloLPMatrix matrix)
Returns infeasibility values for the constraints corresponding to the
rows of an LP matrix.
|
double[] |
getInfeasibilities(IloLPMatrix matrix,
int start,
int num)
Returns infeasibility values for the constraints
corresponding to a range of
num
rows of LP matrix, starting from the row specified by
start. |
double[] |
getInfeasibilities(IloNumVar[] var)
Returns infeasibility values for an array of variables.
|
double[] |
getInfeasibilities(IloNumVar[] var,
int start,
int num)
Returns infeasibility values for
num consecutive variables,
starting from the index specified by start. |
double |
getInfeasibility(IloConstraint con)
Returns the infeasibility value for a constraint.
|
double |
getInfeasibility(IloNumVar ivar)
Returns the infeasibility for a variable.
|
double |
getMax(IloCplex.DoubleParam which)
Returns the maximum allowed value for a double parameter.
|
int |
getMax(IloCplex.IntParam which)
Returns the maximum value allowed for an integer parameter.
|
long |
getMax(IloCplex.LongParam which)
Returns the maximum value allowed for an integer parameter.
|
double |
getMin(IloCplex.DoubleParam which)
Returns the minimum value allowed for a double parameter.
|
int |
getMin(IloCplex.IntParam which)
Returns the minimum value allowed for an integer parameter.
|
long |
getMin(IloCplex.LongParam which)
Returns the minimum value allowed for an integer parameter.
|
double |
getMIPRelativeGap()
Accesses the relative objective gap for a MIP optimization.
|
IloCplex.MIPStartEffort |
getMIPStart(int mipstartindex)
Returns the level of effort associated with a MIP start, identified
by its index among all the MIP starts associated with the current
problem.
|
IloCplex.MIPStartEffort |
getMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values)
Returns the level of effort associated with
a MIP start, identified by its index and
defined by an array of numeric variables
and an array of corresponding values.
|
IloCplex.MIPStartEffort |
getMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values,
boolean[] isset)
Returns the level of effort associated with the MIP start
identified by its index, defined by two arrays of
variables and the corresponding values.
|
IloCplex.MIPStartEffort |
getMIPStart(int mipstartindex,
IloNumVar[] vars,
int begin,
int num,
double[] values)
Returns the level of effort associated with
a MIP start, identified by its index and
defined by a range of numeric variables
and corresponding values.
|
IloCplex.MIPStartEffort |
getMIPStart(int mipstartindex,
IloNumVar[] vars,
int begin,
int num,
double[] values,
boolean[] isset)
Returns the level of effort associated with the MIP start
identified by its index, defined by a range of pairs of
variable and the corresponding value from two arrays.
|
int |
getMIPStartIndex(java.lang.String name)
Returns the index of the MIP start specified by its name.
|
java.lang.String |
getMIPStartName(int mipstartindex)
Returns the name of the MIP start specified by its index.
|
int |
getMultiObjInfo(IloCplex.MultiObjIntInfo what,
int subprob)
This method returns the requested integer valued solution info
of a subproblem of a multiobjective optimization.
|
long |
getMultiObjInfo(IloCplex.MultiObjLongInfo what,
int subprob)
This method returns the requested long integer valued solution info
of a subproblem of a multiobjective optimization.
|
double |
getMultiObjInfo(IloCplex.MultiObjNumInfo what,
int subprob)
This method returns the requested floating point valued solution info
of a subproblem of a multiobjective optimization.
|
int |
getMultiObjNsolves()
This method returns the number of subproblems that were successfully
solved during the last optimization of a multiobjective problem.
|
IloCplex.CplexStatus |
getMultiObjSubCplexStatus(int subprob)
Get the CPLEX solution status of a multi-objective sub solve.
|
IloCplex.Status |
getMultiObjSubStatus(int subprob)
Get the solution status of a multi-objective sub solve.
|
int |
getNbarrierIterations()
Returns the number of barrier iterations from the last solve.
|
long |
getNbarrierIterations64()
Returns the number of barrier iterations from the last solve.
|
int |
getNbinVars()
Returns the number of binary (or Boolean) variables in the matrix
representation of the active model.
|
int |
getNcols()
Returns the number of columns in the matrix representation of the
active model.
|
int |
getNcrossDExch()
Returns the number of dual exchange operations in the crossover of the
last solve.
|
long |
getNcrossDExch64()
Returns the number of dual exchange operations in the crossover of the
last solve.
|
int |
getNcrossDPush()
Returns the number of dual push operations in the crossover of the
last solve.
|
long |
getNcrossDPush64()
Returns the number of dual push operations in the crossover of the
last solve.
|
int |
getNcrossPExch()
Returns the number of primal exchange operations in the crossover of the
last solve.
|
long |
getNcrossPExch64()
Returns the number of primal exchange operations in the crossover of the
last solve.
|
int |
getNcrossPPush()
Returns the number of primal push operations in the crossover of the
last solve.
|
long |
getNcrossPPush64()
Returns the number of primal push operations in the crossover of the
last solve.
|
int |
getNcuts(int which)
Returns the number of cuts of the specified type in use at
the end of the previous mixed integer optimization.
|
int |
getNdualSuperbasics()
Returns the number of dual superbasic variables in the basis.
|
int |
getNfilters()
Returns the number of filters associated with the solution pool.
|
int |
getNindicators()
Returns the number of indicator constraints in the active model.
|
int |
getNintVars()
Returns the number of integer variables in the matrix representation of
the active model.
|
int |
getNiterations()
Returns the number of iterations from the last solve.
|
long |
getNiterations64()
Returns the number of iterations from the last solve.
|
int |
getNLCs()
Returns the number of lazy constraints that have been added to the
invoking
IloCplex object with the methods
addLazyConstraint and addLazyConstraints. |
int |
getNMIPStarts()
Returns the number of MIP starts associated with the current problem.
|
int |
getNnodes()
Returns the number of branch-and-cut nodes explored in solving
the active model.
|
long |
getNnodes64()
Returns the number of branch-and-cut nodes explored in solving
the active model.
|
int |
getNnodesLeft()
Returns the number of unexplored nodes in the branch-and-cut tree.
|
long |
getNnodesLeft64()
Returns the number of unexplored nodes in the branch-and-cut tree.
|
int |
getNNZs()
Returns the number of nonzero elements in the matrix representation of the
active model.
|
int |
getNphaseOneIterations()
Returns the number of phase I simplex iterations from the last solve.
|
long |
getNphaseOneIterations64()
Returns the number of phase I simplex iterations from the last solve.
|
int |
getNprimalSuperbasics()
Returns the number of primal superbasic variables in the basis.
|
int |
getNQCs()
Returns the number of quadratic constraints in the active
model.
|
int |
getNrows()
Returns the number of rows of the matrix representation of the active
model.
|
int |
getNsemiContVars()
Returns the number of semicontinuous variables in the matrix
representation of the active model.
|
int |
getNsemiIntVars()
Returns the number of semi-integer variables in the matrix representation
of the active model.
|
int |
getNsiftingIterations()
Returns the number of sifting iterations from the last solve.
|
long |
getNsiftingIterations64()
Returns the number of sifting iterations from the last solve.
|
int |
getNsiftingPhaseOneIterations()
Returns the number of sifting phase I iterations from the last solve.
|
long |
getNsiftingPhaseOneIterations64()
Returns the number of sifting phase I iterations from the last solve.
|
int |
getNSOS1()
Returns the number of SOSs of type 1 in the active model.
|
int |
getNSOS2()
Returns the number of SOSs of type 2 in the active model.
|
int |
getNSOSs()
Returns the number of SOSs of both types, 1 and 2, in the
active model.
|
int |
getNUCs()
Returns the number of user cuts that have been added to the
invoking
IloCplex object with the methods
addUserCut and addUserCuts. |
int |
getNumCores()
Returns the number of logical cores.
|
int |
getNumDoubleAnnotations()
Gets the number of
LongAnnotations. |
int |
getNumLongAnnotations()
Gets the number of
LongAnnotations. |
void |
getObjSA(double[] lower,
double[] upper,
IloLPMatrix matrix)
Computes and returns sensitivity analysis for objective
coefficients of the variables corresponding to the columns of the
specified LP matrix.
|
void |
getObjSA(double[] lower,
double[] upper,
IloLPMatrix matrix,
int start,
int num)
Computes and returns sensitivity analysis for objective
coefficients of the variables corresponding to a range of
num consecutive columns of the specified LP matrix. |
void |
getObjSA(double[] lower,
double[] upper,
IloNumVar[] var)
Computes and returns sensitivity analysis for objective
coefficients for an array of variables.
|
void |
getObjSA(double[] lower,
double[] upper,
IloNumVar[] var,
int start,
int num)
Computes and returns sensitivity analysis for objective
coefficients for
num consecutive variables, starting
at the index specified by start. |
double |
getObjValue()
Returns the objective value of the current solution.
|
double |
getObjValue(int soln)
Returns the objective value of a solution in the solution pool.
|
boolean |
getParam(IloCplex.BooleanParam which)
Returns the current value of a Boolean parameter.
|
double |
getParam(IloCplex.DoubleParam which)
Returns the current value of a double parameter.
|
int |
getParam(IloCplex.IntParam which)
Returns the current value of an integer parameter.
|
long |
getParam(IloCplex.LongParam which)
Returns the current value of an integer parameter.
|
java.lang.String |
getParam(IloCplex.StringParam which)
Returns the current value of a string parameter.
|
IloCplex.ParameterSet |
getParameterSet()
Returns a parameter set showing parameters that have been changed
from their default state.
|
int[] |
getPriorities(IloNumVar[] var)
Returns branch priorities for an array of variables.
|
int[] |
getPriorities(IloNumVar[] var,
int start,
int num)
Returns branch priorities for
num consecutive variables,
starting from the index specified by start. |
int |
getPriority(IloNumVar var)
Returns the branch priority for a variable.
|
IloLinearNumExpr |
getQCDSlack(IloRange rng)
Returns the dual slack vector of a quadratic constraint in a
quadratically constrained program (QCP).
|
IloCplex.Quality |
getQuality(IloCplex.QualityType which)
Returns an instance of
IloCplex.Quality that contains
the requested quality measure. |
IloCplex.Quality |
getQuality(IloCplex.QualityType which,
int soln)
Returns an instance of
IloCplex.Quality that contains
the requested quality measure for a solution in the solution pool. |
double[] |
getRangeFilterCoefs(IloCplex.FilterIndex i)
Accesses the coefficients of the range filter specified by
its index.
|
double |
getRangeFilterLowerBound(IloCplex.FilterIndex i)
Accesses the lower bound of the range filter specified by
its index.
|
double |
getRangeFilterUpperBound(IloCplex.FilterIndex i)
Accesses the upper bound of the range filter specified by
its index.
|
void |
getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix)
Computes and returns sensitivity analysis for the constraints
corresponding to the rows of the LP matrix
matrix. |
void |
getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix,
int start,
int num)
Computes and returns sensitivity analysis for the constraints
corresponding to
num rows of the LP matrix
matrix starting with row start. |
void |
getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloRange[] rng)
Computes and returns sensitivity analysis for the
bounds of the range constraints in the array
rng. |
void |
getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloRange[] rng,
int start,
int num)
Computes and returns sensitivity analysis for the bounds of
num consecutive range constraints in the array
rng, starting with the index specified by
rng[start]. |
IloLinearNumExpr |
getRay()
Returns a linear expression of the unbounded direction of a
model proven unbounded by a simplex method.
|
double |
getReducedCost(IloNumVar ivar)
Returns the reduced cost for a variable.
|
double[] |
getReducedCosts(IloLPMatrix matrix)
Returns reduced costs for the variables corresponding to the
columns of an LP matrix.
|
double[] |
getReducedCosts(IloLPMatrix matrix,
int start,
int num)
Returns reduced costs for the variables
corresponding to a range of
num
columns of LP matrix, starting from the column specified by
start. |
double[] |
getReducedCosts(IloNumVar[] var)
Returns reduced costs for an array of variables.
|
double[] |
getReducedCosts(IloNumVar[] var,
int start,
int num)
Returns reduced costs for
num consecutive variables,
starting from the index specified by start. |
void |
getRHSSA(double[] lower,
double[] upper,
IloLPMatrix matrix)
Computes and returns sensitivity analysis for
righthand side (RHS) values of
the constraints corresponding to the rows of an LP matrix.
|
void |
getRHSSA(double[] lower,
double[] upper,
IloLPMatrix matrix,
int start,
int num)
Computes and returns sensitivity analysis for
the righthand side (RHS) values of
num
constraints, corresponding to a range of rows of an LP matrix,
starting from the index specified by start. |
void |
getRHSSA(double[] lower,
double[] upper,
IloRange[] rng)
Computes and returns sensitivity analysis for
the righthand side (RHS) values of a range of constraints.
|
void |
getRHSSA(double[] lower,
double[] upper,
IloRange[] rng,
int start,
int num)
Computes and returns sensitivity analysis for
the righthand side (RHS) values of
num
constraints, starting from the index specified by start. |
double |
getSlack(IloRange rng)
Returns the slack value for a range constraint.
|
double |
getSlack(IloRange rng,
int soln)
Returns a slack value from the solution pool for a range constraint.
|
double[] |
getSlacks(IloLPMatrix matrix)
Returns slack values for the constraints corresponding to the
rows of an LP matrix.
|
double[] |
getSlacks(IloLPMatrix matrix,
int soln)
Returns slack values from the solution pool for the constraints
corresponding to the rows of an LP matrix.
|
double[] |
getSlacks(IloLPMatrix matrix,
int start,
int num)
Returns slack values for a range of
num consecutive rows,
starting from the index specified by start, of an LP matrix. |
double[] |
getSlacks(IloLPMatrix matrix,
int start,
int num,
int soln)
Returns slack values from the solution pool
for a range of
num consecutive rows,
starting from the index specified by start, of an LP matrix. |
double[] |
getSlacks(IloRange[] rng)
Returns slack values for an array of range constraints.
|
double[] |
getSlacks(IloRange[] rng,
int soln)
Returns slack values from the solution pool for an array of
range constraints.
|
double[] |
getSlacks(IloRange[] rng,
int start,
int num)
Returns slack values for
num consecutive constraints,
starting from the index specified by start, from
an array rng. |
double[] |
getSlacks(IloRange[] rng,
int start,
int num,
int soln)
Returns slack values from the solution pool
for
num consecutive constraints,
starting from the index specified by start, from
an array rng. |
double |
getSolnPoolMeanObjValue()
Returns the mean objective value of the solution pool.
|
int |
getSolnPoolNreplaced()
Returns the number of replaced solutions.
|
int |
getSolnPoolNsolns()
Returns the number of solutions in the solution pool.
|
IloCplex.Status |
getStatus()
Returns the solution status of the active model.
|
int |
getSubAlgorithm()
Returns the type of the algorithm that was used to generate the solution
of the last branch-and-cut node solved during a MIP solve
terminated because of an error during mixed integer optimization.
|
double |
getValue(IloNumExpr expr)
Returns the value that
expr takes for the current solution. |
double |
getValue(IloNumExpr expr,
int soln)
Returns the value that
expr takes for a solution in the
solution pool. |
double |
getValue(IloNumVar var)
Returns the solution value for a variable.
|
double |
getValue(IloNumVar var,
int soln)
Returns a solution value from the solution pool for a variable.
|
double[] |
getValues(IloLPMatrix matrix)
Returns the solution vector for the columns of an LP matrix.
|
double[] |
getValues(IloLPMatrix matrix,
int soln)
Returns a solution vector from the solution pool for the columns
of an LP matrix.
|
double[] |
getValues(IloLPMatrix matrix,
int start,
int num)
Returns the solution vector for a range of
num
columns of an LP matrix, starting at the index specified by
start. |
double[] |
getValues(IloLPMatrix matrix,
int start,
int num,
int soln)
Returns a solution vector from the solution pool for a
range of
num
columns of an LP matrix, starting at the index specified by
start. |
double[] |
getValues(IloNumVar[] var)
Returns solution values for an array of variables.
|
double[] |
getValues(IloNumVar[] var,
int soln)
Returns solution values from the solution pool for an array of variables.
|
double[] |
getValues(IloNumVar[] var,
int start,
int num)
Returns solution values for a set of variables.
|
double[] |
getValues(IloNumVar[] var,
int start,
int num,
int soln)
Returns solution values from the solution pool for a set of variables.
|
java.lang.String |
getVersion()
Returns a string that reports the version of CPLEX.
|
int |
getVersionNumber()
Returns a number that reports the version of CPLEX.
|
IloCplex.Goal |
globalCutGoal(IloConstraint cut)
Creates and returns a global cut goal for the constraint
cut. |
IloCplex.Goal |
globalCutGoal(IloConstraint[] cut)
Creates and returns a global cut goal for the constraints
specified in the array
cut. |
boolean |
hasDoubleAnnotation(java.lang.String name)
Tests whether a
DoubleAnnotation with the specified name exists. |
boolean |
hasLongAnnotation(java.lang.String name)
Tests whether a
LongAnnotation with the specified name exists. |
void |
importModel(java.lang.String name)
Reads a model from the file specified by
name
into the active model. |
boolean |
isDualFeasible()
Returns
true if a dual feasible solution is available. |
boolean |
isMIP()
Returns
true if the active model is a MIP. |
boolean |
isPrimalFeasible()
Returns
true if a primal feasible solution is available. |
boolean |
isQC()
Returns
true if the active model has quadratic
constraints. |
boolean |
isQO()
Returns
true if the active model has a quadratic objective
function. |
IloCplex.Goal |
leGoal(double lhs,
IloNumExpr expr)
Creates a constraint goal for the constraint
lhs >= expr. |
IloCplex.Goal |
leGoal(IloNumExpr expr,
double rhs)
Creates a constraint goal for the constraint
expr <= rhs. |
IloCplex.Goal |
leGoal(IloNumExpr expr1,
IloNumExpr expr2)
Creates a constraint goal for the constraint
expr1 <= expr2. |
IloCplex.Goal |
limitSearch(IloCplex.Goal goal,
IloCplex.SearchLimit limit)
Returns a goal to limit a search tree.
|
IloNumVarBound |
lowerBound(IloNumVar var)
Creates and returns an object of type
IloNumVarBound
to represent the lower bound of the variable var. |
static IloCplex.Status |
makeStatus(int status,
boolean pfeas,
boolean dfeas)
Convert a CPLEX status code into a Concert status code.
|
IloCplex.DoubleAnnotation |
newDoubleAnnotation(java.lang.String name)
Creates a new annotation of type
double. |
IloCplex.DoubleAnnotation |
newDoubleAnnotation(java.lang.String name,
double defval)
Creates a new annotation of type
double. |
IloCplex.LongAnnotation |
newLongAnnotation(java.lang.String name)
Creates a new annotation of type
long. |
IloCplex.LongAnnotation |
newLongAnnotation(java.lang.String name,
long defval)
Creates a new annotation of type
long. |
IloCplex.Goal |
or(IloCplex.Goal goal1,
IloCplex.Goal goal2)
Creates and returns an or-goal from two arguments.
|
IloCplex.Goal |
or(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3)
Creates and returns an or-goal from three arguments.
|
IloCplex.Goal |
or(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4)
Creates and returns an or-goal from four arguments.
|
IloCplex.Goal |
or(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4,
IloCplex.Goal goal5)
Creates and returns an or-goal from five arguments.
|
IloCplex.Goal |
or(IloCplex.Goal goal1,
IloCplex.Goal goal2,
IloCplex.Goal goal3,
IloCplex.Goal goal4,
IloCplex.Goal goal5,
IloCplex.Goal goal6)
Creates and returns an or-goal from six arguments.
|
java.io.PrintStream |
output()
Returns the output stream of the invoking
IloCplex object. |
boolean |
populate()
Generates multiple solutions to a mixed integer programming (MIP) model.
|
void |
protectVariables(IloNumVar[] var)
This method specifies a set of numeric variables that
should not be substituted out of the problem.
|
void |
protectVariables(IloNumVar[] var,
int start,
int num)
This method specifies a set of numeric variables that
should not be substituted out of the problem.
|
void |
qpIndefCertificate(IloNumVar[] var,
double[] x)
Returns a vector proving that the Q matrix of QP is not positive
semi-definite.
|
void |
readAnnotations(java.lang.String filename)
Reads annotations from a file.
|
void |
readBasis(java.lang.String name)
Reads a simplex basis from the BAS file specified by
name,
and copies that basis into the invoking object. |
IloCplex.FilterIndex[] |
readFilters(java.lang.String filename)
Reads filters from a specified file and associates them with
the solution pool.
|
void |
readMIPStarts(java.lang.String name)
Reads the MST file denoted by
name and
copies the MIP start information into the invoking object. |
void |
readOrder(java.lang.String name)
Reads the ORD file specified by
name
and copies the priority order information
into the invoking CPLEX problem object. |
void |
readParam(java.lang.String name)
Reads parameters and their settings from the file specified by
name and applies them to the invoking object. |
IloCplex.ParameterSet |
readParameterSet(java.lang.String filename)
Returns a parameter set containing the parameter names and settings
from the file specified by
filename. |
void |
readSolution(java.lang.String name)
Deprecated.
Since V20.1.0; use
readStartInfo(String) instead. |
void |
readStartInfo(java.lang.String name)
Reads starting information from the SOL file denoted by
name and copies this information into the invoking
object. |
boolean |
refineConflict(IloConstraint[] cons,
double[] prefs)
Refines a conflict from an array of constraints.
|
boolean |
refineConflict(IloConstraint[] cons,
double[] prefs,
int start,
int num)
Refines a conflict consisting of a subset of constraints from an array.
|
boolean |
refineMIPStartConflict(int mipstartindex,
IloConstraint[] cons,
double[] prefs)
Refines a conflict consisting of constraints in the model
inferred from the pairs of variables and values of a MIP start.
|
boolean |
refineMIPStartConflict(int mipstartindex,
IloConstraint[] cons,
double[] prefs,
int start,
int num)
Refines a conflict consisting of a range of constraints from
the model inferred from the pairs of variables and values of a MIP start.
|
void |
remove(IloCplex.Aborter abort)
Removes the specified aborter from the invoking object.
|
void |
remove(IloCplex.Callback cb)
Remove a callback that was previously registered by
use(Callback). |
void |
setAnnotation(IloCplex.DoubleAnnotation annotation,
IloAddable[] items,
double[] values)
Sets the annotation values for an array of objects.
|
void |
setAnnotation(IloCplex.DoubleAnnotation annotation,
IloConstraint con,
double value)
Sets the annotation value for a constraint.
|
void |
setAnnotation(IloCplex.DoubleAnnotation annotation,
IloIntVar var,
double value)
Sets the annotation value for an instance of
IloIntVar. |
void |
setAnnotation(IloCplex.DoubleAnnotation annotation,
IloNumVar var,
double value)
Sets the annotation value for an instance of
IloNumVar. |
void |
setAnnotation(IloCplex.DoubleAnnotation annotation,
IloObjective obj,
double value)
Sets the annotation value for an objective.
|
void |
setAnnotation(IloCplex.LongAnnotation annotation,
IloAddable[] items,
long[] values)
Sets the annotation values for an array of objects.
|
void |
setAnnotation(IloCplex.LongAnnotation annotation,
IloConstraint con,
long value)
Sets the annotation value for a constraint.
|
void |
setAnnotation(IloCplex.LongAnnotation annotation,
IloIntVar var,
long value)
Sets the annotation value for an instance of
IloIntVar. |
void |
setAnnotation(IloCplex.LongAnnotation annotation,
IloNumVar var,
long value)
Sets the annotation value for an instance of
IloNumVar. |
void |
setAnnotation(IloCplex.LongAnnotation annotation,
IloObjective obj,
long value)
Sets the annotation value for an objective.
|
void |
setBasisStatuses(IloNumVar[] var,
IloCplex.BasisStatus[] cstat,
IloRange[] con,
IloCplex.BasisStatus[] rstat)
Sets basis statuses for variables and constraints.
|
void |
setBasisStatuses(IloNumVar[] var,
IloCplex.BasisStatus[] cstat,
int cstart,
int cnum,
IloConstraint[] con,
IloCplex.BasisStatus[] rstat,
int rstart,
int rnum)
Sets basis statuses for consecutive variables (columns)
and constraints (rows).
|
void |
setDefaults()
Resets all parameters to their default values.
|
void |
setDeleteMode(IloCplex.DeleteMode mode)
Sets the delete mode.
|
void |
setDirection(IloNumVar var,
IloCplex.BranchDirection dir)
Sets the branching direction for a variable.
|
void |
setDirections(IloNumVar[] var,
IloCplex.BranchDirection[] brdir)
Sets branching directions for an array of variables.
|
void |
setDirections(IloNumVar[] var,
IloCplex.BranchDirection[] brdir,
int start,
int num)
Sets branching directions for
num consecutive
variables, starting from the index specified by start. |
void |
setModel(IloModel model)
Sets
model as the active model. |
void |
setOut(java.io.OutputStream s)
Sets the default output stream of the invoking
IloCplex
object. |
void |
setParam(IloCplex.BooleanParam which,
boolean val)
Sets a Boolean parameter to the value
val. |
void |
setParam(IloCplex.DoubleParam which,
double val)
Sets the value of a double parameter to
val. |
void |
setParam(IloCplex.IntParam which,
int val)
Sets an integer parameter to value
val. |
void |
setParam(IloCplex.LongParam which,
long val)
Sets an integer parameter to value
val. |
void |
setParam(IloCplex.StringParam which,
java.lang.String val)
Sets a string parameter to value
val. |
void |
setParameterSet(IloCplex.ParameterSet set)
Sets the parameter state using a parameter set.
|
void |
setPriorities(IloNumVar[] var,
int[] pri)
Sets branch priorities for an array of variables.
|
void |
setPriorities(IloNumVar[] var,
int[] pri,
int start,
int num)
Sets branch priorities for
num consecutive variables,
starting from the index specified by start. |
void |
setPriority(IloNumVar var,
int pri)
Sets the branch priority for the variable
var. |
void |
setStart(double[] x,
double[] dj,
IloNumVar[] var,
double[] slack,
double[] pi,
IloRange[] rng)
Specifies a starting point for the next invocation of the method
solve. |
void |
setStart(double[] x,
double[] dj,
IloNumVar[] var,
int vstart,
int vnum,
double[] slack,
double[] pi,
IloRange[] rng,
int rstart,
int rnum)
Specifies a partial starting point for the next invocation of
the method
solve. |
void |
setWarning(java.io.OutputStream s)
Sets the warning stream of the invoking
IloCplex object. |
IloCplex.Goal |
solutionGoal(IloNumVar[] vars,
double[] vals)
Creates and returns a solution goal.
|
boolean |
solve()
Solves the active model.
|
boolean |
solve(IloCplex.Goal goal)
Solves the active MIP model using the search
strategy defined by the specified goal.
|
boolean |
solve(IloCplex.ParameterSet[] paramsets)
Solves the active multi-objective model.
|
boolean |
solveFixed()
Solves the fixed active model.
|
boolean |
solveFixed(int soln)
Solves the fixed active model using a solution from the solution pool.
|
IloCplexMultiCriterionExpr |
staticLex(IloNumExpr[] criteria)
This function defines a multi-criterion expression for lexicographic ordering.
|
IloCplexMultiCriterionExpr |
staticLex(IloNumExpr[] criteria,
double[] weightArray,
int[] priorityArray,
double[] absTolArray,
double[] relTolArray,
java.lang.String name)
This function defines a multi-criterion expression for lexicographic ordering.
|
IloCplexMultiCriterionExpr |
staticLex(IloNumExpr[] criteria,
java.lang.String name)
This function defines a multi-criterion expression for lexicographic ordering.
|
int |
tuneParam()
Tunes the parameters for improved optimizer performance
on the current model.
|
int |
tuneParam(IloCplex.ParameterSet fixedset)
Tunes the parameters for improved optimizer performance
on the current model while leaving some parameters unchanged.
|
int |
tuneParam(java.lang.String[] filenames)
Tunes the parameters for improved optimizer performance
on a set of models.
|
int |
tuneParam(java.lang.String[] filenames,
IloCplex.ParameterSet fixedset)
Tunes the parameters for improved optimizer performance
on a set of models while leaving some parameters unchanged.
|
IloNumVarBound |
upperBound(IloNumVar var)
Creates and returns an object of type
IloNumVarBound
to represent the upper bound of variable var. |
IloCplex.Aborter |
use(IloCplex.Aborter abort)
Instructs the invoking
object to use the aborter to control termination
of its solving and tuning methods.
|
void |
use(IloCplex.Callback.Function callback,
long contextMask)
Register or clear a callback to be invoked by CPLEX during optimization.
|
void |
use(IloCplex.Callback cb)
Installs a user-written callback.
|
void |
use(IloModelingAssistance.Callback callback)
Register or clear a modeling assistance callback.
|
java.io.PrintStream |
warning()
Returns the warning output stream of the invoking
IloCplex
object. |
void |
writeAnnotations(java.lang.String filename)
Writes all annotations to a file.
|
void |
writeBasis(java.lang.String name)
Writes the current simplex basis to the file specified by
name. |
void |
writeBendersAnnotation(java.lang.String filename)
Writes the annotation of the decompostion CPLEX automatically generates
for the model of the CPLEX problem object to the specified file.
|
void |
writeConflict(java.lang.String name)
Writes a conflict file with the specified
name. |
void |
writeFilters(java.lang.String filename)
Writes the filters associated with the solution pool to
the specified file.
|
void |
writeMIPStarts(java.lang.String name)
Writes all MIP starts to a named file.
|
void |
writeMIPStarts(java.lang.String name,
int first,
int num)
Writes designated MIP starts, starting with the one at the
designated index, and continuing to the specified number of
MIP starts, to the file specified by name
with the specified degree of information.
|
void |
writeOrder(java.lang.String name)
Writes a priority order file with the specified
name. |
void |
writeParam(java.lang.String name)
Writes the parameter name and its current setting
into the file specified by
name for all the
CPLEX parameters that are not currently
set at their default. |
void |
writeParameterSet(IloCplex.ParameterSet set,
java.lang.String filename)
Writes the parameter set into the file specified by
filename. |
void |
writeSolution(java.lang.String name)
Writes solution information of the incumbent solution
in SOL format to the file specified by
name. |
void |
writeSolution(java.lang.String name,
int soln)
Writes solution information from the solution pool
in SOL format to the file specified by
name. |
void |
writeSolutions(java.lang.String name)
Writes solution information for all solutions in the solution pool
in SOL format to the file specified by
name. |
abs, abs, add, add, add, addEq, addEq, addEq, addEq, addEq, addEq, addGe, addGe, addGe, addGe, addGe, addGe, addLe, addLe, addLe, addLe, addLe, addLe, addLPMatrix, addLPMatrix, addMaximize, addMaximize, addMaximize, addMaximize, addMinimize, addMinimize, addMinimize, addMinimize, addObjective, addObjective, addObjective, addObjective, addRange, addRange, addRange, addRange, addSOS1, addSOS1, addSOS1, addSOS1, addSOS2, addSOS2, addSOS2, addSOS2, addToExpr, addToExpr, and, and, and, and, and, and, and, boolVar, boolVar, boolVar, boolVar, boolVarArray, boolVarArray, boolVarArray, boolVarArray, column, column, column, column, column, columnArray, columnArray, columnArray, columnArray, columnArray, columnArray, constant, constant, conversion, conversion, conversion, conversion, conversion, conversion, conversionIterator, delete, delete, delete, diff, diff, diff, diff, diff, diff, eq, eq, eq, eq, eq, eq, ge, ge, ge, ge, ge, ge, getModel, getName, getObjective, ifThen, ifThen, intExpr, intVar, intVar, intVar, intVar, intVarArray, intVarArray, intVarArray, intVarArray, intVarArray, intVarArray, intVarArray, intVarArray, iterator, le, le, le, le, le, le, linearIntExpr, linearIntExpr, linearNumExpr, linearNumExpr, LPMatrix, LPMatrix, LPMatrixIterator, lqIntExpr, lqNumExpr, max, max, max, max, max, max, max, max, maximize, maximize, maximize, maximize, maximize, maximize, min, min, min, min, min, min, min, min, minimize, minimize, minimize, minimize, minimize, minimize, negative, negative, not, not, numExpr, numVar, numVar, numVar, numVar, numVar, numVar, numVar, numVar, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, numVarArray, objective, objective, objective, objective, or, or, or, or, or, or, or, piecewiseLinear, piecewiseLinear, piecewiseLinear, piecewiseLinear, prod, prod, prod, prod, prod, prod, prod, prod, prod, quadIntExpr, quadNumExpr, range, range, range, range, rangeIterator, remove, remove, remove, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, scalProd, semiContVar, semiContVar, semiContVar, semiContVar, semiContVarArray, semiContVarArray, semiContVarArray, semiContVarArray, semiContVarArray, semiContVarArray, semiContVarArray, semiContVarArray, setLinearCoef, setLinearCoef, setLinearCoef, setLinearCoef, setLinearCoefs, setLinearCoefs, setLinearCoefs, setLinearCoefs, setLinearCoefs, setLinearCoefs, setLinearCoefs, setLinearCoefs, setName, setQuadCoef, setQuadCoef, SOS1, SOS1, SOS1, SOS1, SOS1iterator, SOS2, SOS2, SOS2, SOS2, SOS2iterator, square, square, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, toStringpublic static final int IncumbentId
public static final java.lang.String CPX_BENDERS_ANNOTATION
public static final int CPX_BENDERS_MASTERVALUE
public IloCplex()
throws IloException
IloCplex
with an empty active model.IloExceptionpublic void setModel(IloModel model) throws IloException
model as the active model.setModel in interface IloMPModelersetModel in class IloCplexModelerIloExceptionpublic void deleteNames()
throws IloException
IloExceptionpublic IloRange addUserCut(IloRange cut) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method adds cut as a user cut to the
invoking IloCplex
object. Unlike regular constraints that are added to the model, user
cuts are by default left out of the optimization until they are violated.
It is only after a node solution violates a user cut that the cut is added
to the relaxation and will be used from then on. Unlike lazy
constraints, user cuts must not reduce the feasible region of the
problem; they can only strengthen the relaxation; otherwise,
incorrect solutions can result.
When columns are deleted from the active model, all user cuts are
deleted as well and need to be added again if they should be considered.
Use clearUserCuts to remove all user cuts from
the invoking IloCplex object.
If you do not know what type your cut is, use the method
addCut rather than this method.
IloExceptioncut - The user cut to be added. The cut must be linear.public IloRange[] addUserCuts(IloRange[] cuts) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method adds the constraints in cuts
as user cuts to the
the invoking IloCplex object. The constraint
cut is copied into the user cut pool; the object
cut itself is not part of the pool, so changes
to it after it has been copied into the user cut pool will not
affect the user cut pool.
Unlike regular constraints that are added to the model, user cuts are by default left out of the optimization until they are violated. It is only after a node solution violates a user cut that the cut is added to the relaxation and will be used from then on. Unlike lazy constraints, user cuts must not reduce the feasible region of the problem; they can only strengthen the relaxation; otherwise, incorrect solutions can result.
When columns are deleted from the active model, all user cuts are
deleted as well and need to be added again if they should be considered.
Otherwise, use clearUserCuts to remove all user cuts from
the invoking IloCplex object.
If you do not know what type your cuts are, use the method
addCuts rather than this method.
IloExceptioncuts - An array of user cuts to be added. All cuts must be
linear.public IloRange[] addUserCuts(IloRange[] cuts, int start, int num) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method adds the constraints in cuts
as user cuts to the
the invoking IloCplex object. The constraints in the array
cuts are copied into the user cut pool; the objects in the
array cut themselves are not part of the pool, so changes
to them after they have been copied into the user cut pool will not
affect the user cut pool.
Unlike regular constraints that are added to the model, user cuts are by default left out of the optimization until they are violated. It is only after a node solution violates a user cut that the cut is added to the relaxation and will be used from then on. Unlike lazy constraints, user cuts must not reduce the feasible region of the problem; they can only strengthen the relaxation; otherwise, incorrect solutions can result.
When columns are deleted from the active model, all user cuts are
deleted as well and need to be added again if they should be considered.
Otherwise, use clearUserCuts to remove all user cuts from
the invoking IloCplex object.
IloExceptioncuts - An array of user cuts to be added. All cuts must be
linear.start - The first element in cuts to be added as
a user cut.num - The number of consecutive elements
in cuts to be added as a user cut.cuts containing the user cuts
that have been added.public void clearUserCuts()
throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method deletes user cuts. It
deletes all user cuts that have previously been
added to the invoking IloCplex object with the methods
addUserCut or addUserCuts.
IloExceptionpublic IloRange addLazyConstraint(IloRange cut) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method adds cut as a lazy constraint to the invoking
IloCplex object. The constraint cut is copied
into the lazy constraint pool; the cut itself is not part
of the pool, so changes to cut after it has been copied into
the lazy constraint pool will not affect the lazy constraint pool.
Lazy constraints added with addLazyConstraint are typically
constraints of the model that are not expected to be violated when left
out. The idea is that the LPs that are solved when
the MIP is being solved
can be kept smaller when these constraints are not included.
IloCplex will, however, include a lazy constraint in the LP
as soon as the constraint is violated. In other words, the solution
computed by IloCplex makes sure that all the lazy constraints
that have been added are satisfied.
By contrast, if the constraint does not change the feasible region of the
active model but only strengthens the formulation, it is referred to
as a user cut. User cuts can be added to
IloCplex by addLazyConstraint, but it is
generally preferable to do so with addUserCuts. It is an
error, however, to add lazy constraints by means
of addUserCuts.
When columns are deleted from the active model, all lazy constraints
are deleted as well and need to be recopied into the lazy constraint
pool. Otherwise, use clearLazyConstraints to clear the
list of lazy constraints.
IloExceptioncut - The constraint to be added as a lazy constraint. The
constraint must be linear.public IloRange[] addLazyConstraints(IloRange[] cut) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method adds the constraints given in cut
to the list of lazy constraints.
The constraints are copied into the lazy constraint pool; the constraints
themselves do not become part of the pool, so changes to them
after they have been copied into the lazy constraint pool will not affect
the lazy constraint pool.
Lazy constraints added with addLazyConstraints are typically
constraints of the model that are not expected to be violated when left
out. The idea is that the LPs that are solved when
the MIP is being solved
can be kept smaller when these constraints are not included.
IloCplex will, however, include a lazy constraint in the LP
as soon as the constraint is violated. In other words, the solution
computed by IloCplex makes sure that all the lazy constraints
that have been added are satisfied.
By contrast, if the constraint does not change the feasible region of the
active model but only strengthens the formulation, it is referred to
as a user cut. User cuts can be added to
IloCplex by addLazyConstraint, but it is
generally preferable to do so with addUserCuts. It is an
error, however, to add lazy constraints by means of
addUserCuts.
When columns are deleted from the active model, all lazy constraints
are deleted as well and need to be recopied into the lazy constraint
pool. Otherwise, use clearLazyConstraints to clear the
list of lazy constraints.
IloExceptioncut - The array of constraints to be added as lazy constraints.
All constraints must be linear.public IloRange[] addLazyConstraints(IloRange[] cut, int start, int num) throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method copies constraints into the lazy constraints pool.
num constraints in the array cut are copied
into the lazy constraint pool, starting
with element at the index start.
The constraints themselves do not become part of the pool, so changes to
them after they have been copied into the lazy constraint pool will not
affect the lazy constraint pool.
Lazy constraints added with addLazyConstraints are typically
constraints of the model that are not expected to be violated when left
out. The idea is that the LPs that are solved when
the MIP is being solved
can be kept smaller when these constraints are not included.
IloCplex will, however, include a lazy constraint in the LP
as soon as the constraint is violated. In other words, the solution
computed by IloCplex makes sure that all the lazy constraints
that have been added are satisfied.
By contrast, if the constraint does not change the feasible region of the
active model but only strengthens the formulation, it is referred to
as a user cut. User cuts can be added to
IloCplex by addLazyConstraint, but it is
generally preferable to do so with addUserCuts. It is an
error, however, to add lazy constraints by means of
addUserCuts.
When columns are deleted from the active model, all lazy constraints
are deleted as well and need to be recopied into the lazy constraint
pool. Otherwise, use clearLazyConstraints to clear the
list of lazy constraints.
IloExceptioncut - An array of constraints to be added as lazy
constraints. All constraints must be linear.start - The index of the first element in cut to
be added as a lazy constraint.num - The number of consecutive constraints
in cut to
be added as lazy constraints.cut.public void clearLazyConstraints()
throws IloException
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method removes all lazy constraints
that have been added to the invoking
IloCplex object with the methods
addLazyConstraint and addLazyConstraints.
IloExceptionpublic IloRange addCut(IloRange cut) throws IloException
cut as a cut to the invoking
IloCplex object.
The added cut does not become part of the model;
it is only copied when the method addCut is invoked. Thus,
cut may be deleted or modified after addCut has
been called, and the change will not affect the invoking
IloCplex object. You can and probably should call
cut.end after addCut(cut). Unlike constraints
that are part of the model, this call of cut.end
will not remove the cut from the IloCplex object.
Cuts are not part of the root problem; they are considered on an
as-needed basis. A solution computed by IloCplex is
guaranteed to satisfy all cuts.
When columns are deleted from the active model, all cuts are
deleted as well and need to be added again if they should be considered.
Otherwise, use clearCuts to clear all cuts that have been
added.
IloExceptioncut - The constraint to add as a cut. It must be linear.public IloRange[] addCuts(IloRange[] cut) throws IloException
cut as cuts to the invoking
IloCplex object.
The cuts do not become part of the model;
they are only copied when the method addCuts
is invoked. Thus,
the constraints may be deleted or modified after addCuts
has been called, and the change will not affect the invoking
IloCplex object.
Cuts are not part of the root problem; they are considered on an
as-needed basis. A solution computed by IloCplex is
guaranteed to satisfy all cuts.
When columns are deleted from the active model, all cuts are
deleted as well and need to be added again if they should be considered.
Otherwise, use clearCuts to clear all cuts that have been
added.
IloExceptioncut - An array of constraints to be added as a cut.public IloRange[] addCuts(IloRange[] cut, int start, int num) throws IloException
num constraints given in cut
as cuts to the invoking IloCplex object, starting
with element cut[start].
The cuts do not become part of the
model; they are only copied when the method addCuts
is invoked.
Thus, the constraints may be deleted or modified after
addCuts has been called, and the change will not affect the
invoking IloCplex object.
Cuts are not part of the root problem; they are considered on an
as-needed basis. A solution computed by IloCplex is
guaranteed to satisfy all cuts.
When columns are deleted from the active model, all cuts are
deleted as well and need to be added again if they should be considered.
Otherwise, use clearCuts to clear all cuts that have been
added.
IloExceptioncut - An array of constraints to be added as cuts.
All constraints must be linear.start - The index of the first constraint in cut
that is to be added as a cut.num - The number of consecutive constraints in
cut that are to be added as cuts.cut.public void clearCuts()
throws IloException
IloCplex object
with the methods addCut and addCuts.IloExceptionpublic void exportModel(java.lang.String name)
throws IloException
filename.
The file format is determined by the extension of the filename. The following extensions are recognized:
If no name has been assigned to a variable or range
(that is, getName returns null for that
variable or range), IloCplex uses a default name when
it writes the model (or in the optimization log).
Default names are of the
form IloXj for variables and IloCi, where i
and j are internal indices of IloCplex.
IloExceptionname - The name of the file to which the model is written.
The extension of the filename determines the format in
which to write the model file.public void importModel(java.lang.String name)
throws IloException
name
into the active model.
The format of the file is specified by the extension of the filename. The following extensions are recognized:
When CPLEX reads a file, the existing active model is first
cleaned out and then new modeling objects, as specified by the input file,
are added to it.
In particular, one IloObjective object and one
IloLPMatrix object are always added to the
active model. The IloLPMatrix object will
contain all the constraints of the imported model. IloSOS1
and IloSOS2 objects are added as needed.
IloExceptionname - The name of the file from which the model is read.
The extension of the filename determines the format in
which to read the model file.public void clearModel()
throws IloException
The result is an empty model.
IloExceptionpublic void endModel()
throws IloException
This method can be useful in certain applications where the removal individually of all objects from the model entails a performance penalty.
IloExceptionpublic int getNcols()
The result may be greater than the number of variables in the active model, since some modeling objects may require more than one matrix column.
public int getNrows()
The result may be different from the number of constraints in the active model, as some modeling objects may require more than one matrix row, and quadratic constraints are not counted as rows.
public int getNQCs()
The result may be different from the number of constraints in the active model, since linear constraints are counted separately.
public int getNSOS1()
public int getNSOS2()
public int getNSOSs()
public int getNindicators()
public int getNLCs()
IloCplex object with the methods
addLazyConstraint and addLazyConstraints.public int getNUCs()
IloCplex object with the methods
addUserCut and addUserCuts.public int getNNZs()
public int getNintVars()
public int getNbinVars()
public int getNsemiContVars()
public int getNsemiIntVars()
public boolean isMIP()
true if the active model is a MIP.true if the active model is a MIP.public boolean isQO()
true if the active model has a quadratic objective
function.true if the active model has a quadratic objective
function.public boolean isQC()
true if the active model has quadratic
constraints.
See the topic QCP in the CPLEX User's Manual for more detail about the characteristics of such constraints with respect to their concavity and positive semi-definiteness (PSD).
true if the active model has quadratic
constraints.public static IloCplex.Status makeStatus(int status, boolean pfeas, boolean dfeas)
This function takes a numerical CPLEX status code like
CPX_STAT_OPTIMAL and converts it into a Concert status code
like Optimal. Numerical status code are typically returned
by lower-level interfaces to the engine.
Note that there are some numerical statuses for which additional information is required to map it to a Concert status code. This is true for example for statuses that indicate abort by the user. In this case the numerical status code does not encode whether a feasible solution exists and whether that solution is primal or dual feasible.
status - The numerical status code.pfeas - The primal feasibility that CPLEX reported for the
optimization that returned status.dfeas - The dual feasiblity that CPLEX reported for the optimization
that returned status.IloCplex.isPrimalFeasible(),
IloCplex.isDualFeasible()public IloCplex.Status getStatus() throws IloException
See also the topic Interpreting Solution Quality in the CPLEX User's Manual for more information about a status associated with infeasibility or unboundedness.
IloExceptionIloCplex.Statuspublic boolean isPrimalFeasible()
throws IloException
true if a primal feasible solution is available.
If false is returned, the solution may still be primal
feasible, but the algorithm did not determine the feasibility before
it terminated.
IloExceptionpublic boolean isDualFeasible()
throws IloException
true if a dual feasible solution is available.
If false is returned, the solution may still be
dual feasible, but the algorithm did not determine the feasibility
before it terminated.
IloExceptionpublic void setParam(IloCplex.IntParam which, int val) throws IloException
val.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the parameter to set.val - The new value for the integer parameter.public int getParam(IloCplex.IntParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public int getMin(IloCplex.IntParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public int getMax(IloCplex.IntParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public int getDefault(IloCplex.IntParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public void setParam(IloCplex.LongParam which, long val) throws IloException
val.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the parameter to set.val - The new value for the integer parameter.public long getParam(IloCplex.LongParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public long getMin(IloCplex.LongParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public long getMax(IloCplex.LongParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public long getDefault(IloCplex.LongParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the integer parameter to be queried.public void setParam(IloCplex.BooleanParam which, boolean val) throws IloException
val.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the Boolean parameter to be set.val - The new value for the Boolean parameter.public boolean getParam(IloCplex.BooleanParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the Boolean parameter to be queried.public boolean getDefault(IloCplex.BooleanParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the Boolean parameter to be queried.public void setParam(IloCplex.DoubleParam which, double val) throws IloException
val.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the double parameter to be set.val - The new value for the double parameterpublic double getParam(IloCplex.DoubleParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the double parameter to be queried.public double getMin(IloCplex.DoubleParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the double parameter to be queried.public double getMax(IloCplex.DoubleParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the double parameter to be queried.public double getDefault(IloCplex.DoubleParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the double parameter to be queried.public void setParam(IloCplex.StringParam which, java.lang.String val) throws IloException
val.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the string parameter to set.val - The new value for the string parameter.public java.lang.String getParam(IloCplex.StringParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the string parameter to be queried.public java.lang.String getDefault(IloCplex.StringParam which) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The identifier of the string parameter to be queried.public void setDefaults()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public IloCplex.ParameterSet getParameterSet() throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.setParameterSet(ilog.cplex.IloCplex.ParameterSet)public void setParameterSet(IloCplex.ParameterSet set) throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.set - The parameter set.getParameterSet()public void writeParameterSet(IloCplex.ParameterSet set, java.lang.String filename) throws IloException
filename.
By convention, the file extension is .prm.
The PRM file format is documented in the
CPLEX File Formats Reference Manual.IloExceptionset - The parameter set.filename - The name of the file to write.writeParam(java.lang.String),
readParameterSet(java.lang.String)public IloCplex.ParameterSet readParameterSet(java.lang.String filename) throws IloException
filename.
By convention, the file extension is .prm.
The PRM file format is documented in the
CPLEX File Formats Reference Manual.IloExceptionfilename - The name of the file to read.readParam(java.lang.String),
writeParameterSet(ilog.cplex.IloCplex.ParameterSet, java.lang.String)public java.lang.String getVersion()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public int getVersionNumber()
throws IloException
The version of CPLEX is in the format vvrrmmff, where vv is the version, rr is the release, mm is the modification, and ff is the fixpack number. For example, for CPLEX version 12.5.0.1 the returned value is 12050001.
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public void setDeleteMode(IloCplex.DeleteMode mode)
The delete mode in the invoking IloCplex object is set to
mode.
mode - The delete mode to be set,
IloCplex.DeleteMode.FixBasis or
IloCplex.DeleteMode.LeaveBasis.public IloCplex.DeleteMode getDeleteMode()
IloCplex
object.IloCplex
object.public IloCplex.CplexStatus getCplexStatus() throws IloException
IloCplex algorithm.
The status
of IloCplex.CplexStatus provides
more information about the status of the optimizer.
See also the topic Interpreting Solution Quality in the CPLEX User's Manual for more information about a status associated with infeasibility or unboundedness.
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.IloCplex.CplexStatus status.public IloCplex.CplexStatus getCplexSubStatus() throws IloException
IloCplex.CplexStatus
status of the last node problem solved.
This method is often useful
when the preceding invocation of
IloCplex.solve
terminates with an error during the solution of a MIP problem.
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.IloCplex.CplexStatus status of the last node
that has been solved during the solution of a MIP.public int getAlgorithm()
public int getSubAlgorithm()
public double getObjValue()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public double getObjValue(int soln)
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.soln - The index of the solution pool member for which to
return the objective value. A value of
IloCplex.IncumbentId specifies
that the value returned should correspond to the
incumbent rather than a member of the solution pool.public double getBestObjValue()
throws IloException
It is computed for a minimization problem as the minimum objective function value of all remaining unexplored nodes. Similarly, it is computed for a maximization problem as the maximum objective function value of all remaining unexplored nodes.
For a regular MIP optimization, this value is also the best known bound on the optimal solution value of the MIP problem. In fact, when a problem has been solved to optimality, this value matches the optimal solution value.
However, for the method populate, the value can also exceed
the optimal solution value if CPLEX has already solved the model
to optimality but continues to search for additional solutions.
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public double getMIPRelativeGap()
throws IloException
For a minimization problem, this value is computed by
(bestinteger - bestobjective) / (1e-10 + |bestinteger|)where
bestinteger is the value returned by
IloCplex.getObjValue
and bestobjective is the value returned by
IloCplex.getBestObjValue.
For a maximization problem, the value is computed by:
(bestobjective - bestinteger) / (1e-10 + |bestinteger|)
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public double getCutoff()
throws IloException
This value is typically computed from the objective value of an incumbent solution and the optimality gap. In the case of a minimization problem, for example, if the objective value of a node exceeds the cutoff value, the node can be pruned without the need to solve the node to optimality.
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public double[] getValues(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the solution values.
This LP matrix must be in the active model.x is the array returned by this method,
x[j] will be the solution value for the variable
corresponding to column j of
matrix.public double[] getValues(IloLPMatrix matrix, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the solution values.
This LP matrix must be in the active model.soln - The index of the solution pool member for which to
return solution values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.x is the array returned by this method,
x[j] will be the solution value for the variable
corresponding to column j of
matrix.public double[] getValues(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num
columns of an LP matrix, starting at the index specified by
start.IloCplex.UnknownObjectException - matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the solution values.
This LP matrix must be in the active model.start - The index of the first column whose solution value
is being queried.num - The number of consecutive columns for which
to query the solution value.x is the array returned by this method,
x[j] will be the solution value for the variable
corresponding to column j+start of
matrix.public double[] getValues(IloLPMatrix matrix, int start, int num, int soln) throws IloCplex.UnknownObjectException, IloException
num
columns of an LP matrix, starting at the index specified by
start.IloCplex.UnknownObjectException - matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the solution values.
This LP matrix must be in the active model.start - The index of the first column whose solution value
is being queried.num - The number of consecutive columns for which
to query the solution value.soln - The index of the solution pool member for which to
return solution values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.x is the array returned by this method,
x[j] will be the solution value for the variable
corresponding to column j+start of
matrix.public double getValue(IloNumVar var) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - var is not in
the active modelIloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - The variable whose value is being queried.
This variable must be in the active model.var.public double getValue(IloNumVar var, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - var is not in
the active modelIloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - The variable whose value is being queried.
This variable must be in the active model.soln - The index of the solution pool member for which to
return a solution value. A value of
IloCplex.IncumbentId specifies
that the value returned should correspond to the
incumbent rather than a member of the solution pool.public double[] getValues(IloNumVar[] var) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the variables
specified in var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array of
variables whose solution values are being queried.
All variables must be in the active model.var.
If x is the array returned by this method,
x[j] will be the solution value for the variable
var[j].public double[] getValues(IloNumVar[] var, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the variables
specified in var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array of
variables whose solution values are being queried.
All variables must be in the active model.soln - The index of the solution pool member for which to
return solution values. A value of IloCplex.IncumbentId
specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.var.
If x is the array returned by this method,
x[j] will be the solution value for the variable
var[j].public double[] getValues(IloNumVar[] var, int start, int num) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the variables
specified in var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array containing the variables whose solution values
are being queried. These variables must be in the
active model.start - The index of the first variable in var for
which to query the solution value.num - The number of consecutive variables in
var for which
to query the solution value.x is the array returned by this method,
x[j] will be the solution value for the
variable var[j+start].public double[] getValues(IloNumVar[] var, int start, int num, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the variables
specified in var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array containing the variables whose solution values
are being queried. These variables must be in the
active model.start - The index of the first variable in var for
which to query the solution value.num - The number of consecutive variables in
var for which
to query the solution value.soln - The index of the solution pool member for which to
return solution values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.x is the array returned by this method,
x[j] will be the solution value for the
variable var[j+start].public double[] getReducedCosts(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
The values returned by this method are defined to be the dual multipliers for bound constraints on the specified variables.
IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the reduced costs.
This LP matrix must be in the active model.matrix.
If dj is the array returned by this method,
dj[j] will be the reduced cost value for
the variable corresponding to column j of
matrix.public double[] getReducedCosts(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num
columns of LP matrix, starting from the column specified by
start.
The values returned by this method are defined to be the dual multipliers for bound constraints on the specified variables.
IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the reduced costs.
This LP matrix must be in the active model.start - The index of the first column in matrix
for which to query the reduced cost.num - The number of consecutive columns for which to query the
reduced cost.dj is the array returned by this method,
dj[j] will be the reduced cost
for the variable corresponding to column j+start
of matrix.public double getReducedCost(IloNumVar ivar) throws IloCplex.UnknownObjectException, IloException
The value returned by this method is defined to be the dual multiplier for bound constraints on the specified variable.
IloCplex.UnknownObjectException - The variable var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.ivar - The variable whose reduced cost is being queried.
This variable must be in the active model.var.public double getInfeasibility(IloNumVar ivar) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - The variable var
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.ivar - The variable whose infeasibility is being queried.
This variable must be in the active model.var. The
infeasibility value returned is 0 (zero)
if the variable bounds
are satisfied. If the infeasibility value is negative, it
specifies the amount by which the lower bound of the variable
must be changed; if it is positive, it specifies the amount
by which the upper bound of the variable must be changed.public double[] getReducedCosts(IloNumVar[] var) throws IloCplex.UnknownObjectException, IloException
The value returned by this method is defined to be the dual multiplier for bound constraints on the specified variable.
IloCplex.UnknownObjectException - One of the variables specified
in var is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - The array of variables whose reduced costs are being queried.
These variables must be in the active model.var. If dj is the array returned
by this method, dj[j] will be the reduced cost
for the variable var[j].public double[] getInfeasibilities(IloNumVar[] var) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the variables specified
in var is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - The array of variables whose infeasibilities are being queried.
These variables must be in the active model.var. If infeas is the array
returned by this method, infeas[j] will be the
infeasibility value for the variable var[j].
The infeasibility value returned is 0 (zero)
if the variable bounds
are satisfied. If the infeasibility value is negative, it
specifies the amount by which the lower bound of the variable
must be changed; if it is positive, it specifies the amount
by which the upper bound of the variable must be changed.public double[] getReducedCosts(IloNumVar[] var, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive variables,
starting from the index specified by start.
The values returned by this method are defined to be the dual multipliers for bound constraints on the specified variables.
IloCplex.UnknownObjectException - One of the specified variables
in var is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array of variables whose reduced costs
are being queried. These variables must be in the
active model.start - The index of the first variable in var for
which to query the reduced cost.num - The number of consecutive variables in
var for which to
query the reduced cost.dj is the array returned by this method,
dj[j] will be the reduced cost for the variable
var[j+start].public double[] getInfeasibilities(IloNumVar[] var, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive variables,
starting from the index specified by start.IloCplex.UnknownObjectException - One of the specified variables
in var is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.var - An array of variables whose infeasibilities
are being queried. These variables must be in the
active model.start - The index of the first variable in var for
which to query the infeasibility.num - The number of consecutive variables in
var for which to query the infeasibility.infeas is the array returned by this method,
infeas[j] will be the infeasibility value
for the variable var[j+start].public double[] getDuals(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
The values returned by this method are also meaningful for programs other than linear programs. For second order cone programs, for example, the values returned by this method provide information about the dual solution. The topic Accessing dual values and reduced costs of SOCP solutions in the CPLEX User's Manual shows how to use the values returned by this method for second order cone programs.
IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for the rows of which to query the dual
solution values. This LP matrix must be in the active
model.pi is the array returned by this method,
pi[i] will be the dual solution value for the
constraint corresponding to row i of
matrix.public double[] getDuals(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num rows of an LP matrix.
The values returned by this method are also meaningful for programs other than linear programs. For second order cone programs, for example, the values returned by this method provide information about the dual solution. The topic Accessing dual values and reduced costs of SOCP solutions in the CPLEX User's Manual shows how to use the values returned by this method for second order cone programs.
IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix of the constraints for which the dual
solution values are being queried. This LP matrix must
be in the active model.start - The index of the first row whose
dual solution value is being queried.num - The number of consecutive rows for which to query the
dual solution value.pi is the array returned by this method,
pi[i] will be the dual solution value for the
constraint corresponding to row i+start of the
IloLPMatrix matrix.public double getDual(IloRange rng) throws IloCplex.UnknownObjectException, IloException
The values returned by this method are also meaningful for programs other than linear programs. For second order cone programs, for example, the values returned by this method provide information about the dual solution. The topic Accessing dual values and reduced costs of SOCP solutions in the CPLEX User's Manual shows how to use the values returned by this method for second order cone programs.
IloCplex.UnknownObjectException - The range constraint
rng is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The range constraint whose dual solution value is being
queried. This range constraint must be in the active model,
either directly or through an instance of
IloLPMatrix.public double[] getDuals(IloRange[] rng) throws IloCplex.UnknownObjectException, IloException
The values returned by this method are also meaningful for programs other than linear programs. For second order cone programs, for example, the values returned by this method provide information about the dual solution. The topic Accessing dual values and reduced costs of SOCP solutions in the CPLEX User's Manual shows how to use the values returned by this method for second order cone programs.
IloCplex.UnknownObjectException - A constraint in rng
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The array of constraints whose dual solution values are being
queried. These constraints must be in the active model, either
directly or through an instance of IloLPMatrix.rng. If pi is the
array returned by this method, pi[i] will be the
dual solution value for constraint rng[i].public double[] getDuals(IloRange[] rng, int start, int num) throws IloCplex.UnknownObjectException, IloException
num
consecutive range constraints, starting from
the index specified by start.
The values returned by this method are also meaningful for programs other than linear programs. For second order cone programs, for example, the values returned by this method provide information about the dual solution. The topic Accessing dual values and reduced costs of SOCP solutions in the CPLEX User's Manual shows how to use the values returned by this method for second order cone programs.
IloCplex.UnknownObjectException - One of the specified constraints
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array containing the constraints whose dual solution
values are being queried. These constraints
must be in the active model, either added directly or
through an instance of IloLPMatrix.start - The index of the first constraint in rng for
which to query the dual solution value.num - The number of consecutive constraints in
rng for which to
query the dual solution value.pi is the array
returned by this method, pi[i] will be the
dual solution value for the range constraint
rng[i+start].public double[] getSlacks(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - matrix is not in
the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for the constraints of which to query the
slack values. This LP matrix must be in active model.s is the array returned by this method,
s[i] will be the slack value for the range
constraint corresponding to row i of
matrix.public double[] getSlacks(IloLPMatrix matrix, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - matrix is not in
the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for the constraints of which to query the
slack values. This LP matrix must be in active model.soln - The index of the solution pool member for which to
return slack values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.s is the array returned by this method,
s[i] will be the slack value for the range
constraint corresponding to row i of
matrix.public double[] getInfeasibilities(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the infeasibility.
This LP matrix must be in the active model.matrix.
If infeas is the array returned by this method,
infeas[j] will be the infeasibility value for
the constraint corresponding to row j of
matrix.public double[] getSlacks(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive rows,
starting from the index specified by start, of an LP matrix.IloCplex.UnknownObjectException - matrix is not in
the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for rows which to query slack values.
This LP matrix must be in the active model.start - The index of the first row whose slack value
is being queried.num - The number of consecutive rows for which
to query the slack value.s is the array returned by this method,
s[i] will be the slack value for the
constraint corresponding to row i+start of
matrix.public double[] getSlacks(IloLPMatrix matrix, int start, int num, int soln) throws IloCplex.UnknownObjectException, IloException
num consecutive rows,
starting from the index specified by start, of an LP matrix.IloCplex.UnknownObjectException - matrix is not in
the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for rows which to query slack values.
This LP matrix must be in the active model.start - The index of the first row whose slack value
is being queried.num - The number of consecutive rows for which
to query the slack value.soln - The index of the solution pool member for which to
return slack values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.s is the array returned by this method,
s[i] will be the slack value for the
constraint corresponding to row i+start of
matrix.public double[] getInfeasibilities(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num
rows of LP matrix, starting from the row specified by
start.IloCplex.UnknownObjectException - The LP matrix matrix
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the infeasibility.
This LP matrix must be in the active model.start - The index of the first row in matrix
for which to query the infeasibility.num - The number of consecutive rows for which to query the
infeasibility.infeas is the array returned by this method,
infeas[j] will be the infeasibility value
for the constraint corresponding to row j+start
of matrix.public double getSlack(IloRange rng) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - rng is not in
the active modelIloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The range constraint whose slack value is being queried.
This range constraint must be in the active
model, either directly or through
an instance of IloLPMatrix.public double getSlack(IloRange rng, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - rng is not in
the active modelIloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The range constraint whose slack value is being queried.
This range constraint must be in the active
model, either directly or through
an instance of IloLPMatrix.soln - The index of the solution pool member for which to
return a slack value. A value of
IloCplex.IncumbentId specifies
that the value returned should correspond to the
incumbent rather than a member of the solution pool.public double getInfeasibility(IloConstraint con) throws IloCplex.UnknownObjectException, IloException
The infeasibility value is 0 (zero) if the constraint is satisfied,
nonzero otherwise.
More specifically, for a range constraint with finite lower
bound and upper bound,
if the infeasibility value is negative, that value
specifies the amount by which the lower bound of the range
must be changed to make the current solution feasible;
if the value is
positive, it specifies the amount by which the upper bound of
the range must be changed.
For a more general constraint such as
IloOr, IloAnd,
IloSOS1, or
IloSOS2, the infeasibility value
returned is the maximal
absolute infeasibility value over all range constraints
and variables created by
the extraction of the queried constraint.
IloCplex.UnknownObjectException - con is not in
the active modelIloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.con - The constraint whose infeasibility value is being queried.
This constraint must be in the active
model, either directly or through
an instance of IloLPMatrix.public double[] getSlacks(IloRange[] rng) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - A constraint in rng
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array of constraints whose slack values
are being queried. These range constraints must be in the
active model, either directly or through
an instance of IloLPMatrix.rng. If s is the array returned
by this method, s[i] will be the slack value for
the range constraint rng[i].public double[] getSlacks(IloRange[] rng, int soln) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - A constraint in rng
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array of constraints whose slack values
are being queried. These range constraints must be in the
active model, either directly or through
an instance of IloLPMatrix.soln - The index of the solution pool member for which to
return slack values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.rng. If s is the array returned
by this method, s[i] will be the slack value for
the range constraint rng[i].public double[] getInfeasibilities(IloConstraint[] con) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - A constraint in con
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.con - An array of constraints whose infeasibility values
are being queried. These constraints must be in the
active model, either directly or through
an instance of IloLPMatrix.con.
If infeas is the array returned
by this method, infeas[i] will be the
infeasibility value for
the constraint con[i].public double[] getSlacks(IloRange[] rng, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive constraints,
starting from the index specified by start, from
an array rng.IloCplex.UnknownObjectException - One of the specified constraints
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array containing the constraints whose slack values
are being queried. These constraints
must be in the active model, either added
directly or through an instance of IloLPMatrix.start - The index of the first constraint in rng
whose slack values are being queried.num - The number of consecutive constraints in rng for
which to query the slack values.s is the array returned by this
method, s[i] will be the slack value for the
range constraint rng[i+start].public double[] getSlacks(IloRange[] rng, int start, int num, int soln) throws IloCplex.UnknownObjectException, IloException
num consecutive constraints,
starting from the index specified by start, from
an array rng.IloCplex.UnknownObjectException - One of the specified constraints
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array containing the constraints whose slack values
are being queried. These constraints
must be in the active model, either added
directly or through an instance of IloLPMatrix.start - The index of the first constraint in rng
whose slack values are being queried.num - The number of consecutive constraints in rng for
which to query the slack values.soln - The index of the solution pool member for which to
return slack values. A value of
IloCplex.IncumbentId specifies
that the values returned should correspond to the
incumbent rather than a member of the solution pool.s is the array returned by this
method, s[i] will be the slack value for the
range constraint rng[i+start].public double[] getInfeasibilities(IloConstraint[] con, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive constraints,
starting from the index specified by start, from
an array con of constraints.IloCplex.UnknownObjectException - One of the specified constraints
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.con - An array containing the constraints whose
infeasibility values
are being queried. These constraints
must be in the active model, either added
directly or through an instance of IloLPMatrix.start - The index of the first constraint in con
whose infeasibility value is being queried.num - The number of consecutive constraints in con for
which to query the infeasibility values.infeas is the array returned by this method,
infeas[i] will be the infeasibility value
for the range constraint con[i+start].public double getValue(IloNumExpr expr) throws IloException
expr takes for the current solution.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.expr - The expression for which to evaluate the current solution.expr takes for the current solution.public double getValue(IloNumExpr expr, int soln) throws IloException
expr takes for a solution in the
solution pool.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.expr - The expression for which to evaluate the current solution.soln - The index of the solution pool member for which to
return evaluate the expression. A value of
IloCplex.IncumbentId specifies
that the value returned should correspond to the
incumbent rather than a member of the solution pool.expr takes for the current solution.public double[] getAX(IloLPMatrix matrix) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - matrix is unknown in
IloCplex.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the row activity values.
This LP matrix must be in the active model.matrix. If ax is the array
returned by this method, ax[i] will be the
row activity value for the constraint corresponding to row
i of matrix.public double[] getAX(IloLPMatrix matrix, int start, int num) throws IloCplex.UnknownObjectException, IloException
num consecutive rows, starting from the
index specified by start, of an LP matrix.IloCplex.UnknownObjectException - matrix is unknown in
IloCplex.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.matrix - The LP matrix for which to query the row activity
values. This LP matrix must be in the active model.start - The index of the first row for which to query the
row activity values.num - The number of consecutive rows for which to query the
row activity values.ax is the
array returned by this method, ax[i] will be the
row activity value for the constraint corresponding to row
i+start of the IloLPMatrix matrix.public double getAX(IloRange rng) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - rng is not in
the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The range constraint whose row activity value is
being queried. This range constraint must be in the
active model, either directly or through an
IloLPMatrix object.rng.public double[] getAX(IloRange[] rng) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - A constraint in rng
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array of range constraints whose row activity values
are being queried. These range constraints must all be in
the active model, either directly or through an
IloLPMatrix object.rng. If ax is the array returned by
this method, ax[i] will be the row activity value
for the range constraint rng[i].public double[] getAX(IloRange[] rng, int start, int num) throws IloCplex.UnknownObjectException, IloException
IloCplex.UnknownObjectException - One of the specified constraints
is not in the active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - An array containing the range constraints whose row
activity values are being queried. These range constraints
must be in the active model, either directly or through an
IloLPMatrix object.start - The index of the first range constraint in rng
for which to query the row activity value.num - The number of consecutive range constraints
in rng for
which to query the row activity value.ax is the array returned by this method,
ax[i] will be the row activity value for the
constraint rng[i+start].public IloCplex.BasisStatus getBasisStatus(IloNumVar var) throws IloException
var.
This method
succeeds only if a basic solution is available in the invoking
IloCplex optimizer.
IloExceptionvar - The variable whose basis status is being queried.var.public IloCplex.BasisStatus[] getBasisStatuses(IloNumVar[] var) throws IloException
This method succeeds only if a basic solution is available in the
invoking IloCplex optimizer.
IloExceptionvar - The array of variables whose basis statuses are being queried.var. If
b is the returned array, b[j]
will be the basis status for the variable var[j].public IloCplex.BasisStatus[] getBasisStatuses(IloNumVar[] var, int start, int num) throws IloException
This method returns the basis status for each of
num consecutive variables,
starting from the index specified by start,
in the array var.
This method succeeds only if a basic solution is available in the
invoking IloCplex optimizer.
IloExceptionvar - An array containing the variables whose basis statuses
are being queried.start - The index of the first variable in the array var
for which to return basis statuses.num - The number of consecutive variables in
the array var for
which to return basis statuses.var. If b is the returned array,
b[j] will be the basis status for the variable
var[j+start].public IloCplex.BasisStatus getBasisStatus(IloConstraint con) throws IloException
This method
returns the basis status for the constraint con.
This method succeeds only if a basic solution is available
in the invoking IloCplex optimizer.
IloExceptioncon - The constraint whose basis status is being queried.rng.public IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con) throws IloException
This method returns the basis status for each of the constraints in the specified array.
This method succeeds only if a basic solution is available in the
invoking IloCplex optimizer.
IloExceptioncon - The array of constraints whose basis statuses are being
queried.con. If b is the returned
array, b[i] will be the basis status for
constraints con[i].public IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con, int start, int num) throws IloException
This method
returns the basis status for each of num consecutive
constraints, starting from the index specified by
start, in the array of constraints con.
This method succeeds only if a basic solution is available in the
invoking IloCplex optimizer.
IloExceptioncon - An array containing the constraints whose basis statuses
are being queried.start - The index of the first constraint in
the array con
for which to return the basis status.num - The number of consecutive constraints in
the array con for
which to return the basis status.con. If b is the returned array,
b[i] will be the basis status for constraint
con[i+start].public void setBasisStatuses(IloNumVar[] var, IloCplex.BasisStatus[] cstat, IloRange[] con, IloCplex.BasisStatus[] rstat) throws IloException
IloExceptionvar - An array of variables whose basis statuses are being set.cstat - An array of basis statuses for variables in
var. The basis status for the variable
var[j] will be set to cstat[j].con - An array of constraints whose basis statuses are being set.rstat - An array of basis statuses for the ranges in
con. The basis status for constraint
con[i] will be set to rstat[i].public void setBasisStatuses(IloNumVar[] var, IloCplex.BasisStatus[] cstat, int cstart, int cnum, IloConstraint[] con, IloCplex.BasisStatus[] rstat, int rstart, int rnum) throws IloException
This method sets the basis status for each of a number of
variables and constraints. For cnum consecutive
variables, it starts from the index specified by var[start],
and for rnum consecutive constraints, it starts from the
index specified by con[start].
IloExceptionvar - An array of variables whose
basis statuses are being set.cstat - An array containing the basis statuses for the
variables specified in var.cstart - The first element in var and
cstat to consider.cnum - The number of variables in var for which to
set the basis status.con - An array of constraints whose
basis statuses are being set.rstat - An array containing the basis statuses for the ranges
specified in con.rstart - The first element in con and
rstat to consider.rnum - The number of constraints in con for which
to set the basis status.public void setStart(double[] x,
double[] dj,
IloNumVar[] var,
double[] slack,
double[] pi,
IloRange[] rng)
throws IloException
solve.
Starting point information is exploited at the next call of the method
solve. In particular, if the active model
is an LP or QP, and the parameter IloCplex.IntParam.RootAlg
is IloCplex.Algorithm.Primal or
IloCplex.Algorithm.Dual, the starting point information
provided with this method is used to construct a starting basis for
the simplex algorithm.
The starting point information is provided in the arguments of this
method. Any of the arrays will accept null as an argument.
However, if x or dj are not
null, var must not be null.
Similarly, if slack or pi are not
null, rng must not be null.
When CPLEX is solving a MIP this information is not used. Instead, use
addMIPstart to specify a starting solution candidate.
For all variables given in var, x[j] specifies
the starting primal value for the variable var[j]. Similarly,
dj[j] specifies the starting reduced cost for the variable
var[j]. For all ranges specified in rng,
slack[i] specifies the starting slack value for
rng[i]. Similarly, pi[i] specifies the starting
dual value for rng[i].
IloExceptionx - The array of starting primal values for var.dj - The array of starting reduced costs for var.var - The array of variables for which to set starting point
information.slack - The array of starting slack values for rng.pi - The array of starting dual values for rng.rng - The array of constraints for which to set starting point
information.public void setStart(double[] x,
double[] dj,
IloNumVar[] var,
int vstart,
int vnum,
double[] slack,
double[] pi,
IloRange[] rng,
int rstart,
int rnum)
throws IloException
solve.
Starting point information is exploited at the next call of the method
solve. In particular, if the active model
is an LP or QP, and the parameter IloCplex.IntParam.RootAlg
is IloCplex.Algorithm.Primal or
IloCplex.Algorithm.Dual, the starting point information
provided with this method is used to construct a starting basis for
the simplex algorithm.
The starting point information is provided in the arguments of this
method. Any of the arrays accept null as an argument.
However, if x or dj are not null,
var must not be null. Similarly, if
slack or pi are not null,
rng must not be null. Also, if
vnum is not 0 (zero), x and dj must
not both be null, and if rnum is not 0 (zero),
slack and pi must not both be
null.
When CPLEX is solving a MIP this information is not used. Use
addMIPstart to specify a starting solution candidate.
For the variables specified in var, x[j] is
the primal starting value for the variable var[j]. Similarly,
dj[j] is the starting reduced cost for the variable
var[j]. For the constraints specified in rng,
slack[i] is the starting slack value for
rng[i]. Similarly, pi[i] is the starting
dual value for rng[i].
IloExceptionx - An array of starting values for the variables
specified in var.dj - An array of starting reduced costs for the variables
specified in var.var - An array containing the variables for which to set starting
point information.vstart - The index of the first element in the arrays
x, dj, or var
to be used.vnum - The number of consecutive variables in the
array var
for which starting point information is to be set.slack - An array of starting slack values for rng.pi - An array of starting dual values for rng.rng - An array containing the constraints for which to set
starting point information.rstart - The index of the first element in slack,
pi, or rng to be used.rnum - The number of consecutive constraints in the
array rng
for which starting point information is to be set.public int addMIPStart(IloNumVar[] vars, double[] values, int vstart, int vnum, IloCplex.MIPStartEffort effort, java.lang.String name) throws IloException
This method adds a MIP start to the current problem. The argument
vstart is an index into the two arrays vars
and values. It designates the variable at which the range
of variables and values defining the MIP start begins. The argument
vnum specifies how many pairs of variables and values
make up the range defining the MIP start.
There is not a method to create a MIP start from a multidimensional array of variables. In order to create a MIP start from a multidimensional array of variables, you first must copy all those variables into a flat array. See the topic "Starting from a solution: MIP starts" in the CPLEX User's Manual for a sample of this method with a multidimensional array.
IloExceptionvars - An array of numeric variables participating in the range
that defines the MIP start.values - An array of values corresponding to the variables defining
the MIP start.vstart - An index into the two arrays. It designates the beginning
of the range defining the MIP start.vnum - The number of pairs of variable and value that define
the MIP start.effort - The level of effort that CPLEX should expend to solve
the MIP start.name - The name of the MIP start.public int addMIPStart(IloNumVar[] vars, double[] values, IloCplex.MIPStartEffort effort, java.lang.String name) throws IloException
IloExceptionpublic int addMIPStart(IloCplex.MIPStartEffort effort, java.lang.String name) throws IloException
IloExceptionpublic int addMIPStart(IloNumVar[] vars, double[] values, IloCplex.MIPStartEffort effort) throws IloException
IloExceptionpublic int addMIPStart(IloNumVar[] vars, double[] values) throws IloException
IloExceptionpublic int addMIPStart(IloNumVar[] vars, double[] values, java.lang.String name) throws IloException
IloExceptionpublic int addMIPStart(IloCplex.MIPStartEffort effort) throws IloException
IloExceptionpublic int addMIPStart(java.lang.String name)
throws IloException
IloExceptionpublic int addMIPStart()
throws IloException
IloExceptionpublic void changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values,
int vstart,
int vnum,
IloCplex.MIPStartEffort effort)
throws IloException
IloExceptionmipstartindex - The index of the MIP start among the MIP starts
associated with the current problem.vars - An array of variables to define the MIP start.values - The corresponding values to change.vstart - Index of the starting variable.vnum - Number of variables to change.effort - Level of effort for CPLEX to exert to solve the
resulting changed MIP start.public void changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values,
IloCplex.MIPStartEffort effort)
throws IloException
IloExceptionpublic void deleteMIPStarts(int first,
int num)
throws IloException
IloExceptionpublic void deleteMIPStarts(int first)
throws IloException
IloExceptionpublic void changeMIPStart(int mipstartindex,
IloCplex.MIPStartEffort effort)
throws IloException
IloExceptionpublic void changeMIPStart(int mipstartindex,
IloNumVar[] vars,
double[] values)
throws IloException
IloExceptionpublic int getNMIPStarts()
throws IloException
IloExceptionpublic java.lang.String getMIPStartName(int mipstartindex)
throws IloException
IloExceptionpublic int getMIPStartIndex(java.lang.String name)
throws IloException
IloExceptionpublic IloCplex.MIPStartEffort getMIPStart(int mipstartindex, IloNumVar[] vars, int begin, int num, double[] values, boolean[] isset) throws IloException
IloExceptionmipstartindex - The index of the MIP start among all the
MIP starts associated with the current problem.vars - An array of numeric variables to define the MIP start.
This array is an input argument. It will not be modified by
this method. It may be null; if it is not null, then
none of its elements may be null.begin - An index into the two arrays; it specifies where the
range of defining pairs begins.num - The number of pairs of variable and value that participate
in the range defining the MIP start.values - The values corresponding to the variables.
This array is an output argument. Its values will be
modified by this method. Upon return of the method,
the array will contain the start values of the variables
specified in the array vars and by the
arguments begin and num if
they are present. If the array vars
is not null, then the array values must not
be null either. For variables in vars
that are not specified in the MIP start, the respective
slot in vals will be set to 0 (zero).isset - An array of Boolean values that specify whether or not
the corresponding variable is set in the MIP start.
This array is an output argument. Its values will be
modified by the method. Upon return of the method,
the array will contain a value of true or false
for the variables specified by vars
and by the arguments begin and
num if they are present, depending on
whether the variable is part of the MIP start or not.public IloCplex.MIPStartEffort getMIPStart(int mipstartindex, IloNumVar[] vars, double[] values, boolean[] isset) throws IloException
IloExceptionmipstartindex - The index of the MIP start among all the
MIP starts associated with the current problem.vars - An array of numeric variables to define the MIP start.
This array is an input argument. It will not be modified by
this method. It may be null; if it is not null, then
none of its elements may be null.values - The values corresponding to the variables.
This array is an output argument. Its values will be
modified by this method. Upon return of the method,
the array will contain the start values of the variables
specified in the array vars.
If the array vars
is not null, then the array values must not
be null either. For variables in vars
that are not specified in the MIP start, the respective
slot in vals will be set to 0 (zero).isset - An array of Boolean values that specify whether or not
the corresponding variable is set in the MIP start.
This array is an output argument. Its values will be
modified by the method. Upon return of the method,
the array will contain a value of true or false
for the variables specified by vars
depending on
whether the variable is part of the MIP start or not.public IloCplex.MIPStartEffort getMIPStart(int mipstartindex, IloNumVar[] vars, int begin, int num, double[] values) throws IloException
IloExceptionmipstartindex - The index of the MIP start among all the
MIP starts associated with the current problem.vars - An array of numeric variables participating in the range
that defines the MIP start.
This array is an input argument. It will not be modified by
this method. It may be null; if it is not null, then
none of its elements may be null.begin - An index into the two arrays. It designates the beginning
of the range defining the MIP start.num - The number of pairs of variable and value that define
the MIP start.values - An array of values corresponding to the variables defining
the MIP start.
This array is an output argument. Its values will be
modified by this method. Upon return of the method,
the array will contain the start values of the variables
specified in the array vars and by the
arguments begin and num if
they are present. If the array vars
is not null, then the array values must not
be null either. For variables in vars
that are not specified in the MIP start, the respective
slot in vals will be set to 0 (zero).public IloCplex.MIPStartEffort getMIPStart(int mipstartindex, IloNumVar[] vars, double[] values) throws IloException
IloExceptionmipstartindex - The index of the MIP start among all the
MIP starts associated with the current problem.vars - An array of numeric variables that defines the MIP start.
This array is an input argument. It will not be modified by
this method. It may be null; if it is not null, then
none of its elements may be null.values - An array of values corresponding to the variables defining
the MIP start.
This array is an output argument. Its values will be
modified by this method. Upon return of the method,
the array will contain the start values of the variables
specified in the array vars.
If the array vars
is not null, then the array values must not
be null either. For variables in vars
that are not specified in the MIP start, the respective
slot in vals will be set to 0 (zero).public IloCplex.MIPStartEffort getMIPStart(int mipstartindex) throws IloException
IloExceptionpublic boolean feasOpt(IloConstraint[] cts, double[] prefs) throws IloException
cts.
On successful completion, the
method installs a solution vector that is feasible for the
minimum-cost relaxation.
This solution can be queried with conventional query methods, such as
IloCplex.getValue.
The method feasOpt provides several different
metrics for determining what constitutes a minimum-cost relaxation.
The metric is specified by the parameter FeasOptMode.
The method feasOpt can also optionally perform a second
optimization phase where the original objective is optimized,
subject to the constraint that the associated relaxation must
have the same cost as the minimum-cost relaxation computed in the first
phase. See
IloCplex.Relaxation
for further information.
The user may specify numeric values to express relative preferences
for relaxing bounds. A larger preference value specifies a
greater willingness to relax the corresponding bound.
Internally, feasOpt uses the
reciprocal of the preference value to weight the
relaxations of the associated
bounds in the phase one cost function.
A negative or 0 (zero) value specifies that the corresponding bound must
not be relaxed. If a preference is specified for a ranged constraint,
that preference is used for both its upper and lower bound.
If enough constraints were allowed to be relaxed, the
function will return true; otherwise, it returns
false.
The active model is not changed by this method.
If feasOpt finds a feasible solution,
it returns the solution and the corresponding objective
in terms of the original model.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptioncts - An array of constraints that can be relaxed.
Only constraints directly added to the model
can be specified in this array.
Groups of constraints can be combined and
specified by and constraints.
Relaxation preference values can be specified in
the array prefs.prefs - An array of doubles specifying the preference value
for relaxing the constraints listed in
cts. The element
prefs[i] specifies the preference value
for relaxing the constraint cts[i].true if a relaxation is found;
false otherwise.public boolean feasOpt(IloRange[] rngs, double[] rnglb, double[] rngub, IloNumVar[] vars, double[] varlb, double[] varub) throws IloException
vars and
by relaxing the bounds of the range constraints specified in
the array rngs.
On successful completion, the
method installs a solution vector that is feasible for the
minimum-cost relaxation.
This solution can be queried with conventional query methods, such as
IloCplex.getValue or
IloCplex.getInfeasibility.
The method feasOpt provides several different
metrics for determining what constitutes a minimum-cost relaxation.
The metric is specified by the parameter FeasOptMode.
The feasOpt method can also optionally perform a second
optimization phase where the original objective is optimized,
subject to the constraint that the associated relaxation must
have the same cost as the minimum-cost relaxation computed in the first
phase. See
IloCplex.Relaxation
for further information.
The user may specify numeric values to express relative preferences
for relaxing bounds. A larger preference value specifies
a greater willingness to relax the corresponding bound.
Internally, feasOpt uses the
reciprocal of the preference value to weight
the relaxations of the associated
bounds in the phase one cost function.
A negative or 0 (zero) value specifies that the corresponding bound must
not be relaxed. These preference values are entered in the arguments
rnglb, rngub, varlb,
and varub.
If enough variables or constraints were allowed to be relaxed, the
function will return true; otherwise, it returns
false.
The active model is not changed by this method.
If feasOpt finds a feasible solution,
it returns the solution and the corresponding objective
in terms of the original model.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptionrngs - An array of ranged constraints. Relaxation preference
values for these ranges can be specified in arrays
rnglb and rngub. This array
may be null, in which case no range
constraints may be relaxed.
Only constraints directly added to the model
can be specified.rnglb - An array of doubles specifying the preference value
for relaxing the lower bound of the ranged constraints
listed in the argument rngs. Element
rnglb[i] specifies the preference value
for relaxing the lower bound of constraint
rngs[i]. This array may be
null, in which case no range lower bounds
are allowed to be relaxed.rngub - An array of doubles specifying the preference value
for relaxing the upper bound of the ranged constraints
listed in the argument rngs. Element
rngub[i] specifies the preference
for relaxing the upper bound of constraint
rngs[i]. This array may be
null, in which case no range upper bounds
are allowed to be relaxed.vars - An array of modeling variables. Relaxation preference
values for the variables can be specified in arrays
varlb and varub. This array
may be null, in which case no variable
bounds are allowed to be relaxed.varlb - An array of doubles specifying the preference value
for relaxing the lower bound of the modeling variables
listed in the argument vars. Element
varlb[i] specifies the preference value
for relaxing the lower bound of variable
vars[i]. This array may be
null,
in which case no variable lower bounds
are allowed to be relaxed.varub - An array of doubles specifying the preference value
for relaxing the upper bound of the modeling variables
listed in the argument vars. Element
varub[i] specifies the preference value
for relaxing the upper bound of variable
vars[i]. This array may be
null,
in which case no variable upper bounds
are allowed to be relaxed.true if a relaxation is found; false otherwise.public boolean feasOpt(IloNumVar[] vars, double[] varlb, double[] varub) throws IloException
vars.
On successful completion, the
method installs a solution vector that is feasible for the
minimum-cost relaxation.
This solution can be queried with conventional query methods, such as
IloCplex.getValue.
The method feasOpt provides several different
metrics for determining what constitutes a minimum-cost relaxation.
The metric is specified by the parameter FeasOptMode.
The feasOpt method can also optionally perform a second
optimization phase where the original objective is optimized,
subject to the constraint that the associated relaxation must
have the same cost as the minimum-cost relaxation computed in the first
phase. See
IloCplex.Relaxation
for further information.
The user may specify numeric values to express relative preferences
for relaxing bounds. A larger preference value specifies
a greater willingness to relax the corresponding bound.
Internally, feasOpt uses the
reciprocal of the preference value to weight the
relaxations of the associated bounds in the phase one cost function.
A negative or 0 (zero) value specifies that the corresponding bound must
not be relaxed. These preference values are entered in
varlb and varub.
If enough variable bounds were allowed to be relaxed, the
function will return true; otherwise, it returns
false.
The active model is not changed by this method.
If feasOpt finds a feasible solution,
it returns the solution and the corresponding objective
in terms of the original model.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptionvars - An array of modeling variables. Relaxation preference
values for these variables can be specified in arrays
varlb and varub. This array
may be null, in which case no variable bounds
are allowed to be relaxed.varlb - An array of doubles specifying the preference value
for relaxing the lower bound of the modeling variables
listed in the argument vars. Element
varlb[i] specifies the preference value
for relaxing the lower bound of variable
vars[i]. This array may be
null,
in which case no variable lower bounds
are allowed to be relaxed.varub - An array of doubles specifying the preference value
for relaxing the upper bound of the modeling variables
listed in the argument vars. Element
varub[i] specifies the preference value
for relaxing the upper bound of variable
vars[i]. This array may be
null,
in which case no variable upper bounds
are allowed to be relaxed.true if a relaxation is found; false otherwise.public boolean feasOpt(IloRange[] rngs, double[] rnglb, double[] rngub) throws IloException
rngs.
On successful completion, the
method installs a solution vector that is feasible for the
minimum-cost relaxation.
This solution can be queried with conventional query methods, such as
IloCplex.getValue.
The method feasOpt provides several different
metrics for determining what constitutes a minimum-cost relaxation.
The metric is specified by the parameter FeasOptMode.
The method feasOpt can also optionally perform a second
optimization phase where the original objective is optimized,
subject to the constraint that the associated relaxation must
have the same cost as the minimum-cost relaxation computed in the first
phase. See
IloCplex.Relaxation
for further information.
The user may specify numeric values to express relative preferences
for relaxing bounds. A larger preference value
specifies a greater willingness to relax the corresponding bound.
Internally, feasOpt uses the
reciprocal of the preference value to weight the
relaxations of the associated bounds in the phase one cost function.
A negative or 0 (zero) value specifies that the corresponding bound must
not be relaxed.
These preference values are entered in the arguments
rnglb and rngub.
If enough constraints were allowed to be relaxed, the
function will return true; otherwise, it returns
false.
The active model is not changed by this method.
If feasOpt finds a feasible solution,
it returns the solution and the corresponding objective
in terms of the original model.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptionrngs - An array of ranged constraints. Relaxation preference
values for these ranges can be specified in arrays
rnglb and rngub. This array
may be null, in which case no range bounds
are allowed to be relaxed.
Only constraints directly added to the model can be
specified.rnglb - An array of doubles specifying the preference value
for relaxing the lower bound of the ranged constraints
listed in the argument rngs. Element
rnglb[i] specifies the preference value
for relaxing the lower bound of constraint
rngs[i]. This array may be
null, in which case no range lower bounds
are allowed to be relaxed.rngub - An array of doubles specifying the preference value
for relaxing the upper bound of the ranged constraints
listed in the argument rngs. Element
rngub[i] specifies the preference value
for relaxing the upper bound of constraint
rngs[i]. This array may be
null, in which case no range upper bounds
are allowed to be relaxed.true if a relaxation is found; false otherwise.public IloNumVarBound bound(IloNumVar var, IloNumVarBoundType type)
IloNumVarBound
to represent the specified bound of the variable var.public IloNumVarBound lowerBound(IloNumVar var)
IloNumVarBound
to represent the lower bound of the variable var.public IloNumVarBound upperBound(IloNumVar var)
IloNumVarBound
to represent the upper bound of variable var.public boolean refineConflict(IloConstraint[] cons, double[] prefs) throws IloException
The method refineConflict tries to compute a
minimal conflict for the infeasibility of the current model or for
a subset of the constraints of the current model.
If this computation is successful,
(that is, it runs to completion; it is not interrupted by the user's
application nor limited by a user-specified restriction of time or
other resources), then the conflict can be accessed by means of the
method getConflict as a minimal set of
constraints that are still infeasible. Removal of any of these constraints
will remove that particular cause for infeasibility. However, if
other infeasible sets still exist in the model, then that removal
from the model of any of the constraints in the returned set
does not guarantee feasibility of the remaining model.
Constraints can be considered in groups
organized by IloAnd constructed with
IloMPModeler.and.
If any constraint in a group
participates in the conflict, the entire group is determined to do so.
No further detail about the constraints within that group is returned.
A group or constraint may be assigned a preference. A constraint with a higher preference is more likely to be included in the conflict. However, no guarantee is made when a conflict is returned that other infeasible sets containing groups or constraints with a higher preference may exist.
To check whether the bounds of a variable cause a conflict, use
instances of the class ilog.concert.IloNumVarBound
to specify the upper and lower bounds of the variable in question.
Use those bounds like constraints among the arguments you pass to
refineConflict.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptioncons - An array of constraints. They may be IloRange
or IloAnd constructs on a set of ranges.
Only constraints directly added to the model can be
specified.
If a constraint does not appear in this array, the constraint
is assigned a default preference value of 0 (zero).
As a consequence, such constraints
are included in the conflict without any analysis.
prefs - An array containing the preferences for the
groups or constraints. prefs[i] specifies the
preference for the group or constraint i. A
negative value specifies that the corresponding group or
constraint should not be considered for
finding a conflict. In other words,
such groups are considered not to be part of the
model. Groups with a preference of 0 (zero) are always
considered to be part of the conflict. No further
checking is performed on such groups.
public boolean refineConflict(IloConstraint[] cons, double[] prefs, int start, int num) throws IloException
This method resembles
refineConflict(ilog.concert.IloConstraint[], double[])
but considers only
num constraints, starting at the index specified by
start.
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
IloExceptionpublic boolean refineMIPStartConflict(int mipstartindex,
IloConstraint[] cons,
double[] prefs)
throws IloException
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
When the MIP start was added to the current model, an effort level may have been associated with it to specify to CPLEX how much effort to expend in transforming the MIP start into a feasible solution. This method respects effort levels except level 1 (one): check feasibility. It does not check feasibility. Instead, CPLEX increases the effort level to 2 in order to solve the fixed model.
When this method returns, you can query the conflict with the method
IloCplex.getConflict
and write the conflict to a file in LP format with the method
writeConflict.
IloCplex.writeConflict.
IloExceptionmipstartindex - The index identifying the MIP start among all
the MIP starts associated with the current problem.cons - An array of constraints for the conflict refiner to examine.prefs - An array containing the preferences for the
groups or constraints. prefs[i] specifies the
preference for the group or constraint i. A
negative value specifies that the corresponding group or
constraint should not be considered for
finding a conflict. In other words,
such groups are considered not to be part of the
model. Groups with a preference of 0 (zero) are always
considered to be part of the conflict. No further
checking is performed on such groups.
public boolean refineMIPStartConflict(int mipstartindex,
IloConstraint[] cons,
double[] prefs,
int start,
int num)
throws IloException
The parameters CutUp, CutLo,
ObjULim, ObjLLim do not influence this method.
If you want to study infeasibilities introduced by those parameters,
consider adding an objective function constraint to your model to
enforce their effect before you invoke this method.
When the MIP start was added to the current model, an effort level may have been associated with it to specify to CPLEX how much effort to expend in transforming the MIP start into a feasible solution. This method respects effort levels except level 1 (one): check feasibility. It does not check feasibility.
IloExceptionmipstartindex - The index identifying the MIP start among all
the MIP starts associated with the current problem.cons - An array of constraints for the conflict refiner to examine.prefs - An array containing the preferences for the
constraints. prefs[i] specifies the
preference for the constraint i. A
negative value specifies that the corresponding
constraint should not be considered for
finding a conflict. In other words,
such constraints are considered not to be part of the
MIP start. Constraints with a preference of 0 (zero)
are always
considered to be part of the conflict. No further
checking is performed on such constraints.
start - An index into the two arrays. It designates the beginning
of the range of constraints to consider.num - The number of constraints participating in the range.public IloCplex.ConflictStatus[] getConflict(IloConstraint[] cts) throws IloException
refineConflict and returns the status of the constraints
in the array cts.
The constraints passed in cts must be among the same
constraints that have previously been passed to
refineConflict.
IloExceptioncts.public IloCplex.ConflictStatus getConflict(IloConstraint ct) throws IloException
refineConflict and returns the conflict status for the
constraint ct.
The possible status is one of the following values:
IloCplex.Excluded the constraint has been
proven not to participate in the conflict.
IloCplex.ConflictMember the constraint has been
proven to participate in the conflict.
IloCplex.ConflictPossibleMember the constraint
not been proven not to participate in the conflict;
that is, it might participate, it might not.
The constraint ct must be one that has
previously been passed to refineConflict.
IloExceptionpublic IloCplex.ConflictStatus[] getConflict(IloConstraint[] cts, int start, int num) throws IloException
refineConflict and returns the conflict status
of num consecutive constraints in the
array cts.
The constraints passed in cts must be among the same
constraints that have previously been passed to
refineConflict.
IloExceptioncts - The array of constraints in the conflict.start - The index of the first constraint.num - The number of consecutive elements in
the array, starting from the element specified
by start.public void getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix)
throws IloException
IloExceptionlblower - lblower[j] will contain the lowest value
that the lower bound of the variable corresponding to
column j of matrix
can be set to without affecting the optimality of the
basis. If this information is not required,
null may be passed. Otherwise, the length
of the array must be at least the number of columns in
the matrix.lbupper - lbupper[j] will contain the highest value
that the lower bound of the variable corresponding to
column j of matrix can be set
to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the length of the array must
be at least the number of columns in the matrix.ublower - ublower[j] will contain the lowest value
that the upper bound of the variable corresponding to
column j of matrix can be set
to without affecting the optimality of the basis. If
this information is not required null may
be passed. Otherwise, the length of the array must be
at least the number of columns in the matrix.ubupper - ubupper[j] will contain the highest value
that the upper bound of the variable corresponding to
column j of matrix can be set
to without affecting the optimality of the basis. If
this information is not required null may
be passed. Otherwise, the length of the array must be
at least the number of columns in the matrix.matrix - The LP matrix for the columns for which the bound
sensitivity analysis is to be computed.public void getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix,
int start,
int num)
throws IloException
num consecutive variables, starting from
the index specified by start,
in the specified LP matrix.IloExceptionlblower - lblower[j] will contain the lowest
value that the lower bound of the variable corresponding
to column j+start of matrix
can be set to without affecting the optimality of the
basis. If this information is not required,
null may be passed. Otherwise, the length
of the array must be at least num.lbupper - lbupper[j] will contain the highest
value that the lower bound of the variable corresponding
to column j+start of
matrix can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the length of the array must
be at least num.ublower - ublower[j] will contain the lowest
value that the upper bound of the variable corresponding
to column j+start of
matrix can
be set to without affecting the optimality of the basis.
If this information is not required,
null may
be passed. Otherwise, the length of the array must be
at least num.ubupper - ubupper[j] will contain the highest
value that the upper bound of the variable corresponding
to column j+start of
matrix can
be set to without affecting the optimality of the basis.
If this information is not required,
null may
be passed. Otherwise, the length of the array must be
at least num.matrix - The LP matrix for the columns for which the bound
sensitivity analysis is to be computed.start - The index of the first column of the matrix for which
bound sensitivity analysis is returned.num - The number of consecutive columns in matrix
for which to return
bound sensitivity analysis.public void getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloNumVar[] var)
throws IloException
vars.IloExceptionlblower - lblower[j] will contain the lowest value
the lower bound of variable var[j] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as var.lbupper - lbupper[j] will contain the highest value
the lower bound of variable var[j] can be
set to without affecting the optimality of the basis.
If
this information is not required, null may
be passed. Otherwise, the array must have at least the
same length as var.ublower - ublower[j] will contain the lowest value
the upper bound of variable var[j] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as var.ubupper - ubupper[j] will contain the highest value
the upper bound of variable var[j] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as var.var - An array containing the variables for which to return
bound sensitivity analysis.public void getBoundSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloNumVar[] var,
int start,
int num)
throws IloException
num consecutive variables, starting from the index
specified by start, in the array var.IloExceptionlblower - lblower[j] will contain the lowest value
the lower bound of variable
var[j+start] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.lbupper - lbupper[j] will contain the highest value
to which the lower bound of variable
var[j+start] can be set
without affecting the optimality of the basis.
If this information is not required,
null may
be passed. Otherwise, the array must have at least
length num.ublower - ublower[j] will contain the lowest value
to which the upper bound of the variable
var[j+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.ubupper - ubupper[j] will contain the highest value
to which the upper bound of variable
var[j+start] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.var - An array containing the variables for which to return
bound sensitivity analysis.start - The index of first variable in var for
which to return bound sensitivity analysis.num - The number of consecutive variables
in var for which
to return bound sensitivity analysis.public void getObjSA(double[] lower,
double[] upper,
IloLPMatrix matrix)
throws IloException
IloExceptionlower - lower[j] is the lowest value to which the
objective coefficient for the variable corresponding to
column j of matrix can be set
without affecting the optimality of the basis. If this
information is not required null may be
passed. Otherwise, the array must have a length at least
equal to the number of columns in the
matrix.upper - upper[j] is the highest value to which the
objective coefficient of the variable corresponding to
of column j of matrix that
can be set without affecting the optimality of the
basis. If this information is not required,
null may be passed. Otherwise, the array
must have a length at least equal to the number of
columns in the matrix.matrix - The LP matrix which contains the column for which
objective sensitivity analysis will be
returned.public void getObjSA(double[] lower,
double[] upper,
IloLPMatrix matrix,
int start,
int num)
throws IloException
num consecutive columns of the specified LP matrix.IloExceptionlower - lower[j] will contain the lowest value to
which the objective coefficient of the variable
corresponding to column j+start of
matrix that can be set, without affecting
the optimality of the basis. If this information is not
required, null may be passed.
Otherwise, the
array must have at least length num.upper - upper[j] will contain the highest value to
which the objective coefficient of the variable
corresponding to column j+start of
matrix that can be set, without affecting
the optimality of the basis. If this information is not
required, null may be passed. Otherwise,
the array must have at least length num.matrix - The LP matrix which contains the column for which
objective sensitivity analysis is to be
returned.start - The index of the first column of matrix for
which to return objective sensitivity analysis
information.num - The number of consecutive
columns of matrix for which
to return objective sensitivity analysis.public void getObjSA(double[] lower,
double[] upper,
IloNumVar[] var)
throws IloException
IloExceptionlower - lower[j] will contain the lowest value to
which the objective coefficient of the variable
var[j] can be set without affecting the
optimality of the basis. If this information is not
required, null may be passed.
Otherwise, the
array must have a length at least equal to the length
of the array var.upper - upper[j] will contain the highest value to
which the objective coefficient of the variable
var[j] can be set without affecting the
optimality of the basis. If this information is not
required, null may be passed. Otherwise,
the array must have a length at least equal
to the length
of the array var.var - An array containing the variables for which objective
sensitivity analysis will be returned.public void getObjSA(double[] lower,
double[] upper,
IloNumVar[] var,
int start,
int num)
throws IloException
num consecutive variables, starting
at the index specified by start.IloExceptionlower - lower[j] will contain the lowest value to
which the objective coefficient of the variable
var[j+start] can be set without affecting
the optimality of the basis. If this information is not
required, null may be passed. Otherwise,
the array must have at least length num.upper - uppper[j] will contain the highest value to
which the objective coefficient of the variable
var[j+start] can be set without affecting
the optimality of the basis. If this information is not
required, null may be passed. Otherwise,
the array must have at least length num.var - An array containing the variables for which objective
sensitivity analysis will be returned.start - The index of first variable in var for
which objective sensitivity analysis will
be returned.num - The number of consecutive variables
in var for which
objective sensitivity analysis will be
returned.public void getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloRange[] rng)
throws IloException
rng.IloExceptionlblower - lblower[i] will contain the lowest value to
which the lower bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as rng.lbupper - lbupper[i] will contain the highest value to
which the lower bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as rng.ublower - ublower[i] will contain the lowest value to
which the upper bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as rng.ubupper - ubupper[i] will contain the highest value to
which the upper bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as rng.rng - An array containing the constraints for which the
sensitivity information is requested.public void getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloRange[] rng,
int start,
int num)
throws IloException
num consecutive range constraints in the array
rng, starting with the index specified by
rng[start].IloExceptionlblower - lblower[i] will contain the lowest value to
which the lower bound of range
rng[i+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.lbupper - lbupper[i] will contain the highest value to
which the lower bound of range
rng[i+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.ublower - ublower[i] will contain the lowest value to
which the upper bound of range
rng[i+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.ubupper - ubupper[i] will contain the highest value to
which the upper bound of range
rng[i+start] can
be set to without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.rng - An array containing the constraints for which the
sensitivity information is requested.start - The index of the first constraints in rng
for which the sensitivity information is requested.num - The number of consecutive constraints
in rng for which
the sensitivity information is requested.public void getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix,
int start,
int num)
throws IloException
num rows of the LP matrix
matrix starting with row start.IloExceptionlblower - lblower[i] will contain the lowest value to
which the lower bound of the constraint corresponding
to row i+start of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.lbupper - lbupper[i] will contain the highest value to
which the lower bound of the constraint corresponding
to row i+start of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.ublower - ublower[i] will contain the lowest value to
which the upper bound of the constraint corresponding
to row i+start of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.ubupper - ubupper[i] will contain the highest value to
which the upper bound of the constraint corresponding
to row i+start of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.matrix - The LP matrix for rows of which sensitivity analysis
information is to be computed.start - The first row of matrix for which
sensitivity analysis is to be computed.num - The number of consecutive rows
of matrix for which
sensitivity analysis is to be computed.public void getRangeSA(double[] lblower,
double[] lbupper,
double[] ublower,
double[] ubupper,
IloLPMatrix matrix)
throws IloException
matrix.IloExceptionlblower - lblower[i] will contain the lowest value to
which the lower bound of the constraint corresponding
to row i of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the length of the array must
be at least equal to the number of rows in
matrix.lbupper - lbupper[i] will contain the highest value to
which the lower bound of the constraint corresponding
to row i of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the length of the array must
be at least equal to the number of rows in
matrix.ublower - ublower[i] will contain the lowest value to
which the upper bound of the constraint corresponding
to row i of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the length of the array must
be at least equal to the number of rows in
matrix.ubupper - ubupper[i] will contain the highest value to
which the upper bound of the constraint corresponding
to row i of matrix
can be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length equal to the number of rows in
matrix.matrix - The LP matrix for rows of which sensitivity analysis
information is to be computed.public void getRHSSA(double[] lower,
double[] upper,
IloRange[] rng)
throws IloException
The returned bounds represent the interval in which both
bounds can simultaneously be moved without affecting the solution. This
is useful for equality constraints, that is, ranged constraints where the
upper and lower bound match. In this case, the returned bounds specify
within which interval the value b for a constraint in the form a'x = b
can be moved. It is not possible to obtain this information from
getRangeSA, since both bounds are moved independently.
IloExceptionlower - lower[i] will contain the lowest value to
which the lower bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
the same length as rng.upper - upper[i] will contain the highest value to
which the lower bound of range rng[i] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed.
Otherwise, the array must have at least the same length
as rng.rng - An array containing the constraints for which the
sensitivity analysis is requested.public void getRHSSA(double[] lower,
double[] upper,
IloRange[] rng,
int start,
int num)
throws IloException
num
constraints, starting from the index specified by start.
The returned bounds represent the interval in which both
bounds can simultaneously be moved without affecting the solution. This
is useful for equality constraints, that is, ranged constraints where the
upper and lower bound match. In this case, the returned bounds specify
within which interval the value b for a constraint in the form a'x = b
can be moved. It is not possible to obtain this information from
getRangeSA, since both bounds are moved independently.
IloExceptionlower - lower[i] will contain the lowest value to
which the lower bound of rng[i+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
num.upper - upper[i] will contain the highest value to
which the lower bound of rng[i+start] can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.rng - An array containing the constraints for which the
sensitivity analysis is requested.start - The first element in rng for which the
sensitivity analysis is requestednum - The number of consecutive elements
in rng for which
the sensitivity analysis is requested.public void getRHSSA(double[] lower,
double[] upper,
IloLPMatrix matrix)
throws IloException
The returned bounds represent the interval in which both
bounds can simultaneously be moved without affecting the solution. This
is useful for equality constraints, that is, ranged constraints where the
upper and lower bound match. In this case, the returned bounds specify
within which interval the value b for a constraint in the form a'x = b
can be moved. It is not possible to obtain this information using
getRangeSA, since both bounds are moved independently.
IloExceptionlower - lower[i] will contain the lowest value to
which the lower bound of the constraint corresponding
to row i of matrix can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
a length equal to the number of rows in
matrix.upper - upper[i] will contain the highest value to
which the lower bound of the constraint corresponding
to row i of matrix can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed.
a length equal to the number of rows in
matrix.matrix - The matrix for the rows of which
the sensitivity analysis is requested.public void getRHSSA(double[] lower,
double[] upper,
IloLPMatrix matrix,
int start,
int num)
throws IloException
num
constraints, corresponding to a range of rows of an LP matrix,
starting from the index specified by start.
The returned bounds represent the interval in which both
bounds can simultaneously be moved without affecting the solution. This
is useful for equality constraints, that is, ranged constraints where the
upper and lower bound match. In this case, the returned bounds specify
within which interval the value b for a constraint in the form a'x = b
can be moved. It is not possible to obtain this information using
getRangeSA, since both bounds are moved independently.
IloExceptionlower - lower[i] will contain the lowest value to
which the lower bound of the constraint corresponding
to row i+start of matrix can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.upper - upper[i] will contain the highest value to
which the lower bound of the constraint corresponding
to row i+start of matrix can
be set without affecting the optimality of the basis.
If this information is not required, null
may be passed. Otherwise, the array must have at least
length num.matrix - The matrix for the rows of which
the sensitivity analysis is requested.start - The first row of matrix for which the
sensitivity analysis is requested.num - The number of consecutive rows
of matrix for which to
sensitivity analysis is requested.public IloCplex.Quality getQuality(IloCplex.QualityType which) throws IloException
IloCplex.Quality that contains
the requested quality measure.
A solution, though not necessarily a feasible or optimal solution, must be available in the CPLEX problem object for any quality measure except kappa statistics. You can query kappa statistics in the absence of a solution, but to do so, the following conditions must hold:
IloCplex.Param.MIP.Strategy.KappaStats
must be turned on.
Otherwise, (that is, if those conditions do not hold) CPLEX
raises an exception returning
the error CPXERR_NO_KAPPASTATS specifying that no kappa
statistics are available.
IloExceptionwhich - The IloCplex.QualityType which should be
computed.IloCplex.Quality
for the requested quality measure.IloCplex.Quality,
IloCplex.QualityTypepublic IloCplex.Quality getQuality(IloCplex.QualityType which, int soln) throws IloException
IloCplex.Quality that contains
the requested quality measure for a solution in the solution pool.IloExceptionwhich - The IloCplex.QualityType which should be
computed.soln - The index of the solution pool member for which to
evaluate the quality measure. A value of
IloCplex.IncumbentId specifies
that the quality measure should correspond to the
incumbent rather than a member of the solution pool.IloCplex.Quality
for the requested quality measure.IloCplex.Quality,
IloCplex.QualityTypepublic java.io.PrintStream output()
IloCplex object.
This stream is used by IloCplex for printing logging
information. It can be set with the method
setOut.
IloCplex object.setOut(java.io.OutputStream)public java.io.PrintStream warning()
IloCplex
object.
This stream is used by IloCplex for printing
warnings. It can be set with the method
setWarning.
IloCplex object.setWarning(java.io.OutputStream)public void setOut(java.io.OutputStream s)
IloCplex
object.
After this call, all logging output will be output via the new
stream. Passing null as the new output stream will turn off
all logging output.
s - The new default output stream.public void setWarning(java.io.OutputStream s)
IloCplex object.
After this call, all warnings will be output via the new stream. Passing
null as the new output stream will turn off all warnings.s - The new warning output stream.public void basicPresolve(IloNumVar[] vars, double[] redlb, double[] redub, IloRange[] rngs, boolean[] redundant) throws IloException
This method can be used to compute tighter bounds for the
variables of a model and to detect redundant constraints in the
model extracted to the invoking IloCplex object. For
every variable specified by the argument vars, this
method will return possibly tightened bounds in the corresponding
elements of redlb and redub. Similarly,
for every constraint specified by the argument rngs,
this method will return a boolean value reporting whether or not
the constraint is redundant in the model in the corresponding
element of redundant.
The output arrays redlb and redub must
have lengths greater than or equal to the length of the input array
vars. Similarly, the output array rstat
must have a length greater than or equal to the the length of the
input array rngs.
For a semicontinuous or semi-integer variable, this method produces the lower bound of the variable, not the semicontinuous or semi-integer lower bound. If this method produces a lower bound less than or equal to zero, then the variable persists as a semicontinuous or semi-integer variable. In contrast, if this method produces a lower bound strictly greater than zero, then basic presolve has concluded that zero can be eliminated from the domain of the variable. Consequently, it is possible to change the type of the variable from semicontinuous to continuous or from semi-integer to integer. Afterwards, you can use the tightened bound without affecting the feasible region of the model.
IloExceptionvars - The variables to query for possibly tightened bounds.redlb - The possibly tightened lower bounds.redub - The possibly tightened upper bounds.rngs - The constraints to query for redundancy.redundant - The boolean values reporting redundancy.public boolean solve()
throws IloException
IloExceptionfalse
is returned, a feasible solution may still be present, but
IloCplex has not been able to prove its feasibility.public boolean solve(IloCplex.ParameterSet[] paramsets) throws IloException
This method solves the model currently extracted to the invoking
IloCplex object using the multi-objective optimizer using
the provided IloCplex.ParameterSets for solving the submodels.
For more detailed information see the C routine
CPXXmultiobjopt, documented in the Callable
Library (C API) Reference Manual.
IloExceptiontrue if it finds a solution (not necessarily
an optimal one).IloCplex.ParameterSetpublic boolean solveFixed()
throws IloException
The fixed model is generated from a MIP problem, and a solution to it, by fixing all integer variables to their solution values.
A call to this method causes CPLEX to view the extracted MIP
model as a continuous model, so that you can obtain
information normally available
for a continuous solution but normally unavailable for MIP models.
CPLEX views the model as continuous until a call to
another method restores the model as a MIP. For example, a call to
IloCplex.solve
restores the model back to MIP and solves
the model immediately, provided the advanced start parameter has
not been disabled.
IloExceptionfalse
is returned a feasible solution may still be present, but
IloCplex has not been able to prove its feasibility.public boolean solveFixed(int soln)
throws IloException
The fixed model is generated from a MIP problem, and a solution to it, by fixing all integer variables to their solution values.
A call to this method causes CPLEX to view the extracted MIP
model as a continuous model, so that you can obtain
information normally available
for a continuous solution but normally unavailable for MIP models.
CPLEX views the model as continuous until a call to
another method restores the model as a MIP. For example, a call to
IloCplex.solve
restores the model back to MIP and solves
the model immediately, provided the advanced start parameter has
not been disabled.
IloExceptionsoln - The index of the solution pool member to use in
generating the fixed model. A value of
IloCplex.IncumbentId specifies
that the fixed model should correspond to the
incumbent rather than a member of the solution pool.false
is returned a feasible solution may still be present, but
IloCplex has not been able to prove its feasibility.public int tuneParam()
throws IloException
The parameter TuningRepeat specifies how many
problem variations to try while tuning. Using a number of
variations can give more robust results when tuning is applied
to a single model.
The TuningMeasure is meaningful only when
TuningRepeat is more than one.
The following parameters control the tuning process and all other parameter settings are ignored.
TiLim:
Limits the total time spent tuningDetTiLim:
Limits the total deterministic time spent tuningTuningTiLim:
Limits the time of each trial runTuningMeasure:
Specifies how to compare tuning resultsTuningRepeat:
Controls the number of problem variations to useTuningDisplay:
Controls the level of the tuning displayAll callbacks, except the tuning callback, will be ignored.
Tuning will monitor the method IloCplex.Aborter.abort
and terminate when an abort has been issued, even in different
threads.
IloExceptionpublic int tuneParam(IloCplex.ParameterSet fixedset) throws IloException
The parameter TuningRepeat specifies how many
problem variations to try while tuning. Using a number of
variations can give more robust results when tuning is applied
to a single model.
The TuningMeasure is meaningful only when
TuningRepeat is more than one.
The following parameters control the tuning process and all other parameter settings are ignored.
TiLim:
Limits the total time spent tuningDetTiLim:
Limits the total deterministic time spent tuningTuningTiLim:
Limits the time of each trial runTuningMeasure:
Specifies how to compare tuning resultsTuningRepeat:
Controls the number of problem variations to useTuningDisplay:
Controls the level of the tuning displayAll callbacks, except the tuning callback, will be ignored
Tuning will monitor the method IloCplex.Aborter.abort
and terminate when an abort has been issued, even in
different threads.
IloExceptionfixedset - The parameters and their values which should
not be changed by tuning.public int tuneParam(java.lang.String[] filenames)
throws IloException
The following parameters control the tuning process and all other parameter settings are ignored.
TiLim:
Limits the total time spent tuningDetTiLim:
Limits the total deterministic time spent tuningTuningTiLim:
Limits the time of each trial runTuningMeasure:
Specifies how to compare tuning resultsTuningDisplay:
Controls the level of the tuning displayAll callbacks, except the tuning callback, will be ignored.
Tuning will monitor the method IloCplex.Aborter.abort
and terminate when an abort has been issued, even in
different threads.
IloExceptionfilenames - An array of fully-qualified file names
of the models to be tuned.public int tuneParam(java.lang.String[] filenames,
IloCplex.ParameterSet fixedset)
throws IloException
The following parameters control the tuning process and all other parameter settings are ignored.
TiLim:
Limits the total time spent tuningDetTiLim:
Limits the total deterministic time spent tuningTuningTiLim:
Limits the time of each trial runTuningMeasure:
Specifies how to compare tuning resultsTuningDisplay:
Controls the level of the tuning displayAll callbacks, except the tuning callback, will be ignored.
Tuning will monitor the method IloCplex.Aborter.abort
and terminate when an abort has been issued, even in
different threads.
IloExceptionfilenames - An array of fully-qualified file names
of the models to be tuned.fixedset - The parameters and their values which should
not be changed by tuning.public long getNiterations64()
public long getNphaseOneIterations64()
public long getNbarrierIterations64()
public long getNsiftingIterations64()
public long getNsiftingPhaseOneIterations64()
public long getNcrossDExch64()
public long getNcrossDPush64()
public long getNcrossPExch64()
public long getNcrossPPush64()
public int getNiterations()
public int getNphaseOneIterations()
public int getNbarrierIterations()
public int getNsiftingIterations()
public int getNsiftingPhaseOneIterations()
public int getNcrossDExch()
public int getNcrossDPush()
public int getNcrossPExch()
public int getNcrossPPush()
public int getNdualSuperbasics()
public int getNprimalSuperbasics()
public int getNnodes()
public int getNnodesLeft()
public int getIncumbentNode()
public long getNnodes64()
public long getNnodesLeft64()
public long getIncumbentNode64()
public int getNcuts(int which)
throws IloException
which, see the enumeration
IloCplex.CutType.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.which - The type of cut to count.IloCplex.CutTypepublic void setPriority(IloNumVar var, int pri) throws IloException
var.
During branching, integer
variables with higher priorities are given preference over integer
variables with lower priorities. Further, variables that have priority
assigned to them are given preference over variables that do not.
Branching priorities must be nonnegative integers. By default,
the priority of a variable without a user-assigned priority is 0 (zero).
To remove a user-assigned priority from a variable, use the method
IloCplex.delPriority.
The parameter MIPOrdInd by default specifies that
user-assigned priority orders should be taken into account.
When MIPOrdInd is reset to its nondefault value
0 (zero), CPLEX ignores user-assigned priorities.
For more detail about how
priorities are applied, see the topic Issuing Priority Orders
in the CPLEX User's Manual.
IloExceptionvar - The variable whose priority value is being set.pri - The priority value to set for the variable var.public void setPriorities(IloNumVar[] var, int[] pri) throws IloException
During branching, integer
variables with higher priorities are given preference over integer
variables with lower priorities. Further, variables that have priority
assigned to them are given preference over variables that do not.
Branching priorities must be nonnegative integers. By default,
the priority of a variable without a user-assigned priority is 0 (zero).
To remove a user-assigned priority from a variable, use the method
IloCplex.delPriorities.
The parameter MIPOrdInd by default specifies that
user-assigned priority orders should be taken into account.
When MIPOrdInd is reset to its nondefault value
0 (zero), CPLEX ignores user-assigned priorities.
For more detail about how
priorities are applied, see the topic Issuing Priority Orders
in the CPLEX User's Manual.
IloExceptionvar - An array of variables whose priority values are being set.pri - The array of priority values to use. The priority for
variable var[j] will be set to
pri[j].public void setPriorities(IloNumVar[] var, int[] pri, int start, int num) throws IloException
num consecutive variables,
starting from the index specified by start.
During branching, integer
variables with higher priorities are given preference over integer
variables with lower priorities. Further, variables that have priority
assigned to them are given preference over variables that do not.
Branching priorities must be nonnegative integers. By default,
the priority of a variable without a user-assigned priority is 0 (zero).
To remove a user-assigned priority from a variable, use the method
IloCplex.delPriorities.
The parameter MIPOrdInd by default specifies that
user-assigned priority orders should be taken into account.
When MIPOrdInd is reset to its nondefault value
0 (zero), CPLEX ignores user-assigned priorities.
For more detail about how
priorities are applied, see the topic Issuing Priority Orders
in the CPLEX User's Manual.
IloExceptionvar - An array containing the variables whose priority
values are being set.pri - An array containing the priority value to use. The
priority for the variable var[j]
will be set to
pri[j], for
j = start, ..., start+num-1.start - The index of the first element in var and
pri to consider.num - The number of consecutive elements
in var and
pri to consider.public void setDirection(IloNumVar var, IloCplex.BranchDirection dir) throws IloException
IloExceptionvar - The variable whose branching direction is being set.dir - The branching direction to set for the variable
var.IloCplex.BranchDirectionpublic void setDirections(IloNumVar[] var, IloCplex.BranchDirection[] brdir) throws IloException
IloExceptionvar - The array of variables whose branching directions are
being set.brdir - The array of branching directions to use. The branching
direction of variable var[j] will be set
to brdir[j].IloCplex.BranchDirectionpublic void setDirections(IloNumVar[] var, IloCplex.BranchDirection[] brdir, int start, int num) throws IloException
num consecutive
variables, starting from the index specified by start.IloExceptionvar - An array containing the variables whose
branching directions are being set.brdir - An array containing the branching directions to use.
The branching direction of variable
var[j]
will be set to brdir[j] for
j = start, ..., start+num-1.start - The first elements in var and
brdir to consider.num - The number of elements in var and
brdir to consider.IloCplex.BranchDirectionpublic void delPriority(IloNumVar var) throws IloException
var.IloExceptionvar - The variable whose branch priority assignment is being
removed.public void delPriorities(IloNumVar[] var) throws IloException
var.IloExceptionvar - The array of variables whose branch priority assignments
are being removed.public void delPriorities(IloNumVar[] var, int start, int num) throws IloException
num
consecutive variables in the array var,
starting with the variable var[start].IloExceptionvar - An array containing the variables whose branch priority
assignments are to be removed.start - The index of the first variable in var from
which the priority order assignment is to be removed.num - The number of consecutive variables
in var from which the
priority order assignments are to be removed.public void delDirection(IloNumVar var) throws IloException
var.IloExceptionvar - The variable whose branching direction
assignment is being removed.public void delDirections(IloNumVar[] var) throws IloException
Removes any existing assignments of branching direction from all the variables in the specified array.
IloExceptionvar - An array of variables whose branching direction
assignments are being removed.public void delDirections(IloNumVar[] var, int start, int num) throws IloException
num
consecutive variables in the array var,
starting with the variable var[start].IloExceptionvar - And array containing the variables from which the branching
direction assignments are to be removed.start - The index of the first variable in var from
which the branching direction assignments are to be removed.num - The number of consecutive variables
in var from which the
branching direction assignments are to be removed.public int getPriority(IloNumVar var) throws IloException
IloExceptionvar - The variable whose branch priority is being queried.var.
The value 0 (zero) specifies the IloCplex default.public int[] getPriorities(IloNumVar[] var) throws IloException
IloExceptionvar - The array of variables whose branch priorities are being
queried.var.
If pri is the array returned by this method,
pri[j] is the branch priority of variable
var[j]. The value 0 (zero)
reports the default IloCplex branch priority.public int[] getPriorities(IloNumVar[] var, int start, int num) throws IloException
num consecutive variables,
starting from the index specified by start.IloExceptionvar - An array containing the variables whose branch priorities
are being queried.start - The index of the first variable in var for
which to query the branch priority.num - The number of consecutive variables
in var for which to
query the branch priorities.pri is the array returned by this method,
pri[j] is the branch priority of variable
var[j+start]. The value 0 (zero)
reports the default IloCplex branch priority.public IloCplex.BranchDirection getDirection(IloNumVar var) throws IloException
This method returns
the branch direction assigned to the variable var
by the method
IloCplex.setDirection.
If no branch direction has been assigned to the variable,
IloCplex.BranchDirection.Global
is returned.
IloExceptionvar - The variable whose branch direction is being queried.var.public IloCplex.BranchDirection[] getDirections(IloNumVar[] var) throws IloException
This method returns
the branch direction assigned
by the method
IloCplex.setDirections
to each variable in the array.
If no branch direction has been assigned to a variable,
IloCplex.BranchDirection.Global
is returned.
IloExceptionvar - An array of variables whose branch directions
are being queried.var.
If dir is the array returned by this method,
dir[j] is the branch direction of variable
var[j].public IloCplex.BranchDirection[] getDirections(IloNumVar[] var, int start, int num) throws IloException
num consecutive
variables, starting from the index specified by var[start].
If no branch direction has been assigned to a variable,
IloCplex.BranchDirection.Global will be returned for it.
IloExceptionvar - The array containing the variables whose
branch directions are being queried.start - The index of the first variable in var for
which to query the branch directions.num - The number of consecutive variables
in var for which to
query the branch directions.dir is the array returned by this method,
dir[j] is the branch direction of variable
var[j+start].public void writeOrder(java.lang.String name)
throws IloException
name.
A priority order file contains the branching direction and branch
priority settings for the variables in the active model.
By convention, the file extension is .ord.
The ORD file format is documented in the
CPLEX File Formats Reference Manual.
IloExceptionname - The name of the file to which the priority order is written.readOrder(java.lang.String)public void writeConflict(java.lang.String name)
throws IloException
name.IloExceptionname - The name of the file to which the conflict is written.public void writeParam(java.lang.String name)
throws IloException
name for all the
CPLEX parameters that are not currently
set at their default.
By convention, the file extension is .prm.
The PRM file format is documented in the
CPLEX File Formats Reference Manual.IloExceptionname - The name of the file to write.readParam(java.lang.String)public void writeBasis(java.lang.String name)
throws IloException
name.
By convention, the file extension is .bas.
The BAS file format is documented in the
CPLEX File Formats Reference Manual.IloExceptionname - The name of the file to write.readBasis(java.lang.String)public void writeSolution(java.lang.String name)
throws IloException
name.
A SOL file can later be read back into CPLEX with the method
readStartInfo.
By convention, the file extension is .sol.
The SOL file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and in the schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to write.readStartInfo(java.lang.String)public void writeSolution(java.lang.String name,
int soln)
throws IloException
name.
A SOL file can later be read back into CPLEX with the method
readStartInfo.
By convention, the file extension is .sol.
The SOL file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and in the schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to write.soln - The index of the solution pool member for which to
write solution values. A value of
IloCplex.IncumbentId specifies
that the values written should correspond to the
incumbent rather than a member of the solution pool.readStartInfo(java.lang.String)public void writeSolutions(java.lang.String name)
throws IloException
name.
By convention, the file extension is .sol.
The SOL file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and in the schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to write.public void writeMIPStarts(java.lang.String name,
int first,
int num)
throws IloException
The level of detail to write to the file is controlled
by setting the IloCplex.IntParam.WriteLevel
parameter.
IloExceptionpublic void writeMIPStarts(java.lang.String name)
throws IloException
By convention, the file extension is .mst.
The MST file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
The level of detail to write to the file is controlled
by setting the IloCplex.IntParam.WriteLevel
parameter.
IloExceptionname - The name of the file to write.public void readOrder(java.lang.String name)
throws IloException
name
and copies the priority order information
into the invoking CPLEX problem object.
The parameter MipOrdInd
must be on (its default setting) for the priority order
to be used to start a subsequent optimization.
The names in the ORD file must match names in the active model.
By convention, the file extension is .ord.
The ORD file format is documented in the
CPLEX File Formats Reference Manual.
IloExceptionname - The name of the file to read.writeOrder(java.lang.String)public void readParam(java.lang.String name)
throws IloException
name and applies them to the invoking object.
Parameters not listed in the parameter file are reset to their default setting.
By convention, the file extension is .prm.
The PRM file format is documented in the
CPLEX File Formats Reference Manual.
IloExceptionname - The name of the file to read.writeParam(java.lang.String)public void readBasis(java.lang.String name)
throws IloException
name,
and copies that basis into the invoking object.
The parameter
AdvInd must not be 0 (zero) for the basis to be used to start
a subsequent optimization.
By convention, the file extension is .bas.
The BAS file format is documented in the
CPLEX File Formats Reference Manual.
IloExceptionname - The name of the file to read.writeBasis(java.lang.String)@Deprecated
public void readSolution(java.lang.String name)
throws IloException
readStartInfo(String) instead.name
and copies this information into the invoking object.
This routine is used to initiate a crossover from a
barrier solution, to restart the simplex method with an advanced
basis, or to specify all the variable values for a MIP start.
The parameter AdvInd must
not be 0 (zero) in order for the solution file to take effect.
For example, its default value, 1 (one) is an appropriate setting.
By convention, the file extension is .sol.
The SOL file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to read.writeSolution(String),
writeSolution(String,int)public void readStartInfo(java.lang.String name)
throws IloException
name and copies this information into the invoking
object.
This routine is used to initiate a crossover from a
barrier solution, to restart the simplex method with an advanced
basis, or to specify all the variable values for a MIP start.
The parameter AdvInd must
not be 0 (zero) in order for the solution file to take effect.
For example, its default value, 1 (one) is an appropriate setting.
By convention, the file extension is .sol.
The SOL file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to read.writeSolution(String),
writeSolution(String,int)public void readMIPStarts(java.lang.String name)
throws IloException
name and
copies the MIP start information into the invoking object.
The parameter AdvInd must not be 0 (zero)
in order for the MIP start information to be used to start
a subsequent optimization.
For example, its default value, 1 (one) is an appropriate setting.
By convention, the file extension is .mst.
The MST file format is documented in the
CPLEX File Formats Reference Manual and in the
stylesheet solution.xsl and schema
solution.xsd in the include
directory of the product. Samples of its use appear in the
examples distributed with the product and in the
CPLEX User's Manual.
IloExceptionname - The name of the file to read.writeMIPStarts(String),
writeMIPStarts(String,int,int)public void use(IloCplex.Callback cb) throws IloException
Callbacks are objects with a user-written method main
that are called regularly during the optimization of the active
model. This object must be implemented as a class derived from a
subclass of IloCplex.Callback class, and the abstract
method main must be implemented for this class.
There are several places where the IloCplex algorithms call
a callback. IloCplex provides several different types of
callbacks, and each is implemented as a specific subclass of
IloCplex.Callback.
IloCplex can use only one callback of a given type at a
time. Thus, when calling method use several times with
callbacks of the same type, only the callback passed at the last call of
method use will be executed during the optimization.
However, callbacks of different types can be used simultaneously.
IloExceptioncb - The callback to be used from now on. The type of the callback
object being passed determines which callback is being installed.
If a callback of the same type has previously been installed,
the new callback will replace the old one.IloCplex.Callbackpublic void remove(IloCplex.Callback cb) throws IloException
use(Callback).
If cb is currently not registered with this instance then
the method returns without doing anything.IloException - if an error occurscb - The callback to remove.public void clearCallbacks()
throws IloException
IloCplex object.IloExceptionpublic IloLinearNumExpr getRay() throws IloException
This is an advanced method.
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method
returns a linear expression representing an unbounded direction for the
active model if it has been proven unbounded by one of the simplex
methods. If a*x + b*y is the returned by this method, it
represents an unbounded direction vector with an x
coordinate of a and y coordinate of
b.
IloExceptionpublic IloCopyable getDiverging()
throws IloException
This method returns the diverging variable or constraint, in a
case where the primal simplex algorithm has determined the problem to be
infeasible. The returned extractable is either an instance of
IloNumVar or an instance of
IloConstraint extracted to the invoking
IloCplex optimizer.
It is of type IloNumVar if the
diverging column corresponds to a variable, or of type
IloConstraint if the diverging column corresponds to the
slack variable of a constraint.
IloExceptionpublic double dualFarkas(IloConstraint[] rng, double[] y) throws IloException
This is an advanced method.
Important:
Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
This method
returns a Farkas proof of infeasibility for the active LP model after
it has been proven to be infeasible by the dual simplex optimizer.
For every constraint i of the active LP this method computes
a value y[i] such that y'A >= y'b, where
A denotes the constraint matrix.
For more detailed information about the Farkas proof of infeasibility,
see the C routine CPXXdualfarkas, documented
in the Callable Library (C API) Reference Manual.
IloExceptionrng - Array of length getNrows where constraints
corresponding to the values in y are returned.y - array of length getNrows.y'b - y'A z for vector
z defined such that z[j] = ub[j] if
y'A[j] > 0 and z[j] = lb[j] if
y'A[j] < 0 for all variables j.public void qpIndefCertificate(IloNumVar[] var, double[] x) throws IloException
When CPLEX solves a QP, the quadratic terms of the objective
function must form a positive semi-definite Q matrix (for a
minimization problem, or negative semi-definite otherwise). If IloCplex
finds this not be true, it will discontinue the optimization. In such
cases, this method can be used to compute assignments to all variables
such that the quadratic term of the objective function evaluates to a
negative value (x'Q x < 0 in matrix terms) to prove the
indefiniteness.
IloExceptionvar - An array of length getNcols where the variables
of the active model are returned.x - An array of length getNcols.
By setting var[j]
to x[j] for all variables, the quadratic term of
the objective function evaluates to a negative value.public void protectVariables(IloNumVar[] var, int start, int num) throws IloCplex.UnknownObjectException, IloException
This is an advanced method. Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
If presolve can fix a variable to a value, the variable is removed, even if the variable is specified in this list of protected variables.
public void protectVariables(IloNumVar[] var) throws IloCplex.UnknownObjectException, IloException
This is an advanced method. Advanced methods typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.
If presolve can fix a variable to a value, it is removed, even if it is specified in the protected list.
public void end()
IloCplex object and the associated objects
created by calls of the methods of the invoking object.
After a call of the method end,
the invoking IloCplex object and
all objects that have been created with it (such as variables and
constraints) can no longer be used. Attempts to use
them subsequently throw the
exception IloCplex.CplexEndedException.
public void close()
IloCplex object and the associated objects
created by calls of the methods of the invoking object.
When we exit the try-with-resources block, this method is invoked
automatically. This will result in a call to
IloCplex.end().
close in interface java.lang.AutoCloseablepublic final IloCplex.Goal and(IloCplex.Goal goal1, IloCplex.Goal goal2)
This goal pushes the argument goals onto the goal stack in reverse order. When the goals are subsequently popped from the goal stack, they will be executed in the order in which they were listed as arguments.
goal1 - A goal to be pushed on the goal stack.goal2 - A goal to be pushed on the goal stack.and goal composed from the goals
passed as arguments.public final IloCplex.Goal and(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3)
This goal pushes the argument goals onto the goal stack in reverse order. When the goals are subsequently popped from the goal stack, they will be executed in the order in which they were listed as arguments.
goal1 - A goal to be pushed on the goal stack.goal2 - A goal to be pushed on the goal stack.goal3 - A goal to be pushed on the goal stack.and goal composed from the goals
passed as arguments.public final IloCplex.Goal and(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4)
This goal pushes the argument goals onto the goal stack in reverse order. When the goals are subsequently popped from the goal stack, they will be executed in the order in which they were listed as arguments.
goal1 - A goal to be pushed on the goal stack.goal2 - A goal to be pushed on the goal stack.goal3 - A goal to be pushed on the goal stack.goal4 - A goal to be pushed on the goal stack.and goal composed from the goals
passed as arguments.public final IloCplex.Goal and(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4, IloCplex.Goal goal5)
This goal pushes the argument goals onto the goal stack in reverse order. When the goals are subsequently popped from the goal stack, they will be executed in the order in which they were listed as arguments.
goal1 - A goal to be pushed on the goal stack.goal2 - A goal to be pushed on the goal stack.goal3 - A goal to be pushed on the goal stack.goal4 - A goal to be pushed on the goal stack.goal5 - A goal to be pushed on the goal stack.and goal composed from the goals
passed as arguments.public final IloCplex.Goal and(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4, IloCplex.Goal goal5, IloCplex.Goal goal6)
This goal pushes the argument goals onto the goal stack in reverse order. When the goals are subsequently popped from the goal stack they will be executed in the order in which they were listed as arguments.
goal1 - A goal to be pushed on the goal stack.goal2 - A goal to be pushed on the goal stack.goal3 - A goal to be pushed on the goal stack.goal4 - A goal to be pushed on the goal stack.goal5 - A goal to be pushed on the goal stack.goal6 - A goal to be pushed on the goal stack.and goal composed from the goals
passed as arguments.public final IloCplex.Goal or(IloCplex.Goal goal1, IloCplex.Goal goal2)
This goal creates one child node for each argument. For each child,
it copies the goal stack of the current node to the child, and then it
pushes the appropriate goal from the argument list onto that
goal stack.
The goal then deactivates the current node, which will cause
IloCplex to pick a new active node from the branch-and-cut
tree to process next.
goal1 - A goal to be used for a child node.goal2 - A goal to be used for a child node.or goal composed from the goals
passed as arguments.public final IloCplex.Goal or(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3)
This goal creates one child node for each argument. For each child,
it copies the goal stack of the current node to the child, and then it
pushes the appropriate goal from the argument list onto that
goal stack.
The goal then deactivates the current node, which will cause
IloCplex to pick a new active node from the branch-and-cut
tree to process next.
goal1 - A goal to be used for a child node.goal2 - A goal to be used for a child node.goal3 - A goal to be used for a child node.or goal composed from the goals
passed as arguments.public final IloCplex.Goal or(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4)
This goal creates one child node for each argument. For each child,
it copies the goal stack of the current node to the child, and then it
pushes the appropriate goal from the argument list onto that
goal stack.
The goal then deactivates the current node, which will cause
IloCplex to pick a new active node from the branch-and-cut
tree to process next.
goal1 - A goal to be used for a child node.goal2 - A goal to be used for a child node.goal3 - A goal to be used for a child node.goal4 - A goal to be used for a child node.or goal composed from the goals
passed as arguments.public final IloCplex.Goal or(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4, IloCplex.Goal goal5)
This goal creates one child node for each argument. For each child,
it copies the goal stack of the current node to the child, and then it
pushes the appropriate goal from the argument list onto that
goal stack.
The goal then deactivates the current node, which will cause
IloCplex to pick a new active node from the branch-and-cut
tree to process next.
goal1 - A goal to be used for a child node.goal2 - A goal to be used for a child node.goal3 - A goal to be used for a child node.goal4 - A goal to be used for a child node.goal5 - A goal to be used for a child node.or goal composed from the goals
passed as arguments.public final IloCplex.Goal or(IloCplex.Goal goal1, IloCplex.Goal goal2, IloCplex.Goal goal3, IloCplex.Goal goal4, IloCplex.Goal goal5, IloCplex.Goal goal6)
This goal creates one child node for each argument. For each child,
it copies the goal stack of the current node to the child, and then it
pushes the appropriate goal from the argument list onto that
goal stack.
The goal then deactivates the current node, which will cause
IloCplex to pick a new active node from the branch-and-cut
tree to process next.
goal1 - A goal to be used for a child node.goal2 - A goal to be used for a child node.goal3 - A goal to be used for a child node.goal4 - A goal to be used for a child node.goal5 - A goal to be used for a child node.goal6 - A goal to be used for a child node.or goal composed from the goals
passed as arguments.public final IloCplex.Goal branchAsCplex()
IloCplex
would in the absence of any goal at the current node.
This
goal allows you to proceed with the built-in search
strategy while retaining the option to intervene at any node.
For example, a goal whose execute method starts with
if (!isIntegerFeasible())
return cplex.and(cplex.branchAsCplex(), this);
would do something different from the built-in IloCplex
search procedure only when an integer feasible solution is found.
public final IloCplex.Goal apply(IloCplex.Goal goal, IloCplex.NodeEvaluator evaluator)
In doing so, it
changes the order of processing of the active nodes of the search tree
defined by goal according to evaluator.
evaluator to the search tree defined by
goal.public final IloCplex.Goal limitSearch(IloCplex.Goal goal, IloCplex.SearchLimit limit)
This method creates and returns a goal that limits the exploration
of the search tree defined by goal, as specified by
limit. All nodes in a subtree that have not
yet been explored when the limit for that subtree is reached
will be discarded.
goal to
search limit limit.public final boolean solve(IloCplex.Goal goal) throws IloException
This method pushes
goal onto the goal stack of the root node of the
branch-and-cut search tree before starting the search. By doing
so, it tells CPLEX to solve the current MIP model
by means of the search strategy
specified by that goal.
IloExceptiongoal - The goal that controls the branch-and-cut search to be
performed.IloCplex.Goalpublic final IloCplex.Goal failGoal()
The node on which the goal is executed will be pruned, thus discarding the subtree rooted at that node.
public final IloCplex.Goal constraintGoal(IloConstraint cut) throws IloException
cut.
When this goal is executed, the constraint will be added to the current node and its descendents as a local cut. Thus, this constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptioncut - The constraint to added to the node and its descendents.cut.public final IloCplex.Goal constraintGoal(IloConstraint[] cut) throws IloException
cut.
When this goal is executed, the constraints will be added to the current node and its descendents as a local cut. Thus, these constraints will be active only in the subtree rooted at the node where the goal was executed.
IloExceptioncut - The constraints to added to the current subtree.cut.public final IloCplex.Goal globalCutGoal(IloConstraint cut) throws IloException
cut.
When this goal is executed, the constraint will be added to the active model as a global cut. This constraint will be respected at every node explored from that point on, not just those in the current subtree.
IloExceptioncut - The constraint to added as a global cut.cut as a global cut.public final IloCplex.Goal globalCutGoal(IloConstraint[] cut) throws IloException
cut.
When this goal is executed, the constraints will be added to the active model as global cuts. These constraints will be respected at every node explored from that point on, not just those in the current subtree.
IloExceptioncut - The constraints to added as global cuts.cut as global cuts.public final IloCplex.Goal solutionGoal(IloNumVar[] vars, double[] vals) throws IloException
When the solution goal
is executed, it attempts to inject the solution specified by
setting the variables listed in vars to the corresponding
values listed in val as a new incumbent.
IloCplex will not blindly accept such a solution. Instead,
it will make sure that this solution is compatible with both the
model and the goals. When checking feasibility with goals, it will
check feasibility with
both goals that have already been executed and goals that are still on the
goal stack. Thus, in particular, IloCplex will reject any
solution that is not compatible with the branching that has been done so
far. It then continues by checking compatibility with the goals still
remaining on the goal stack, including those goals that are created
by them.
Only if the proposed solution remains feasible and has a better objective
value than the current incumbent will it be used to replace the current
incumbent.
IloExceptionvars - An array of variables for which solution values are
specified.vals - The array of solution values for the variables in
vars. Value vals[j] is the
proposed solution value for the variable vars[j].public IloCplex.Goal eqGoal(IloNumExpr expr, double rhs) throws IloException
expr == rhs.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr - The lefthand side expression of the constraint.rhs - The righthand side value of the constraint.public IloCplex.Goal eqGoal(IloNumExpr expr1, IloNumExpr expr2) throws IloException
expr1 == expr2.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr1 - The lefthand side expression of the constraint.expr2 - The righthand side expression of the constraint.public IloCplex.Goal eqGoal(double lhs, IloNumExpr expr) throws IloException
lhs == expr.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionlhs - The lefthand side value of the constraint.expr - The righthand side expression of the constraint.public IloCplex.Goal geGoal(IloNumExpr expr, double rhs) throws IloException
expr >= rhs.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr - The lefthand side expression of the constraint.rhs - The righthand side value of the constraint.public IloCplex.Goal geGoal(IloNumExpr expr1, IloNumExpr expr2) throws IloException
expr1 >= expr2.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr1 - The lefthand side expression of the constraint.expr2 - The righthand side expression of the constraint.public IloCplex.Goal geGoal(double lhs, IloNumExpr expr) throws IloException
lhs >= expr.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionlhs - The lefthand side value of the constraint.expr - The righthand side expression of the constraint.public IloCplex.Goal leGoal(IloNumExpr expr, double rhs) throws IloException
expr <= rhs.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr - The lefthand side expression of the constraint.rhs - The righthand side value of the constraint.public IloCplex.Goal leGoal(IloNumExpr expr1, IloNumExpr expr2) throws IloException
expr1 <= expr2.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionexpr1 - The lefthand side expression of the constraint.expr2 - The righthand side expression of the constraint.public IloCplex.Goal leGoal(double lhs, IloNumExpr expr) throws IloException
lhs >= expr.
When this goal is executed, the constraint will be added to the current node and all its descendents as a local cut. Thus, the constraint will be active only in the subtree rooted at the node where the goal was executed.
IloExceptionlhs - The lefthand side value of the constraint.expr - The righthand side expression of the constraint.public double getSolnPoolMeanObjValue()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public int getSolnPoolNsolns()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public int getSolnPoolNreplaced()
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.public void delSolnPoolSoln(int soln)
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.soln - The index of the solution pool member which is to
be deleted.public void delSolnPoolSolns(int start,
int num)
throws IloException
IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.start - The index of the first solution which
is to be deleted from the solution pool.num - The number of consecutive solutions which are
to be deleted from the solution pool.public IloCplex.FilterIndex addDiversityFilter(double lower_bound, double upper_bound, IloNumVar[] vars, double[] weights, double[] refval)
A diversity filter drives the search for multiple solutions toward new solutions that satisfy a measure of diversity specified in the filter.
This diversity measure applies only to binary variables.
Potential new solutions are compared to a reference set.
You must specify which variables are to be compared.
You do so with the argument vars designating
the indices of variables to include in the diversity measure.
A reference set
is the set of values specified by the argument refval.
You may optionally specify weights (that is, coefficients to form a linear expression in terms of the variables) in the diversity measure; if you do not specify weights, all differences between the reference set and potential new solutions will be weighted by the value 1.0 (one). CPLEX computes the diversity measure by summing the pair-wise weighted absolute differences from the reference values, like this:
differences(x) = sum {weight[i] times |x[vars[i]] - refval[i]|}.
A diversity filter makes sure that the solutions satisfy the constraint:
lower bound <= differences(x) <= upper bound
You may specify both a lower and upper bound on diversity.
In order to say, Give me solutions that are
close to this one, within this specified set of variables,
specify a lower_bound of 0.0 (zero) and a finite
upper_bound.
CPLEX then looks for solutions that differ from the reference
values by at most the value of upper_bound, within
the specified set of variables.
In order to say, Give me solutions that are different
from this one, specify a finite lower_bound
and an infinite (that is, very large) upper_bound
on the diversity.
CPLEX then looks for solutions that differ from the reference values
by at least the value of lower_bound, within the
specified set of variables.
lower_bound - A lower bound on the diversity measure for new solutions allowed in the pool.
upper_bound - An upper bound on the diversity measure for new solutions allowed in the pool.
vars - An array of numeric variables in the diversity measure.
weights - An array of weights corresponding to the variables to be used in the diversity measure. May be NULL, in which case CPLEX uses weights of 1.0 (one).
refval - An array of reference values for the variables in the diversity filter to compare with a solution when CPLEX computes the diversity measure.
The index of the added filter.
public IloCplex.FilterIndex addDiversityFilter(double lower_bound, double upper_bound, IloNumVar[] vars, double[] weights, double[] refval, java.lang.String fname)
A diversity filter drives the search for multiple solutions toward new solutions that satisfy a measure of diversity specified in the filter.
This diversity measure applies only to binary variables.
Potential new solutions are compared to a reference set.
You must specify which variables are to be compared.
You do so with the argument vars designating
the indices of variables to include in the diversity measure.
A reference set
is the set of values specified by the argument refval.
You may optionally specify weights (that is, coefficients to form a linear expression in terms of the variables) in the diversity measure; if you do not specify weights, all differences between the reference set and potential new solutions will be weighted by the value 1.0 (one). CPLEX computes the diversity measure by summing the pair-wise weighted absolute differences from the reference values, like this:
differences(x) = sum {weight[i] times |x[vars[i]] - refval[i]|}.
A diversity filter makes sure that the solutions satisfy the constraint:
lower bound <= differences(x) <= upper bound
You may specify both a lower and upper bound on diversity.
In order to say, Give me solutions that are
close to this one, within this specified set of variables,
specify a lower_bound of 0.0 (zero) and a finite
upper_bound.
CPLEX then looks for solutions that differ from the reference
values by at most the value of upper_bound, within
the specified set of variables.
In order to say, Give me solutions that are different
from this one, specify a finite lower_bound
and an infinite (that is, very large) upper_bound
on the diversity.
CPLEX then looks for solutions that differ from the reference values
by at least the value of lower_bound, within the
specified set of variables.
lower_bound - A lower bound on the diversity measure for new solutions allowed in the pool.
upper_bound - An upper bound on the diversity measure for new solutions allowed in the pool.
vars - An array of numeric variables in the diversity measure.
weights - An array of weights corresponding to the variables to be used in the diversity measure. May be NULL, in which case CPLEX uses weights of 1.0 (one).
refval - An array of reference values for the variables in the diversity filter to compare with a solution when CPLEX computes the diversity measure.
fname - The name of the filter.
The index of the added filter.
public IloCplex.FilterIndex getFilterIndex(java.lang.String s) throws IloException
IloExceptionpublic int getNfilters()
public int getFilterType(IloCplex.FilterIndex i)
public double getDiversityFilterLowerCutoff(IloCplex.FilterIndex i)
public double getDiversityFilterUpperCutoff(IloCplex.FilterIndex i)
public IloNumVar[] getFilterVars(IloCplex.FilterIndex i)
public double[] getDiversityFilterWeights(IloCplex.FilterIndex i)
public double[] getDiversityFilterRefVals(IloCplex.FilterIndex i)
public IloCplex.FilterIndex addRangeFilter(double lb, double ub, IloNumVar[] ind, double[] val)
A range filter drives the search for multiple solutions toward new solutions that satisfy criteria specified as a ranged linear expression in the filter. A range filter sets a lower and an upper bound on a linear expression consisting of designated variables and corresponding designated coefficient weights, like this:
lower bound <= sum{weights[i] times vars[i]} <= upper bound
A range filter applies to variables of any type; that is, binary, general integer, continuous.
lb - Lower bound on the expression defining the filter.
ub - Upper bound on the expression defining the filter.
ind - An array of variables that define the linear expression defining the filter.
val - An array of weights corresponding to the variables and defining the filter. May be NULL, in which case CPLEX uses 1.0 (one) as the coefficient of the variables in the linear expression defining the filter.
The index of the added filter.
public IloCplex.FilterIndex addRangeFilter(double lb, double ub, IloNumVar[] ind, double[] val, java.lang.String fname)
A range filter drives the search for multiple solutions toward new solutions that satisfy criteria specified as a ranged linear expression in the filter. A range filter sets a lower and an upper bound on a linear expression consisting of designated variables and corresponding designated coefficient weights, like this:
lower bound <= sum{weights[i] times vars[i]} <= upper bound
A range filter applies to variables of any type; that is, binary, general integer, continuous.
lb - Lower bound on the expression defining the filter.
ub - Upper bound on the expression defining the filter.
ind - An array of variables that define the linear expression defining the filter.
val - An array of weights corresponding to the variables and defining the filter. May be NULL, in which case CPLEX uses 1.0 (one) as the coefficient of the variables in the linear expression defining the filter.
fname - Name of the filter.
The index of the added filter.
public double getRangeFilterLowerBound(IloCplex.FilterIndex i)
public double getRangeFilterUpperBound(IloCplex.FilterIndex i)
public double[] getRangeFilterCoefs(IloCplex.FilterIndex i)
public void delFilter(IloCplex.FilterIndex i) throws IloException
IloExceptionpublic IloCplex.FilterIndex[] readFilters(java.lang.String filename) throws IloException
For more detail about the format of files containing filters for the solution pool, see the topic FLT in the CPLEX File Formats Reference Manual.
IloExceptionpublic void writeFilters(java.lang.String filename)
throws IloException
For more detail about the format of files containing filters for the solution pool, see the topic FLT in the CPLEX File Formats Reference Manual.
IloExceptionpublic double getCplexTime()
throws IloException
To measure time spent between a starting point and ending point of an operation, take the time stamp at the starting point; take the time stamp at the ending point; subtract the starting time stamp from the ending time stamp to get elapsed time in seconds.
This computation measures either wall clock time (also
known as real time) or CPU time, depending on the setting
of the clock type parameter ClockType.
The absolute value of the time stamp is not meaningful.
IloExceptionpublic double getDetTime()
throws IloException
To measure deterministic time spent between a starting point and ending point of an operation, take the time stamp at the starting point; take the time stamp at the ending point; subtract the starting time stamp from the ending time stamp to get elapsed time in deterministic ticks.
The absolute value of the deterministic time stamp is not meaningful.
IloExceptionpublic int getNumCores()
throws IloException
IloExceptionpublic boolean populate()
throws IloException
In other words, the method populate
populates the solution pool of the model currently extracted by
the invoking IloCplex object. Like the method
solve, this method returns true
if it finds a solution (not necessarily an optimal solution).
The algorithm that populates the solution pool works in two phases:
In the first phase, it solves the model to optimality (or some stopping criterion set by the user) while it sets up a branch and cut tree for the second phase.
In the second phase, it generates multiple solutions by using the information computed and stored in the first phase and by continuing to explore the tree.
The amount of preparation in the first phase and the intensity
of exploration in the second phase are controlled by the solution
pool intensity parameter SolnPoolIntensity.
Optimality is not a stopping criterion for the
populate method.
Even if the optimality gap is zero, this method will still try
to find alternative solutions. The stopping criteria
for populate are these:
SolnPoolLim. This parameter
controls how many solutions are generated before stopping. Its default
value is 20.
TiLim, as in standard MIP optimization.
DetTiLim, as in standard MIP optimization.
NodeLim, as in standard MIP optimization.
populate
stops when it cannot enumerate any more solutions. In particular, if the
user specifies an objective tolerance with the relative or absolute
solution pool gap parameters, populate stops if it
cannot enumerate any more solutions within the specified objective
tolerance. There may exist additional solutions that satisfy the
specified objective tolerance; depending on the solution pool intensity
parameter, populate may or may not enumerate all of them;
according to certain settings of the solution pool intensity parameter,
populate may stop when it has enumerated a subset of
additional solutions satisfying the specified objective tolerance.
Successive calls to populate create solutions
that are stored in the solution pool. However, each call to
populate applies only to the subset of solutions
created in the current call; the call does not affect the solutions
already in the pool. In other words, solutions in the pool are
persistent.
The user may call this routine independently of any MIP optimization of a model. In that case, it carries out the first and second phase itself.
The user may also call populate after
standard MIP optimization.
In the general case, the user reads the model,
calls MIP optimization, then calls populate. The
activity of MIP optimization constitutes the first phase of the
populate algorithm; populate then re-uses the
information computed and stored by MIP optimization and thus
carries out only the second phase.
The method populate does not try to generate
multiple solutions for unbounded MIP models. As soon
as the proof of unboundedness is obtained,
populate stops.
IloExceptionpublic IloCplex.Aborter use(IloCplex.Aborter abort) throws IloException
If another aborter is already being used by the invoking object, then this method overrides the previously used aborter.
IloExceptionpublic IloCplex.Aborter getAborter()
The following example shows how to test whether an aborter is currently in use; that is, how to test for an empty handle.
if (cplex.getAborter().getImpl())
System.out.println("There is an aborter installed.");
else
System.out.println("No aborter installed.");
public void remove(IloCplex.Aborter abort) throws IloException
IloExceptionpublic IloLinearNumExpr getQCDSlack(IloRange rng) throws IloException
This method
returns a linear expression representing the dual slack vector of
the quadratic constraint rng. The returned expression
contains only the nonzero coefficients of the dual slack vector.
IloCplex.UnknownObjectException - The range constraint
rng is not in the
active model.IloException - If the method fails, an exception
of type IloException, or
one of its derived classes, is thrown.rng - The quadratic constraint for which the dual slack vector is
queried.rng.public IloCplex.LongAnnotation newLongAnnotation(java.lang.String name) throws IloException
long.
The newly created annotation has a default value of 0L.
IloException - if the annotation could not be created.name - Name of the the new annotation.public IloCplex.LongAnnotation newLongAnnotation(java.lang.String name, long defval) throws IloException
long.IloException - if the annotation could not be created.name - Name of the the new annotation.defval - Default value for the new annotation.public IloCplex.LongAnnotation findLongAnnotation(java.lang.String name) throws IloException
LongAnnotation called name.IloException - if the annotation could not be found.name - Name of the LongAnnotation to look up.LongAnnotation.public IloCplex.LongAnnotation findLongAnnotation(int num) throws IloException
LongAnnotation number num.
The method never returns null. If num is out
of range, then the returned annotation will not be valid.
IloException - if an error occurs.num - The number of the annotation to fetch.LongAnnotation or an invalid annotation
if num is out of range.public java.lang.String getAnnotationName(IloCplex.LongAnnotation annotation) throws IloException
LongAnnotation.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation to query.annotation.public int getNumLongAnnotations()
throws IloException
LongAnnotations.IloException - if an error occurs.LongAnnotations currently stored in
this instance.public void delAnnotation(IloCplex.LongAnnotation annotation) throws IloException
LongAnnotation.
annotation will be deleted from this instance, and the
annotation will be invalidated.
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to delete.public boolean hasLongAnnotation(java.lang.String name)
throws IloException
LongAnnotation with the specified name exists.IloException - if an error occurs.name - The name of the annotation to look up.true if an annotation with the given name exists,
false otherwise.public long getDefaultValue(IloCplex.LongAnnotation annotation) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.annotation.public long getAnnotation(IloCplex.LongAnnotation annotation, IloNumVar var) throws IloException
IloNumVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.var - The IloNumVar to query.var in annotation.public long getAnnotation(IloCplex.LongAnnotation annotation, IloIntVar var) throws IloException
IloIntVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.var - The IloIntVar to query.var in annotation.public long getAnnotation(IloCplex.LongAnnotation annotation, IloObjective obj) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.obj - The objective to query.obj in annotation.public long getAnnotation(IloCplex.LongAnnotation annotation, IloConstraint con) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.con - The constraint to query.con in annotation.public long[] getAnnotation(IloCplex.LongAnnotation annotation, IloAddable[] items) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.items - The objects for which the values are to be queried.items.public void setAnnotation(IloCplex.LongAnnotation annotation, IloNumVar var, long value) throws IloException
IloNumVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.var - IloNumVar for which to set the value.value - The value to set.public void setAnnotation(IloCplex.LongAnnotation annotation, IloIntVar var, long value) throws IloException
IloIntVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.var - IloIntVar for which to set the value.value - The value to set.public void setAnnotation(IloCplex.LongAnnotation annotation, IloObjective obj, long value) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.obj - Objective for which to set the value.value - The value to set.public void setAnnotation(IloCplex.LongAnnotation annotation, IloConstraint con, long value) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.con - Constraint for which to set the value.value - The value to set.public void setAnnotation(IloCplex.LongAnnotation annotation, IloAddable[] items, long[] values) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set values.items - The objects for which to set annotation values.values - The values to set (in 1-to-1-correspondence with objects in
items).public IloCplex.DoubleAnnotation newDoubleAnnotation(java.lang.String name) throws IloException
double.
The newly created annotation has a default value of 0L.
IloException - if the annotation could not be created.name - Name of the the new annotation.public IloCplex.DoubleAnnotation newDoubleAnnotation(java.lang.String name, double defval) throws IloException
double.IloException - if the annotation could not be created.name - Name of the the new annotation.defval - Default value for the new annotation.public IloCplex.DoubleAnnotation findDoubleAnnotation(java.lang.String name) throws IloException
DoubleAnnotation called name.IloException - if the annotation could not be found.name - Name of the DoubleAnnotation to look up.DoubleAnnotation.public IloCplex.DoubleAnnotation findDoubleAnnotation(int num) throws IloException
DoubleAnnotation number num.
The method never returns null. If num is out
of range, then the returned annotation will not be valid.
IloException - if an error occurs.num - The number of the annotation to fetch.DoubleAnnotation or an invalid annotation
if num is out of range.public java.lang.String getAnnotationName(IloCplex.DoubleAnnotation annotation) throws IloException
LongAnnotation.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation to query.annotation.public int getNumDoubleAnnotations()
throws IloException
LongAnnotations.IloException - if an error occurs.LongAnnotations currently stored in
this instance.public void delAnnotation(IloCplex.DoubleAnnotation annotation) throws IloException
DoubleAnnotation.
annotation will be deleted from this instance, and the
annotation will be invalidated.
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to delete.public boolean hasDoubleAnnotation(java.lang.String name)
throws IloException
DoubleAnnotation with the specified name exists.IloException - if an error occurs.name - The name of the annotation to look up.true if an annotation with the given name exists,
false otherwise.public double getDefaultValue(IloCplex.DoubleAnnotation annotation) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.annotation.public double getAnnotation(IloCplex.DoubleAnnotation annotation, IloNumVar var) throws IloException
IloNumVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.var - The IloNumVar to query.var in annotation.public double getAnnotation(IloCplex.DoubleAnnotation annotation, IloIntVar var) throws IloException
IloIntVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.var - The IloIntVar to query.var in annotation.public double getAnnotation(IloCplex.DoubleAnnotation annotation, IloObjective obj) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.obj - The objective to query.obj in annotation.public double getAnnotation(IloCplex.DoubleAnnotation annotation, IloConstraint con) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.con - The constraint to query.con in annotation.public double[] getAnnotation(IloCplex.DoubleAnnotation annotation, IloAddable[] items) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - The annotation to query.items - The objects for which the values are to be queried.items.public void setAnnotation(IloCplex.DoubleAnnotation annotation, IloNumVar var, double value) throws IloException
IloNumVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.var - IloNumVar for which to set the value.value - The value to set.public void setAnnotation(IloCplex.DoubleAnnotation annotation, IloIntVar var, double value) throws IloException
IloIntVar.java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.var - IloIntVar for which to set the value.value - The value to set.public void setAnnotation(IloCplex.DoubleAnnotation annotation, IloObjective obj, double value) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.obj - Objective for which to set the value.value - The value to set.public void setAnnotation(IloCplex.DoubleAnnotation annotation, IloConstraint con, double value) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set the value.con - Constraint for which to set the value.value - The value to set.public void setAnnotation(IloCplex.DoubleAnnotation annotation, IloAddable[] items, double[] values) throws IloException
java.lang.NullPointerException - if annotation is invalid.IloException - if an error occurs.annotation - Annotation for which to set values.items - The objects for which to set annotation values.values - The values to set (in 1-to-1-correspondence with objects in
items).public void writeAnnotations(java.lang.String filename)
throws IloException
This method writes the annotations of all types currently stored in this instance
to filename.
See the topic Annotating a model for CPLEX in the CPLEX User's Manual for a sample of the header of an annotation file. See the sample UFL_25_35_1 distributed with the product for an example of an annotated model.
IloException - if the file cannot be written.
filename - Name of output file.public void readAnnotations(java.lang.String filename)
throws IloException
See the topic Annotating a model for CPLEX in the CPLEX User's Manual for a sample of the header of an annotation file. See the sample UFL_25_35_1 distributed with the product for an example of an annotated model.
Important: CPLEX deletes existing annotations before CPLEX attempts
to read filename. Consequently,
all currently existing annotations are deleted even if reading fails.
Because indicator constraints are not top-level modeling
objects in Concert, this method ignores annotations
for indicator constraints in filename.
More specifically, upon input, this method resets the annotation
for any indicator constraint to its default value.
IloException - if the file could not be read, was corrupt, or
annotations could not be constructed.
filename - Input file name.public void writeBendersAnnotation(java.lang.String filename)
throws IloException
IloException - if file cannot be written or there is no automatic
Benders decomposition.filename - Name of output file.public void use(IloCplex.Callback.Function callback, long contextMask) throws IloException
callback = null or contextMask = 0
to clear the current callback.
To register a callback invoke this method with callback
argument different from null and a contextMask
different from 0 (zero). The value of contextMask can be the
bitwise OR of values from IloCplex.Callback.Context.Id.
Note: The function will always clear any current callback, even
if setting the new callback fails. Thus at most one callback can be
registered with a single instance of IloCplex.IloException - if an error occurs.callback - The new callback to be set or null to clear
the callback.contextMask - A bitmask that specifies in which contexts to invoke
the callback or 0 (zero) to clear the
callback.public void use(IloModelingAssistance.Callback callback) throws IloException
During optimization, CPLEX will invoke the callback with information
about a particular modeling assistance warning. Call this with
callback = null to clear the current callback. To
register a callback, provide this method with a non-null
callback.
The callback will only be invoked if the CPLEX parameter
IloCplex.Param.Read.DataCheck is set to
IloCplex.DataCheck.Assist. In addition, the
parameter IloCplex.Param.Read.WarningLimit
controls the number of times each type of modeling assistance
warning will be reported (the rest will be ignored). See
CPX_PARAM_DATACHECK and
CPX_PARAM_WARNLIM in the Parameters of CPLEX
Reference Manual.
Note: The function will always clear any current callback, even
if setting the new callback fails. Thus at most one callback can be
registered with a single instance of IloCplex.
IloException - if an error occurs.callback - The new callback to be set or null to clear
the callback.IloModelingAssistance.Callbackpublic IloCplexMultiCriterionExpr staticLex(IloNumExpr[] criteria, double[] weightArray, int[] priorityArray, double[] absTolArray, double[] relTolArray, java.lang.String name) throws IloException
A lexicographic ordering means that any improvement of a criterion with higher priority is more important than any improvement of a lower priority criterion.
All of the arguments, except for criteria will accept
null.
Note: A shallow copy of criteria will be made when passed to
this method. Thus, after calling this method, any modifications to
criteria should be avoided.
IloExceptioncriteria - an array of numerical expressions.weightArray - specifies weights by which to multiply the expression of
the corresponding criterion in criteria. This
argument can be null in which case, the
weights will default to 1.0 (one).priorityArray - each criterion is assigned the priority specified by
the corresponding entry in this array. This argument
can be null, in which case, priorities are
implicitly assigned by the order in which the criteria
are specified in criteria. For example, if
n criteria are passed in, then the first
criterion will be given a priority of n - 1,
the second criterion will be given a priority of
n - 2, and so on, until the last criterion
is given a priority of 0.absTolArray - specifies the absolute tolerance to be used when solving
the corresponding criterion in criteria. This
argument can be null, in which case, the
absolute tolerances will default to 0.0 (zero). When
specifying a new value, the same limits apply as with the
IloCplex.Param.MIP.Tolerances.AbsMIPGap
parameter. See the section on Specifying multiple objective
problems in the CPLEX User's Manual for the details on the
meaning of this tolerance.relTolArray - specifies the relative tolerance to be used when solving
the corresponding criterion in criteria. This
argument can be null, in which case, the
relative tolerances will default to 0.0 (zero). When
specifying a new value, the same limits apply as with the
IloCplex.Param.MIP.Tolerances.MIPGap
parameter. Note that a nondefault setting of this parameter
only applies to MIP multiobjective problems. See the
section on Specifying multiple objective problems in the
CPLEX User's Manual for the details on the meaning of this
tolerance.name - the name for the new multi-criterion expression. This argument
can be null, in which case, the name will be set
to null.public IloCplexMultiCriterionExpr staticLex(IloNumExpr[] criteria, java.lang.String name) throws IloException
A lexicographic ordering means that any improvement of a criterion with higher priority is more important than any improvement of a lower priority criterion.
Note: A shallow copy of criteria will be made when passed to
this method. Thus, after calling this method, any modifications to
criteria should be avoided.
IloExceptioncriteria - an array of numerical expressions.name - the name for the new multi-criterion expression. This argument
can be null, in which case, the name will be set
to null.public IloCplexMultiCriterionExpr staticLex(IloNumExpr[] criteria) throws IloException
A lexicographic ordering means that any improvement of a criterion with higher priority is more important than any improvement of a lower priority criterion.
IloExceptioncriteria - an array of numerical expressions.public int getMultiObjInfo(IloCplex.MultiObjIntInfo what, int subprob) throws IloException
IloExceptionpublic IloCplex.CplexStatus getMultiObjSubCplexStatus(int subprob) throws IloException
IloException - if there is an error (for example
subprob is out of range, this is not
a multi-objective problem, etc.)The - index of the sub solve to be queried.public IloCplex.Status getMultiObjSubStatus(int subprob) throws IloException
IloException - if there is an error (for example
subprob is out of range, this is not
a multi-objective problem, etc.)The - index of the sub solve to be queried.public long getMultiObjInfo(IloCplex.MultiObjLongInfo what, int subprob) throws IloException
IloExceptionpublic double getMultiObjInfo(IloCplex.MultiObjNumInfo what, int subprob) throws IloException
IloExceptionpublic int getMultiObjNsolves()