ilog.cplex
Class IloCplex

java.lang.Object
  extended byilog.cplex.IloCplexModeler
      extended byilog.cplex.IloCplex
All Implemented Interfaces:
IloAddable, IloModel, IloModeler, IloMPModeler, java.io.Serializable

public class IloCplex
extends IloCplexModeler

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 ILOG CPLEX User's Manual for more information about modeling.

Models to be solved by IloCplex should be built by the IloMPModeler (and base interface) methods to construct objects from the following list:

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 ILOG 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:

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 ILOG CPLEX User's Manual for more information about branch and cut.

Most users can simply call the method 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:

Numerous other parameters allow you to control algorithmic aspects of the optimizer. See IloCplex.IntParam, 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 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.

See Also:
Serialized Form

Nested Class Summary
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.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.BooleanParam
          Symbolic names for parameters in IloCplex that are Boolean-valued.
static class IloCplex.BooleanParameter
           
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
          This class identifies the branch type for BranchCallback.
static class IloCplex.Callback
          The callback base class.
static class IloCplex.ConflictStatus
          The class of status values returned by 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.CutCallback
          Base class for user-written callbacks adding cuts during search.
static class IloCplex.CutType
          Enumeration of cut types.
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
          This is the callback class to use to monitor the progress of the generation of disjunctive cuts when a mixed integer programming problem (MIP) is being solved.
static class IloCplex.DoubleParam
          Symbolic parameter names for double-valued IloCplex parameters.
static class IloCplex.DoubleParameter
           
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 an 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
          This is the callback class to use to monitor 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
          This is the callback class to use to monitor 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 implmentation 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
           
static class IloCplex.LazyConstraintCallback
          Callback class for lazy constraints.
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 dual pricing parameter IloCplex.IntParam.MIPSearch.
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.OptimizationCallback
          Base class for 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
           
static class IloCplex.Parameter
           
static class IloCplex.ParameterSet
          A parameter set for IloCplex.
static class IloCplex.PresolveCallback
          The callback class for user-written callbacks during presolve.
static class IloCplex.PrimalPricing
          Enumeration of possible values for the primal pricing parameter IloCplex.IntParam.PPriInd.
static class IloCplex.ProbingCallback
          The base class for user-written control and query callbacks that control probing progress.
static class IloCplex.ProbingInfoCallback
          The base class for user-written callbacks that monitor probing progress.
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 for IloCplex solution qualities.
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.SolveCallback
          The base class for user-written solve callbacks to control how node relaxations are solved within branch and cut.
static class IloCplex.Status
          Enumeration of possible solution status values, as returned by method cplex.getStatus.
static class IloCplex.StringParam
          Symbolic parameter names for string-valued IloCplex parameters.
static class IloCplex.StringParameter
           
static class IloCplex.TuningCallback
          Base class for callbacks to use in a tuning session.
static class IloCplex.TuningStatus
           
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.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.
 
Nested classes inherited from class ilog.cplex.IloCplexModeler
IloCplexModeler.Exception
 
Constructor Summary
IloCplex()
          This constructor creates an instance of IloCplex with an empty active model.
 
Method Summary
 IloConstraint addCut(IloConstraint cut)
          Adds the constraint cut as a cut to the invoking IloCplex object.
 IloConstraint[] addCuts(IloConstraint[] cut)
          Adds the constraints given in cut as cuts to the invoking IloCplex object.
 IloConstraint[] addCuts(IloConstraint[] 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_cutoff, double upper_cutoff, IloNumVar[] vars, double[] weights, double[] refval)
          Creates and installs a diversity filter for the designated variables with the specified lower and upper cutoff values, reference values, and weights.
 IloCplex.FilterIndex addDiversityFilter(double lower_cutoff, double upper_cutoff, 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 cutoff values, reference values, and weights.
 IloConstraint addLazyConstraint(IloConstraint cut)
          This is an advanced method.
 IloConstraint[] addLazyConstraints(IloConstraint[] cut)
          This is an advanced method.
 IloConstraint[] addLazyConstraints(IloConstraint[] cut, int start, int num)
          This is an advanced method.
 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 values.
 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 values.
 IloConstraint addUserCut(IloConstraint cut)
          This is an advanced method.
 IloConstraint[] addUserCuts(IloConstraint[] cuts)
          This is an advanced method.
 IloConstraint[] addUserCuts(IloConstraint[] 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 conjuctive 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.
 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 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.
 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 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 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 license held by the invoking object and frees all the memory allocated by it.
 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.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[] 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 the basis status for the constraint con.
 IloCplex.BasisStatus getBasisStatus(IloNumVar var)
          Returns the basis status for the variable var.
 IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con)
          Returns basis statuses for the constraints in the specified array.
 IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con, int start, int num)
          Returns basis statuses for num consecutive constraints, starting from the index specified by start, in the array of constraints con.
 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 statuses for num consecutive variables, starting from the index specified by start, in the array var.
 double getBestObjValue()
          This method returns a bound on the optimal solution value of the active problem in a MIP.
 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 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.
 java.lang.String getDefault(IloCplex.StringParam which)
          Returns the default value of a string parameter.
 IloCplex.DeleteMode getDeleteMode()
          Returns the current delete mode of the invoking IloCplex object.
 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.
 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.
 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.
 int getNbarrierIterations()
          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.
 int getNcrossDPush()
          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.
 int getNcrossPPush()
          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 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.
 int getNnodes()
          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.
 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.
 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 semi-continuous 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.
 int getNsiftingPhaseOneIterations()
          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.
 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.
 java.lang.String getParam(IloCplex.StringParam which)
          Returns the current value of a string parameter.
 IloCplex.ParameterSet getParameterSet()
          Returns a parameter set corresponding to the present parameter 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.
 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.
 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.
 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.
 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.
static void putenv(java.lang.String envstr)
          Sets the environment variable specifying the ILOG license file used by CPLEX.
 void qpIndefCertificate(IloNumVar[] var, double[] x)
          Returns a vector proving that the Q matrix of QP is not positive semi-definite.
 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 readMIPStart(java.lang.String name)
          Reads the SOL 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.
 void readSolution(java.lang.String name)
          Reads a solution from the SOL file denoted by name and copies this information into the invoking object.
 void readVectors(java.lang.String name)
          Deprecated.  
 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.
static void registerLicense(java.lang.String ilm_CPLEX_license, int ilm_CPLEX_license_signature)
          Passes memory-based information to the ILOG License Manager.
 void remove(IloCplex.Aborter abort)
          Removes the specified aborter from the invoking object.
 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 cnum consecutive variables, starting from the index specified by var[start], and rnum consecutive constraints, starting from the index specified by con[start].
 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 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.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 setVectors(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 setVectors(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 solveFixed()
          Solves the fixed active model.
 boolean solveFixed(int soln)
          Solves the fixed active model using a solution from the solution pool.
 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 cb)
          Installs a user-written callback.
 java.io.PrintStream warning()
          Returns the warning output stream of the invoking IloCplex object.
 void writeBasis(java.lang.String name)
          Writes the current simplex basis to the file specified by name.
 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 writeMIPStart(java.lang.String name)
          Writes a starting solution for a MIP in the SOL format to the file denoted by name.
 void writeMIPStart(java.lang.String name, int soln)
          Writes a starting solution from the solution pool for a MIP in the MST format to the file denoted by name.
 void writeMIPStarts(java.lang.String name)
          Writes all starting solutions from the solution pool for a MIP in the MST format to the file denoted by name.
 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 writeSolution(java.lang.String name)
          Writes solution information from an optimization 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.
 void writeTextSolution(java.lang.String name)
          Deprecated.  
 void writeVectors(java.lang.String name)
          Deprecated.  
 
Methods inherited from class ilog.cplex.IloCplexModeler
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, intSet, intSet, intSetVarArray, 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, makeCopy, max, max, max, max, max, max, max, max, maximize, maximize, maximize, maximize, min, min, min, min, min, min, min, min, minimize, minimize, minimize, minimize, needCopy, 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, prod, prod, prod, prod, prod, prod, prod, prod, prod, 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, 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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IloCplex

public IloCplex()
         throws IloException
This constructor creates an instance of IloCplex with an empty active model.

Method Detail

setModel

public void setModel(IloModel model)
              throws IloException
Sets model as the active model.

Specified by:
setModel in interface IloMPModeler
Overrides:
setModel in class IloCplexModeler
Throws:
IloException

addUserCut

public IloConstraint addUserCut(IloConstraint cut)
                         throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cut - The user cut to be added. The cut must be linear.
Returns:
The added user cut.
Throws:
IloException

addUserCuts

public IloConstraint[] addUserCuts(IloConstraint[] cuts)
                            throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cuts - An array of user cuts to be added. All cuts must be linear.
Returns:
The array of user cuts that have been added.
Throws:
IloException

addUserCuts

public IloConstraint[] addUserCuts(IloConstraint[] cuts,
                                   int start,
                                   int num)
                            throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cuts - 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.
Returns:
The array cuts containing the user cuts that have been added.
Throws:
IloException

clearUserCuts

public void clearUserCuts()
                   throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Throws:
IloException

addLazyConstraint

public IloConstraint addLazyConstraint(IloConstraint cut)
                                throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cut - The constraint to be added as a lazy constraint. The constraint must be linear.
Returns:
The constraint added as a lazy constraint.
Throws:
IloException

addLazyConstraints

public IloConstraint[] addLazyConstraints(IloConstraint[] cut)
                                   throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cut - The array of constraints to be added as lazy constraints. All constraints must be linear.
Returns:
The array of constraints added as lazy constraints.
Throws:
IloException

addLazyConstraints

public IloConstraint[] addLazyConstraints(IloConstraint[] cut,
                                          int start,
                                          int num)
                                   throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Parameters:
cut - 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.
Returns:
An array containing the constraints added as lazy constraints. This is the same array as cut.
Throws:
IloException

clearLazyConstraints

public void clearLazyConstraints()
                          throws IloException
This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Throws:
IloException

addCut

public IloConstraint addCut(IloConstraint cut)
                     throws IloException
Adds the constraint 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.

Parameters:
cut - The constraint to add as a cut. It must be linear.
Returns:
The constraint added as a cut.
Throws:
IloException

addCuts

public IloConstraint[] addCuts(IloConstraint[] cut)
                        throws IloException
Adds the constraints given in 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.

Parameters:
cut - An array of constraints to be added as a cut.
Returns:
The array of constraints added as a cut.
Throws:
IloException

addCuts

public IloConstraint[] addCuts(IloConstraint[] cut,
                               int start,
                               int num)
                        throws IloException
Adds 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.

Parameters:
cut - 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.
Returns:
The array containing the constraints added as cuts. This is array cut.
Throws:
IloException

clearCuts

public void clearCuts()
               throws IloException
Deletes all cuts added by the user to the invoking IloCplex object with the methods addCut and addCuts.

Throws:
IloException

exportModel

public void exportModel(java.lang.String name)
                 throws IloException
Writes the active model to the file specified by filename. The file format is determined by the extension of the filename. The following extensions are recognized on most platforms: Microsoft Windows does not support writing gzipped files. 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 writing 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.

Parameters:
name - 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.
Throws:
IloException

importModel

public void importModel(java.lang.String name)
                 throws IloException
Reads a model from the file specified by name into the active model. The format of the file is specified by the extension of the filename. The following extensions are recognized on most platforms: Microsoft Windows does not support reading from gzipped files. When CPLEX reads a file, the existing active model is first cleaned out and then new modeling objects, as required 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.

Parameters:
name - 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.
Throws:
IloException

clearModel

public void clearModel()
                throws IloException
Removes all modeling objects from the active model. The result is an empty model.

Throws:
IloException

getNcols

public int getNcols()
Returns the number of columns in the matrix representation of the active model.

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.

Returns:
The number of columns of the matrix representation of the active model.

getNrows

public int getNrows()
Returns the number of rows of the matrix representation of the active model.

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.

Returns:
The number of rows of the matrix representation of the active model.

getNQCs

public int getNQCs()
Returns the number of quadratic constraints in the active model.

The result may be different from the number of constraints in the active model, since linear constraints are counted separately.

Returns:
The number of rows of the matrix representation of the active model.

getNSOS1

public int getNSOS1()
Returns the number of SOSs of type 1 in the active model.

Returns:
The number of SOSs of type 1 in the active model.

getNSOS2

public int getNSOS2()
Returns the number of SOSs of type 2 in the active model.

Returns:
The number of SOSs of type 2 in the active model.

getNSOSs

public int getNSOSs()
Returns the number of SOSs of both types, 1 and 2, in the active model.

Returns:
The number of SOSs in the active model.

getNNZs

public int getNNZs()
Returns the number of nonzero elements in the matrix representation of the active model.

Returns:
The number of nonzero elements in the matrix representation of the active model.

getNintVars

public int getNintVars()
Returns the number of integer variables in the matrix representation of the active model. Note that the result is not necessarily equal to the number of integer variables in the active model, as some mapping of modeling objects may require the introduction of added matrix columns.

Returns:
The number of integer variables in the matrix representation of the active model.

getNbinVars

public int getNbinVars()
Returns the number of binary (or Boolean) variables in the matrix representation of the active model. Note that the result is not necessarily equal to the number of Boolean variables in the active model, as some mapping of modeling objects may require the introduction of added matrix columns.

Returns:
The number of binary variables in the matrix representation of the active model.

getNsemiContVars

public int getNsemiContVars()
Returns the number of semi-continuous variables in the matrix representation of the active model.

Returns:
The number of semi-continuous variables in the matrix representation of the active model.

getNsemiIntVars

public int getNsemiIntVars()
Returns the number of semi-integer variables in the matrix representation of the active model.

Returns:
The number of semi-integer variables in the matrix representation of the active model.

isMIP

public boolean isMIP()
Returns true if the active model is a MIP.

Returns:
true if the active model is a MIP.

isQO

public boolean isQO()
Returns true if the active model has a quadratic objective function.

Returns:
true if the active model has a quadratic objective function.

isQC

public boolean isQC()
Returns true if the active model has quadratic constraints. See the topic QCP in the ILOG CPLEX User's Manual for more detail about the characteristics of such constraints with respect to their concavity and positive semi-definiteness (PSD).

Returns:
true if the active model has quadratic constraints.

getStatus

public IloCplex.Status getStatus()
                          throws IloException
Returns the solution status of the active model.

See also the topic Interpreting Solution Quality in the ILOG CPLEX User's Manual for more information about a status associated with infeasibility or unboundedness.

Returns:
The solution status of the active model.
Throws:
IloException
See Also:
IloCplex.Status

isPrimalFeasible

public boolean isPrimalFeasible()
                         throws IloException
Returns 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.

Throws:
IloException

isDualFeasible

public boolean isDualFeasible()
                       throws IloException
Returns 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.

Throws:
IloException

setParam

public void setParam(IloCplex.IntParam which,
                     int val)
              throws IloException
Sets an integer parameter to value val.

Parameters:
which - The identifier of the parameter to set.
val - The new value for the integer parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getParam

public int getParam(IloCplex.IntParam which)
             throws IloException
Returns the current value of an integer parameter.

Parameters:
which - The identifier of the integer parameter to be queried.
Returns:
The current value of the integer parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getMin

public int getMin(IloCplex.IntParam which)
           throws IloException
Returns the minimum value allowed for an integer parameter.

Parameters:
which - The identifier of the integer parameter to be queried.
Returns:
The minimum allowed value for the integer parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getMax

public int getMax(IloCplex.IntParam which)
           throws IloException
Returns the maximum value allowed for an integer parameter.

Parameters:
which - The identifier of the integer parameter to be queried.
Returns:
The maximum allowed value for the integer parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getDefault

public int getDefault(IloCplex.IntParam which)
               throws IloException
Returns the default value of an integer parameter.

Parameters:
which - The identifier of the integer parameter to be queried.
Returns:
The default value of the integer parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setParam

public void setParam(IloCplex.BooleanParam which,
                     boolean val)
              throws IloException
Sets a Boolean parameter to value val.

Parameters:
which - The identifier of the Boolean parameter to be set.
val - The new value for the Boolean parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getParam

public boolean getParam(IloCplex.BooleanParam which)
                 throws IloException
Returns the current value of a Boolean parameter.

Parameters:
which - The identifier of the Boolean parameter to be queried.
Returns:
The current value of the Boolean parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getDefault

public boolean getDefault(IloCplex.BooleanParam which)
                   throws IloException
Returns the default value of a Boolean parameter.

Parameters:
which - The identifier of the Boolean parameter to be queried.
Returns:
The default value of the Boolean parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setParam

public void setParam(IloCplex.DoubleParam which,
                     double val)
              throws IloException
Sets the value of a double parameter to val.

Parameters:
which - The identifier of the double parameter to be set.
val - The new value for the double parameter
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getParam

public double getParam(IloCplex.DoubleParam which)
                throws IloException
Returns the current value of a double parameter.

Parameters:
which - The identifier of the double parameter to be queried.
Returns:
The current value of the double parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getMin

public double getMin(IloCplex.DoubleParam which)
              throws IloException
Returns the minimum value allowed for a double parameter.

Parameters:
which - The identifier of the double parameter to be queried.
Returns:
The minimum allowed value for the queried double parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getMax

public double getMax(IloCplex.DoubleParam which)
              throws IloException
Returns the maximum allowed value for a double parameter.

Parameters:
which - The identifier of the double parameter to be queried.
Returns:
The maximum allowed value for the queried double parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getDefault

public double getDefault(IloCplex.DoubleParam which)
                  throws IloException
Returns the default value of a double parameter.

Parameters:
which - The identifier of the double parameter to be queried.
Returns:
The default value of the queried double parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setParam

public void setParam(IloCplex.StringParam which,
                     java.lang.String val)
              throws IloException
Sets a string parameter to value val.

Parameters:
which - The identifier of the string parameter to set.
val - The new value for the string parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getParam

public java.lang.String getParam(IloCplex.StringParam which)
                          throws IloException
Returns the current value of a string parameter.

Parameters:
which - The identifier of the string parameter to be queried.
Returns:
The current value of the string parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getDefault

public java.lang.String getDefault(IloCplex.StringParam which)
                            throws IloException
Returns the default value of a string parameter.

Parameters:
which - The identifier of the string parameter to be queried.
Returns:
The default value of the string parameter.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setDefaults

public void setDefaults()
                 throws IloException
Resets all parameters to their default values.

Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getParameterSet

public IloCplex.ParameterSet getParameterSet()
                                      throws IloException
Returns a parameter set corresponding to the present parameter state.

Returns:
The parameter set.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setParameterSet

public void setParameterSet(IloCplex.ParameterSet set)
                     throws IloException
Sets the parameter state using a parameter set.

Parameters:
set - The parameter set.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getVersion

public java.lang.String getVersion()
                            throws IloException
Returns a string that reports the version of CPLEX.

Returns:
A string that reports the version of CPLEX.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setDeleteMode

public void setDeleteMode(IloCplex.DeleteMode mode)
Sets the delete mode. The delete mode in the invoking IloCplex object is set to mode.

Parameters:
mode - The delete mode to be set, IloCplex.DeleteMode.FixBasis or IloCplex.DeleteMode.LeaveBasis.

getDeleteMode

public IloCplex.DeleteMode getDeleteMode()
Returns the current delete mode of the invoking IloCplex object.

Returns:
The current delete mode of the invoking IloCplex object.

getCplexStatus

public IloCplex.CplexStatus getCplexStatus()
                                    throws IloException
Returns the status of the 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 ILOG CPLEX User's Manual for more information about a status associated with infeasibility or unboundedness.

Returns:
The IloCplex.CplexStatus status.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getCplexSubStatus

public IloCplex.CplexStatus getCplexSubStatus()
                                       throws IloException
Returns the 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.

Returns:
The IloCplex.CplexStatus status of the last node that has been solved during the solution of a MIP.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getAlgorithm

public int getAlgorithm()
                 throws IloException
Returns the algorithm that was used to generate the current solution.

Returns:
The algorithm that was used to generate the current solution.
Throws:
IloException

getSubAlgorithm

public int getSubAlgorithm()
                    throws IloException
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.

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.
Throws:
IloException

getObjValue

public double getObjValue()
                   throws IloException
Returns the objective value of the current solution.

Returns:
The objective value of the current solution.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getObjValue

public double getObjValue(int soln)
                   throws IloException
Returns the objective value of a solution in the solution pool.

Parameters:
soln - The index of the solution pool member for which to return the objective value. A value of -1 specifies that the value returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The objective value of a solution in the solution pool.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getBestObjValue

public double getBestObjValue()
                       throws IloException
This method returns a bound on the optimal solution value of the active problem in a MIP. When a model has been solved to optimality, this value matches the optimal solution value within the current MIP gap tolerance. If a MIP optimization is terminated before optimality has been proven, this value is computed for a minimization (maximization) problem as the minimum (maximum) objective function value of all remaining unexplored nodes.

Returns:
A bound on the optimal solution value.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getCutoff

public double getCutoff()
                 throws IloException
Returns the cutoff for the objective value when nodes are being solved during branch-and-cut search. 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.

Returns:
The objective value cutoff.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getValues

public double[] getValues(IloLPMatrix matrix)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns the solution vector for the columns of an LP matrix.

Parameters:
matrix - The LP matrix for which to query the solution values. This LP matrix must be in the active model.
Returns:
The solution vector for columns of an LP matrix. If x is the array returned by this method, x[j] will be the solution value for the variable corresponding to column j of matrix.
Throws:
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.

getValues

public double[] getValues(IloLPMatrix matrix,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns a solution vector from the solution pool for the columns of an LP matrix.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The solution vector for columns of an LP matrix. If x is the array returned by this method, x[j] will be the solution value for the variable corresponding to column j of matrix.
Throws:
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.

getValues

public double[] getValues(IloLPMatrix matrix,
                          int start,
                          int num)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns the solution vector for a range of num columns of an LP matrix, starting at the index specified by start.

Parameters:
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.
Returns:
The solution vector for the specified columns of an LP matrix. If 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.
Throws:
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.

getValues

public double[] getValues(IloLPMatrix matrix,
                          int start,
                          int num,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
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.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The solution vector for the specified columns of an LP matrix. If 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.
Throws:
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.

getValue

public double getValue(IloNumVar var)
                throws IloCplex.UnknownObjectException,
                       IloException
Returns the solution value for a variable.

Parameters:
var - The variable whose value is being queried. This variable must be in the active model.
Returns:
The solution value for the variable var.
Throws:
IloCplex.UnknownObjectException - 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.

getValue

public double getValue(IloNumVar var,
                       int soln)
                throws IloCplex.UnknownObjectException,
                       IloException
Returns a solution value from the solution pool for a variable.

Parameters:
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 -1 specifies that the value returned should correspond to the incumbent rather than a member of the solution pool.
Throws:
IloCplex.UnknownObjectException - 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.

getValues

public double[] getValues(IloNumVar[] var)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns solution values for an array of variables.

Parameters:
var - An array of variables whose solution values are being queried. All variables must be in the active model.
Returns:
The solution values for the variables in var. If x is the array returned by this method, x[j] will be the solution value for the variable var[j].
Throws:
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.

getValues

public double[] getValues(IloNumVar[] var,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns solution values from the solution pool for an array of variables.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The solution values for the variables in var. If x is the array returned by this method, x[j] will be the solution value for the variable var[j].
Throws:
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.

getValues

public double[] getValues(IloNumVar[] var,
                          int start,
                          int num)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns solution values for a set of variables.

Parameters:
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.
Returns:
The solution values for the specified variables. If x is the array returned by this method, x[j] will be the solution value for the variable var[j+start].
Throws:
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.

getValues

public double[] getValues(IloNumVar[] var,
                          int start,
                          int num,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns solution values from the solution pool for a set of variables.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The solution values for the specified variables. If x is the array returned by this method, x[j] will be the solution value for the variable var[j+start].
Throws:
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.

getReducedCosts

public double[] getReducedCosts(IloLPMatrix matrix)
                         throws IloCplex.UnknownObjectException,
                                IloException
Returns reduced costs for the variables corresponding to the columns of an LP matrix.

Parameters:
matrix - The LP matrix for which to query the reduced costs. This LP matrix must be in the active model.
Returns:
An array containing the reduced costs for the variables corresponding to the columns of 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.
Throws:
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.

getReducedCosts

public double[] getReducedCosts(IloLPMatrix matrix,
                                int start,
                                int num)
                         throws IloCplex.UnknownObjectException,
                                IloException
Returns reduced costs for the variables corresponding to a range of num columns of LP matrix, starting from the column specified by start.

Parameters:
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.
Returns:
The reduced costs for the specified columns of LP matrix. If 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.
Throws:
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.

getReducedCost

public double getReducedCost(IloNumVar ivar)
                      throws IloCplex.UnknownObjectException,
                             IloException
Returns the reduced cost for a variable.

Parameters:
ivar - The variable whose reduced cost is being queried. This variable must be in the active model.
Returns:
The reduced cost for the variable var.
Throws:
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.

getInfeasibility

public double getInfeasibility(IloNumVar ivar)
                        throws IloCplex.UnknownObjectException,
                               IloException
Returns the infeasibility for a variable.

Parameters:
ivar - The variable whose infeasibility is being queried. This variable must be in the active model.
Returns:
The infeasibility for the variable 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.
Throws:
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.

getReducedCosts

public double[] getReducedCosts(IloNumVar[] var)
                         throws IloCplex.UnknownObjectException,
                                IloException
Returns reduced costs for an array of variables.

Parameters:
var - The array of variables whose reduced costs are being queried. These variables must be in the active model.
Returns:
An array containing the reduced cost values for the variables in var. If dj is the array returned by this method, dj[j] will be the reduced cost for the variable var[j].
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloNumVar[] var)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for an array of variables.

Parameters:
var - The array of variables whose infeasibilities are being queried. These variables must be in the active model.
Returns:
An array containing the infeasibility values for the variables in 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.
Throws:
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.

getReducedCosts

public double[] getReducedCosts(IloNumVar[] var,
                                int start,
                                int num)
                         throws IloCplex.UnknownObjectException,
                                IloException
Returns reduced costs for num consecutive variables, starting from the index specified by start.

Parameters:
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.
Returns:
The reduced costs for the specified variables. If dj is the array returned by this method, dj[j] will be the reduced cost for the variable var[j+start].
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloNumVar[] var,
                                   int start,
                                   int num)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for num consecutive variables, starting from the index specified by start.

Parameters:
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.
Returns:
The infeasibility values for the specified variables. If infeas is the array returned by this method, infeas[j] will be the infeasibility value for the variable var[j+start].
Throws:
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.

getDuals

public double[] getDuals(IloLPMatrix matrix)
                  throws IloCplex.UnknownObjectException,
                         IloException
Returns the dual solution vector for the constraints corresponding to the rows of an LP matrix.

Parameters:
matrix - The LP matrix for the rows of which to query the dual solution values. This LP matrix must be in the active model.
Returns:
An array containing the dual solution values for the constraints corresponding to the rows of an LP matrix. If 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.
Throws:
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.

getDuals

public double[] getDuals(IloLPMatrix matrix,
                         int start,
                         int num)
                  throws IloCplex.UnknownObjectException,
                         IloException
Returns dual solution values for the constraints corresponding to a range of num rows of an LP matrix.

Parameters:
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.
Returns:
An array containing the dual solution values for the constraints corresponding to the specified rows of LP matrix. If 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.
Throws:
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.

getDual

public double getDual(IloRange rng)
               throws IloCplex.UnknownObjectException,
                      IloException
Returns the dual solution value for a constraint.

Parameters:
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.
Returns:
The dual solution value for the range constraint.
Throws:
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.

getDuals

public double[] getDuals(IloRange[] rng)
                  throws IloCplex.UnknownObjectException,
                         IloException
Returns dual solution values for an array of range constraints.

Parameters:
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.
Returns:
An array containing the dual solution values for the constraints in rng. If pi is the array returned by this method, pi[i] will be the dual solution value for constraint rng[i].
Throws:
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.

getDuals

public double[] getDuals(IloRange[] rng,
                         int start,
                         int num)
                  throws IloCplex.UnknownObjectException,
                         IloException
Returns dual solution values for num consecutive range constraints, starting from the index specified by start.

Parameters:
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.
Returns:
An array containing the dual solution values for the specified constraints. If pi is the array returned by this method, pi[i] will be the dual solution value for the range constraint rng[i+start].
Throws:
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.

getSlacks

public double[] getSlacks(IloLPMatrix matrix)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values for the constraints corresponding to the rows of an LP matrix.

Parameters:
matrix - The LP matrix for the constraints of which to query the slack values. This LP matrix must be in active model.
Returns:
An array of slack values for the constraints the LP matrix. If 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.
Throws:
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.

getSlacks

public double[] getSlacks(IloLPMatrix matrix,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values from the solution pool for the constraints corresponding to the rows of an LP matrix.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
An array of slack values for the constraints the LP matrix. If 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.
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloLPMatrix matrix)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for the constraints corresponding to the rows of an LP matrix.

Parameters:
matrix - The LP matrix for which to query the infeasibility. This LP matrix must be in the active model.
Returns:
An array containing the infeasibility values for the constraints corresponding to the rows of 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.
Throws:
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.

getSlacks

public double[] getSlacks(IloLPMatrix matrix,
                          int start,
                          int num)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values for a range of num consecutive rows, starting from the index specified by start, of an LP matrix.

Parameters:
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.
Returns:
An array containing the slack vector for the constraints corresponding to the specified rows of the LP matrix. If 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.
Throws:
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.

getSlacks

public double[] getSlacks(IloLPMatrix matrix,
                          int start,
                          int num,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
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.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
An array containing the slack vector for the constraints corresponding to the specified rows of the LP matrix. If 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.
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloLPMatrix matrix,
                                   int start,
                                   int num)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for the constraints corresponding to a range of num rows of LP matrix, starting from the row specified by start.

Parameters:
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.
Returns:
The infeasibility values for the specified rows of LP matrix. If 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.
Throws:
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.

getSlack

public double getSlack(IloRange rng)
                throws IloCplex.UnknownObjectException,
                       IloException
Returns the slack value for a range constraint.

Parameters:
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.
Returns:
The slack value for a range constraint.
Throws:
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.

getSlack

public double getSlack(IloRange rng,
                       int soln)
                throws IloCplex.UnknownObjectException,
                       IloException
Returns a slack value from the solution pool for a range constraint.

Parameters:
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 -1 specifies that the value returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The slack value for a range constraint.
Throws:
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.

getInfeasibility

public double getInfeasibility(IloConstraint con)
                        throws IloCplex.UnknownObjectException,
                               IloException
Returns the infeasibility value for a constraint.

Parameters:
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.
Returns:
The infeasibility value for the constraint. 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.
Throws:
IloCplex.UnknownObjectException - 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.

getSlacks

public double[] getSlacks(IloRange[] rng)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values for an array of range constraints.

Parameters:
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.
Returns:
An array containing the slack values for the constraints in rng. If s is the array returned by this method, s[i] will be the slack value for the range constraint rng[i].
Throws:
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.

getSlacks

public double[] getSlacks(IloRange[] rng,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values from the solution pool for an array of range constraints.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
An array containing the slack values for the constraints in rng. If s is the array returned by this method, s[i] will be the slack value for the range constraint rng[i].
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloConstraint[] con)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for an array of constraints.

Parameters:
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.
Returns:
An array containing the infeasibility values for the constraints in con. If infeas is the array returned by this method, infeas[i] will be the infeasibility value for the constraint con[i].
Throws:
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.

getSlacks

public double[] getSlacks(IloRange[] rng,
                          int start,
                          int num)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values for num consecutive constraints, starting from the index specified by start, from an array rng.

Parameters:
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.
Returns:
An array containing the slack values for the specified constraints. If s is the array returned by this method, s[i] will be the slack value for the range constraint rng[i+start].
Throws:
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.

getSlacks

public double[] getSlacks(IloRange[] rng,
                          int start,
                          int num,
                          int soln)
                   throws IloCplex.UnknownObjectException,
                          IloException
Returns slack values from the solution pool for num consecutive constraints, starting from the index specified by start, from an array rng.

Parameters:
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 -1 specifies that the values returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
An array containing the slack values for the specified constraints. If s is the array returned by this method, s[i] will be the slack value for the range constraint rng[i+start].
Throws:
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.

getInfeasibilities

public double[] getInfeasibilities(IloConstraint[] con,
                                   int start,
                                   int num)
                            throws IloCplex.UnknownObjectException,
                                   IloException
Returns infeasibility values for num consecutive constraints, starting from the index specified by start, from an array con of constraints.

Parameters:
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.
Returns:
An array containing the infeasibility values for the specified constraints. If infeas is the array returned by this method, infeas[i] will be the infeasibility value for the range constraint con[i+start].
Throws:
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.

getValue

public double getValue(IloNumExpr expr)
                throws IloException
Returns the value that expr takes for the current solution.

Parameters:
expr - The expression for which to evaluate the current solution.
Returns:
The value expr takes for the current solution.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getValue

public double getValue(IloNumExpr expr,
                       int soln)
                throws IloException
Returns the value that expr takes for a solution in the solution pool.

Parameters:
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 -1 specifies that the value returned should correspond to the incumbent rather than a member of the solution pool.
Returns:
The value expr takes for the current solution.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getAX

public double[] getAX(IloLPMatrix matrix)
               throws IloCplex.UnknownObjectException,
                      IloException
Returns an array containing the row activity values for the constraints corresponding to the rows of an LP matrix.

Parameters:
matrix - The LP matrix for which to query the row activity values. This LP matrix must be in the active model.
Returns:
An array containing the row activity values for the rows of 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.
Throws:
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.

getAX

public double[] getAX(IloLPMatrix matrix,
                      int start,
                      int num)
               throws IloCplex.UnknownObjectException,
                      IloException
Returns row activity values for a range of num consecutive rows, starting from the index specified by start, of an LP matrix.

Parameters:
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.
Returns:
An array containing the row activity vector for specified rows of LP 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+start of the IloLPMatrix matrix.
Throws:
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.

getAX

public double getAX(IloRange rng)
             throws IloCplex.UnknownObjectException,
                    IloException
Returns the row activity value for a range constraint.

Parameters:
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.
Returns:
The row activity value for rng.
Throws:
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.

getAX

public double[] getAX(IloRange[] rng)
               throws IloCplex.UnknownObjectException,
                      IloException
Returns row activity values for an array of range constraints.

Parameters:
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.
Returns:
The row activity values for the range constraints in rng. If ax is the array returned by this method, ax[i] will be the row activity value for the range constraint rng[i].
Throws:
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.

getAX

public double[] getAX(IloRange[] rng,
                      int start,
                      int num)
               throws IloCplex.UnknownObjectException,
                      IloException
Queries row activity values for a set of range constraints.

Parameters:
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.
Returns:
The row activity values for the specified range constraints. If ax is the array returned by this method, ax[i] will be the row activity value for the constraint rng[i+start].
Throws:
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.

getBasisStatus

public IloCplex.BasisStatus getBasisStatus(IloNumVar var)
                                    throws IloException
Returns the basis status for the variable var.

This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
var - The variable whose basis status is being queried.
Returns:
The basis status for the variable var.
Throws:
IloException

getBasisStatuses

public IloCplex.BasisStatus[] getBasisStatuses(IloNumVar[] var)
                                        throws IloException

Returns basis statuses for the variables in the specified array.

This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
var - The array of variables whose basis statuses are being queried.
Returns:
The basis statuses for the variables var. If b is the returned array, b[j] will be the basis status for the variable var[j].
Throws:
IloException

getBasisStatuses

public IloCplex.BasisStatus[] getBasisStatuses(IloNumVar[] var,
                                               int start,
                                               int num)
                                        throws IloException
Returns basis statuses for num consecutive variables, starting from the index specified by start, in the array var.

This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
var - 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.
Returns:
The basis statuses for the specified variables in var. If b is the returned array, b[j] will be the basis status for the variable var[j+start].
Throws:
IloException

getBasisStatus

public IloCplex.BasisStatus getBasisStatus(IloConstraint con)
                                    throws IloException
Returns the basis status for the constraint con. This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
con - The constraint whose basis status is being queried.
Returns:
The basis status for constraint rng.
Throws:
IloException

getBasisStatuses

public IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con)
                                        throws IloException

Returns basis statuses for the constraints in the specified array.

This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
con - The array of constraints whose basis statuses are being queried.
Returns:
An array containing the basis statuses for the constraints in con. If b is the returned array, b[i] will be the basis status for constraints con[i].
Throws:
IloException

getBasisStatuses

public IloCplex.BasisStatus[] getBasisStatuses(IloConstraint[] con,
                                               int start,
                                               int num)
                                        throws IloException
Returns basis statuses for num consecutive constraints, starting from the index specified by start, in the array of constraints con.

This function succeeds only if a basic solution is available in the invoking IloCplex optimizer.

Parameters:
con - 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.
Returns:
An array containing the basis statuses for constraints in con. If b is the returned array, b[i] will be the basis status for constraint con[i+start].
Throws:
IloException

setBasisStatuses

public void setBasisStatuses(IloNumVar[] var,
                             IloCplex.BasisStatus[] cstat,
                             IloRange[] con,
                             IloCplex.BasisStatus[] rstat)
                      throws IloException
Sets basis statuses for variables and constraints.

Parameters:
var - 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].
Throws:
IloException

setBasisStatuses

public void setBasisStatuses(IloNumVar[] var,
                             IloCplex.BasisStatus[] cstat,
                             int cstart,
                             int cnum,
                             IloConstraint[] con,
                             IloCplex.BasisStatus[] rstat,
                             int rstart,
                             int rnum)
                      throws IloException
Sets basis statuses for cnum consecutive variables, starting from the index specified by var[start], and rnum consecutive constraints, starting from the index specified by con[start].

Parameters:
var - 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.
Throws:
IloException

setVectors

public void setVectors(double[] x,
                       double[] dj,
                       IloNumVar[] var,
                       double[] slack,
                       double[] pi,
                       IloRange[] rng)
                throws IloException
Specifies a starting point for the next invocation of the method 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.

If the active model is a MIP, only x values can be used. Values may be specified for any subset of the integer and continuous variables in the model, either through a single invocation of setVectors, or incrementally through multiple calls. When optimization commences or resumes, CPLEX will attempt to find a feasible MIP solution that is compatible with the set of specified x values. When start values are not provided for all integer variables, CPLEX tries to extend the partial solution to a complete solution by solving a MIP on the unspecified variables. The parameter SubMIPNodeLim controls the amount of effort CPLEX expends in trying to solve this secondary MIP. If CPLEX finds a complete feasible solution, that solution becomes the incumbent. If the specified values are infeasible, they are retained for use in a subsequent solution repair heuristic. The amount of effort spent in this heuristic can be controlled by parameter RepairTries.

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.

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].

Parameters:
x - 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.
Throws:
IloException

setVectors

public void setVectors(double[] x,
                       double[] dj,
                       IloNumVar[] var,
                       int vstart,
                       int vnum,
                       double[] slack,
                       double[] pi,
                       IloRange[] rng,
                       int rstart,
                       int rnum)
                throws IloException
Specifies a partial starting point for the next invocation of the method 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.

If the active model is a MIP, only x values can be used. Values may be specified for any subset of the integer and continuous variables in the model, either through a single invocation of setVectors, or incrementally through multiple calls. When optimization commences or resumes, CPLEX will attempt to find a feasible MIP solution that is compatible with the set of specified x values. When start values are not provided for all integer variables, CPLEX tries to extend the partial solution to a complete solution by solving a MIP on the unspecified variables. The parameter SubMIPNodeLim controls the amount of effort CPLEX expends in trying to solve this secondary MIP. If CPLEX finds a complete feasible solution, that solution becomes the incumbent. If the specified values are infeasible, they are retained for use in a subsequent solution repair heuristic. The amount of effort spent in this heuristic can be controlled by parameter RepairTries.

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.

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].

Parameters:
x - 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.
Throws:
IloException

feasOpt

public boolean feasOpt(IloConstraint[] cts,
                       double[] prefs)
                throws IloException
This method computes a minimum-cost relaxation in order to make the active model feasible by relaxing the constraints specified in 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.

Parameters:
cts - 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].
Returns:
true if a relaxation is found; false otherwise.
Throws:
IloException

feasOpt

public boolean feasOpt(IloRange[] rngs,
                       double[] rnglb,
                       double[] rngub,
                       IloNumVar[] vars,
                       double[] varlb,
                       double[] varub)
                throws IloException
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.

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.

Parameters:
rngs - 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.
Returns:
true if a relaxation is found; false otherwise.
Throws:
IloException

feasOpt

public boolean feasOpt(IloNumVar[] vars,
                       double[] varlb,
                       double[] varub)
                throws IloException
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.

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.

Parameters:
vars - 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.
Returns:
true if a relaxation is found; false otherwise.
Throws:
IloException

feasOpt

public boolean feasOpt(IloRange[] rngs,
                       double[] rnglb,
                       double[] rngub)
                throws IloException
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.

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.

Parameters:
rngs - 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.
Returns:
true if a relaxation is found; false otherwise.
Throws:
IloException

bound

public IloNumVarBound bound(IloNumVar var,
                            IloNumVarBoundType type)
Creates and returns an object of type IloNumVarBound to represent the specified bound of the variable var.


lowerBound

public IloNumVarBound lowerBound(IloNumVar var)
Creates and returns an object of type IloNumVarBound to represent the lower bound of the variable var.


upperBound

public IloNumVarBound upperBound(IloNumVar var)
Creates and returns an object of type IloNumVarBound to represent the upper bound of variable var.


refineConflict

public boolean refineConflict(IloConstraint[] cons,
                              double[] prefs)
                       throws IloException
Refines a conflict from an array of constraints.

The method IloCplex.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 may be considered in groups organized by IloAnd constructed with ilog.concert.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.

Parameters:
cons -

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 of integers 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.

Returns:
A Boolean value reporting whether a conflict has been found.
Throws:
IloException

refineConflict

public boolean refineConflict(IloConstraint[] cons,
                              double[] prefs,
                              int start,
                              int num)
                       throws IloException
Refines a conflict consisting of a subset of constraints from an array.

This method resembles IloCplex.refineConflict(ilog.concert.IloConstraint[], double[]) but considers only num constraints, starting at the index specified by start.

Throws:
IloException

getConflict

public IloCplex.ConflictStatus[] getConflict(IloConstraint[] cts)
                                      throws IloException
Accesses the constraints of a conflict previously computed by the method 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.

Returns:
An array containing values that denote the status of the constraints in the array cts.
Throws:
IloException

getConflict

public IloCplex.ConflictStatus getConflict(IloConstraint ct)
                                    throws IloException
Accesses a conflict previously computed by the method 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.

Throws:
IloException

getConflict

public IloCplex.ConflictStatus[] getConflict(IloConstraint[] cts,
                                             int start,
                                             int num)
                                      throws IloException
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.

The constraints passed in cts must be among the same constraints that have previously been passed to refineConflict.

Parameters:
cts - 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.
Returns:
An array containing the status of the constraints.
Throws:
IloException

getBoundSA

public void getBoundSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloLPMatrix matrix)
                throws IloException
Computes and returns sensitivity analysis for the bounds of all variables in the specified LP matrix.

Parameters:
lblower - 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.
Throws:
IloException

getBoundSA

public void getBoundSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloLPMatrix matrix,
                       int start,
                       int num)
                throws IloException
Computes and returns sensitivity analysis for the bounds of num consecutive variables, starting from the index specified by start, in the specified LP matrix.

Parameters:
lblower - 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.
Throws:
IloException

getBoundSA

public void getBoundSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloNumVar[] var)
                throws IloException
Computes and returns sensitivity analysis for the bounds of the variables in the array vars.

Parameters:
lblower - 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.
Throws:
IloException

getBoundSA

public void getBoundSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloNumVar[] var,
                       int start,
                       int num)
                throws IloException
Computes and returns sensitivity analysis for the bounds of the num consecutive variables, starting from the index specified by start, in the array var.

Parameters:
lblower - 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.
Throws:
IloException

getObjSA

public void getObjSA(double[] lower,
                     double[] upper,
                     IloLPMatrix matrix)
              throws IloException
Computes and returns sensitivity analysis for objective coefficients of the variables corresponding to the columns of the specified LP matrix.

Parameters:
lower - 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.
Throws:
IloException

getObjSA

public void getObjSA(double[] lower,
                     double[] upper,
                     IloLPMatrix matrix,
                     int start,
                     int num)
              throws IloException
Computes and returns sensitivity analysis for objective coefficients of the variables corresponding to a range of num consecutive columns of the specified LP matrix.

Parameters:
lower - 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.
Throws:
IloException

getObjSA

public void getObjSA(double[] lower,
                     double[] upper,
                     IloNumVar[] var)
              throws IloException
Computes and returns sensitivity analysis for objective coefficients for an array of variables.

Parameters:
lower - 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.
Throws:
IloException

getObjSA

public void getObjSA(double[] lower,
                     double[] upper,
                     IloNumVar[] var,
                     int start,
                     int num)
              throws IloException
Computes and returns sensitivity analysis for objective coefficients for num consecutive variables, starting at the index specified by start.

Parameters:
lower - 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.
Throws:
IloException

getRangeSA

public void getRangeSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloRange[] rng)
                throws IloException
Computes and returns sensitivity analysis for the bounds of the range constraints in the array rng.

Parameters:
lblower - 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.
Throws:
IloException

getRangeSA

public void getRangeSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloRange[] rng,
                       int start,
                       int num)
                throws IloException
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].

Parameters:
lblower - 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.
Throws:
IloException

getRangeSA

public void getRangeSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloLPMatrix matrix,
                       int start,
                       int num)
                throws IloException
Computes and returns sensitivity analysis for the constraints corresponding to num rows of the LP matrix matrix starting with row start.

Parameters:
lblower - 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.
Throws:
IloException

getRangeSA

public void getRangeSA(double[] lblower,
                       double[] lbupper,
                       double[] ublower,
                       double[] ubupper,
                       IloLPMatrix matrix)
                throws IloException
Computes and returns sensitivity analysis for the constraints corresponding to the rows of the LP matrix matrix.

Parameters:
lblower - 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.
Throws:
IloException

getRHSSA

public void getRHSSA(double[] lower,
                     double[] upper,
                     IloRange[] rng)
              throws IloException
Computes and returns sensitivity analysis for the righthand side (RHS) values of a range of constraints.

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.

Parameters:
lower - 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.
Throws:
IloException

getRHSSA

public void getRHSSA(double[] lower,
                     double[] upper,
                     IloRange[] rng,
                     int start,
                     int num)
              throws IloException
Computes and returns sensitivity analysis for the righthand side (RHS) values of 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.

Parameters:
lower - 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 requested
num - The number of consecutive elements in rng for which the sensitivity analysis is requested.
Throws:
IloException

getRHSSA

public void getRHSSA(double[] lower,
                     double[] upper,
                     IloLPMatrix matrix)
              throws IloException
Computes and returns sensitivity analysis for righthand side (RHS) values of the constraints corresponding to the rows of an LP matrix.

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.

Parameters:
lower - 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.
Throws:
IloException

getRHSSA

public void getRHSSA(double[] lower,
                     double[] upper,
                     IloLPMatrix matrix,
                     int start,
                     int num)
              throws IloException
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.

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.

Parameters:
lower - 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.
Throws:
IloException

getQuality

public IloCplex.Quality getQuality(IloCplex.QualityType which)
                            throws IloException
Returns an instance of IloCplex.Quality that contains the requested quality measure.

Parameters:
which - The IloCplex.QualityType which should be computed.
Returns:
An instance of IloCplex.Quality for the requested quality measure.
Throws:
IloException
See Also:
IloCplex.Quality, IloCplex.QualityType

getQuality

public IloCplex.Quality getQuality(IloCplex.QualityType which,
                                   int soln)
                            throws IloException
Returns an instance of IloCplex.Quality that contains the requested quality measure for a solution in the solution pool.

Parameters:
which - 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 -1 specifies that the quality measure should correspond to the incumbent rather than a member of the solution pool.
Returns:
An instance of IloCplex.Quality for the requested quality measure.
Throws:
IloException
See Also:
IloCplex.Quality, IloCplex.QualityType

output

public java.io.PrintStream output()
Returns the output stream of the invoking IloCplex object.

This stream is used by IloCplex for printing logging information. It can be set with the method setOut.

Returns:
The output stream of the invoking IloCplex object.
See Also:
IloCplex.setOut(java.io.OutputStream)

warning

public java.io.PrintStream warning()
Returns the warning output stream of the invoking IloCplex object.

This stream is used by IloCplex for printing warnings. It can be set with the method setWarning.

Returns:
The warning stream of the invoking IloCplex object.
See Also:
IloCplex.setWarning(java.io.OutputStream)

setOut

public void setOut(java.io.OutputStream s)
Sets the default output stream of the invoking 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.

Parameters:
s - The new default output stream.

setWarning

public void setWarning(java.io.OutputStream s)
Sets the warning stream of the invoking 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.

Parameters:
s - The new warning output stream.

solve

public boolean solve()
              throws IloException
Solves the active model.

Returns:
A Boolean value reporting whether a feasible solution has been found. This solution is not necessarily optimal. If false is returned, a feasible solution may still be present, but IloCplex has not been able to prove its feasibility.
Throws:
IloException

solveFixed

public boolean solveFixed()
                   throws IloException
Solves the fixed active model. The fixed model is generated from a MIP problem, and a solution to it, by fixing all integer variables to their solution values.

Returns:
A Boolean value reporting whether a feasible solution has been found. This solution is not necessarily optimal. If false is returned a feasible solution may still be present, but IloCplex has not been able to prove its feasibility.
Throws:
IloException

solveFixed

public boolean solveFixed(int soln)
                   throws IloException
Solves the fixed active model using a solution from the solution pool. The fixed model is generated from a MIP problem, and a solution to it, by fixing all integer variables to their solution values.

Parameters:
soln - The index of the solution pool member to use in generating the fixed model. A value of -1 specifies that the fixed model should correspond to the incumbent rather than a member of the solution pool.
Returns:
A Boolean value reporting whether a feasible solution has been found. This solution is not necessarily optimal. If false is returned a feasible solution may still be present, but IloCplex has not been able to prove its feasibility.
Throws:
IloException

tuneParam

public int tuneParam()
              throws IloException
Tunes the parameters for improved optimizer performance on the current model. Tuning is carried out by CPLEX making a number of trial runs with a variety of parameter settings. Upon return, the values of the parameters in the IloCplex object will be set to their tuned values. These values may be queried or written to a file. There will not be a solution to the model.

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 settins are ignored.

All 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.

Returns:
A value reporting the completion of tuning. The values will be from the enumeration TuningStatus.
Throws:
IloException

tuneParam

public int tuneParam(IloCplex.ParameterSet fixedset)
              throws IloException
Tunes the parameters for improved optimizer performance on the current model while leaving some parameters unchanged. Tuning is carried out by CPLEX making a number of trial runs with a variety of parameter settings. Upon return, the values of the parameters in the IloCplex object will be set to their tuned values. These values may be queried or written to a file. There will not be a solution to the model.

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 settins are ignored.

All 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.

Parameters:
fixedset - The parameters and their values which should not be changed by tuning.
Returns:
A value reporting the completion of tuning. The values will be from the enumeration TuningStatus.
Throws:
IloException

tuneParam

public int tuneParam(java.lang.String[] filenames)
              throws IloException
Tunes the parameters for improved optimizer performance on a set of models. Tuning is carried out by CPLEX making a number of trial runs with a variety of parameter settings. Upon return, the values of the parameters in the IloCplex object will be set to their tuned values. These values may be queried or written to a file.

The following parameters control the tuning process and all other parameter settins are ignored.

All 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.

Parameters:
filenames - An array of fully-qualified file names of the models to be tuned.
Returns:
A value reporting the completion of tuning. The values will be from the enumeration TuningStatus.
Throws:
IloException

tuneParam

public int tuneParam(java.lang.String[] filenames,
                     IloCplex.ParameterSet fixedset)
              throws IloException
Tunes the parameters for improved optimizer performance on a set of models while leaving some parameters unchanged. Tuning is carried out by CPLEX making a number of trial runs with a variety of parameter settings. Upon return, the values of the parameters in the IloCplex object will be set to their tuned values. These values may be queried or written to a file.

The following parameters control the tuning process and all other parameter settins are ignored.

All 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.

Parameters:
filenames - 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.
Returns:
A value reporting the completion of tuning. The values will be from the enumeration TuningStatus.
Throws:
IloException

getNiterations

public int getNiterations()
Returns the number of iterations from the last solve.

Returns:
The number of iterations from the last solve.

getNphaseOneIterations

public int getNphaseOneIterations()
Returns the number of phase I simplex iterations from the last solve.

Returns:
The number of phase I simplex iterations from the last solve.

getNbarrierIterations

public int getNbarrierIterations()
Returns the number of barrier iterations from the last solve.

Returns:
The number of barrier iterations from the last solve.

getNsiftingIterations

public int getNsiftingIterations()
Returns the number of sifting iterations from the last solve.

Returns:
The number of sifting iterations from the last solve.

getNsiftingPhaseOneIterations

public int getNsiftingPhaseOneIterations()
Returns the number of sifting phase I iterations from the last solve.

Returns:
The number of sifting phase I iterations from the last solve.

getNcrossDExch

public int getNcrossDExch()
Returns the number of dual exchange operations in the crossover of the last solve.

Returns:
The number of dual exchange operations in the crossover of the last solve.

getNcrossDPush

public int getNcrossDPush()
Returns the number of dual push operations in the crossover of the last solve.

Returns:
The number of dual push operations in the crossover of the last solve.

getNcrossPExch

public int getNcrossPExch()
Returns the number of primal exchange operations in the crossover of the last solve.

Returns:
The number of primal exchange operations in the crossover of the last solve.

getNcrossPPush

public int getNcrossPPush()
Returns the number of primal push operations in the crossover of the last solve.

Returns:
The number of primal push operations in the crossover of the last solve.

getNdualSuperbasics

public int getNdualSuperbasics()
Returns the number of dual superbasic variables in the basis.

Returns:
The number of dual superbasic variables in the basis.

getNprimalSuperbasics

public int getNprimalSuperbasics()
Returns the number of primal superbasic variables in the basis.

Returns:
The number of primal superbasic variables in the basis.

getNnodes

public int getNnodes()
Returns the number of branch-and-cut nodes explored in solving the active model.

Returns:
The number of branch-and-cut nodes explored in solving the active model.

getNnodesLeft

public int getNnodesLeft()
Returns the number of unexplored nodes in the branch-and-cut tree.

Returns:
The number of unexplored nodes in the branch-and-cut tree.

getIncumbentNode

public int getIncumbentNode()
Returns the node number where the current incumbent was found.

Returns:
The node number where the current incumbent was found.

getNcuts

public int getNcuts(int which)
             throws IloException
Returns the number of cuts of the specified type in use at the end of the previous mixed integer optimization.

Parameters:
which - The cut type about which to return the number.
Returns:
The number of cuts of this type in use.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

setPriority

public void setPriority(IloNumVar var,
                        int pri)
                 throws IloException
Sets the branch priority for the variable 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 ILOG CPLEX User's Manual.

Parameters:
var - The variable whose priority value is being set.
pri - The priority value to set for the variable var.
Throws:
IloException

setPriorities

public void setPriorities(IloNumVar[] var,
                          int[] pri)
                   throws IloException
Sets branch priorities for an array of variables.

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 ILOG CPLEX User's Manual.

Parameters:
var - 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].
Throws:
IloException

setPriorities

public void setPriorities(IloNumVar[] var,
                          int[] pri,
                          int start,
                          int num)
                   throws IloException
Sets branch priorities for 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 ILOG CPLEX User's Manual.

Parameters:
var - 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.
Throws:
IloException

setDirection

public void setDirection(IloNumVar var,
                         IloCplex.BranchDirection dir)
                  throws IloException
Sets the branching direction for a variable.

Parameters:
var - The variable whose branching direction is being set.
dir - The branching direction to set for the variable var.
Throws:
IloException
See Also:
IloCplex.BranchDirection

setDirections

public void setDirections(IloNumVar[] var,
                          IloCplex.BranchDirection[] brdir)
                   throws IloException
Sets branching directions for an array of variables.

Parameters:
var - 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].
Throws:
IloException
See Also:
IloCplex.BranchDirection

setDirections

public void setDirections(IloNumVar[] var,
                          IloCplex.BranchDirection[] brdir,
                          int start,
                          int num)
                   throws IloException
Sets branching directions for num consecutive variables, starting from the index specified by start.

Parameters:
var - 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.
Throws:
IloException
See Also:
IloCplex.BranchDirection

delPriority

public void delPriority(IloNumVar var)
                 throws IloException
Removes any existing branch priority assignment from variable var.

Parameters:
var - The variable whose branch priority assignment is being removed.
Throws:
IloException

delPriorities

public void delPriorities(IloNumVar[] var)
                   throws IloException
Removes any existing branch priority assignment from the variables in array var.

Parameters:
var - The array of variables whose branch priority assignments are being removed.
Throws:
IloException

delPriorities

public void delPriorities(IloNumVar[] var,
                          int start,
                          int num)
                   throws IloException
Removes any existing branch priority assignment from num consecutive variables in the array var, starting with the variable var[start].

Parameters:
var - 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.
Throws:
IloException

delDirection

public void delDirection(IloNumVar var)
                  throws IloException
Removes any existing branching direction assignments from the variable var.

Parameters:
var - The variable whose branching direction assignment is being removed.
Throws:
IloException

delDirections

public void delDirections(IloNumVar[] var)
                   throws IloException

Removes any existing assignments of branching direction from all the variables in the specified array.

Parameters:
var - An array of variables whose branching direction assignments are being removed.
Throws:
IloException

delDirections

public void delDirections(IloNumVar[] var,
                          int start,
                          int num)
                   throws IloException
Removes any existing branching direction assignments from num consecutive variables in the array var, starting with the variable var[start].

Parameters:
var - 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.
Throws:
IloException

getPriority

public int getPriority(IloNumVar var)
                throws IloException
Returns the branch priority for a variable.

Parameters:
var - The variable whose branch priority is being queried.
Returns:
The branch priority for the variable var. The value 0 (zero) specifies the IloCplex default.
Throws:
IloException

getPriorities

public int[] getPriorities(IloNumVar[] var)
                    throws IloException
Returns branch priorities for an array of variables.

Parameters:
var - The array of variables whose branch priorities are being queried.
Returns:
The branch priorities for the variables in 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.
Throws:
IloException

getPriorities

public int[] getPriorities(IloNumVar[] var,
                           int start,
                           int num)
                    throws IloException
Returns branch priorities for num consecutive variables, starting from the index specified by start.

Parameters:
var - 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.
Returns:
The branch priorities for the specified variables. If 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.
Throws:
IloException

getDirection

public IloCplex.BranchDirection getDirection(IloNumVar var)
                                      throws IloException
Returns the branch direction for a variable.

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.

Parameters:
var - The variable whose branch direction is being queried.
Returns:
The branch direction for the variable var.
Throws:
IloException

getDirections

public IloCplex.BranchDirection[] getDirections(IloNumVar[] var)
                                         throws IloException
Returns the branch directions for an array of variables.

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.

Parameters:
var - An array of variables whose branch directions are being queried.
Returns:
The branch directions for the variables in var. If dir is the array returned by this method, dir[j] is the branch direction of variable var[j].
Throws:
IloException

getDirections

public IloCplex.BranchDirection[] getDirections(IloNumVar[] var,
                                                int start,
                                                int num)
                                         throws IloException
Returns branch directions for 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.

Parameters:
var - 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.
Returns:
The branch directions for the specified variables. If dir is the array returned by this method, dir[j] is the branch direction of variable var[j+start].
Throws:
IloException

writeOrder

public void writeOrder(java.lang.String name)
                throws IloException
Writes a priority order file with the specified 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 reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to which the priority order is written.
Throws:
IloException
See Also:
IloCplex.readOrder(java.lang.String)

writeConflict

public void writeConflict(java.lang.String name)
                   throws IloException
Writes a conflict file with the specified name.

Parameters:
name - The name of the file to which the conflict is written.
Throws:
IloException

writeParam

public void writeParam(java.lang.String name)
                throws IloException
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. By convention, the file extension is .prm. The PRM file format is documented in the reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to write.
Throws:
IloException
See Also:
IloCplex.readParam(java.lang.String)

writeBasis

public void writeBasis(java.lang.String name)
                throws IloException
Writes the current simplex basis to the file specified by name. By convention, the file extension is .bas. The BAS file format is documented in the reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to write.
Throws:
IloException
See Also:
IloCplex.readBasis(java.lang.String)

writeSolution

public void writeSolution(java.lang.String name)
                   throws IloException
Writes solution information from an optimization in SOL format to the file specified by name.

A SOL file can later be read back into CPLEX with the method readSolution. By convention, the file extension is .sol. The SOL file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
Throws:
IloException
See Also:
IloCplex.readSolution(java.lang.String)

writeSolution

public void writeSolution(java.lang.String name,
                          int soln)
                   throws IloException
Writes solution information from the solution pool in SOL format to the file specified by name.

A SOL file can later be read back into CPLEX with the method readSolution. By convention, the file extension is .sol. The SOL file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
soln - The index of the solution pool member for which to write solution values. A value of -1 specifies that the values written should correspond to the incumbent rather than a member of the solution pool.
Throws:
IloException
See Also:
IloCplex.readSolution(java.lang.String)

writeSolutions

public void writeSolutions(java.lang.String name)
                    throws IloException
Writes solution information for all solutions in the solution pool in SOL format to the file specified by name.

By convention, the file extension is .sol. The SOL file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
Throws:
IloException

writeVectors

public void writeVectors(java.lang.String name)
                  throws IloException
Deprecated.  

Throws:
IloException

writeTextSolution

public void writeTextSolution(java.lang.String name)
                       throws IloException
Deprecated.  

Throws:
IloException

writeMIPStart

public void writeMIPStart(java.lang.String name)
                   throws IloException
Writes a starting solution for a MIP in the SOL format to the file denoted by name.

By convention, the file extension is .mst. The SOL file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
Throws:
IloException
See Also:
IloCplex.readMIPStart(java.lang.String)

writeMIPStart

public void writeMIPStart(java.lang.String name,
                          int soln)
                   throws IloException
Writes a starting solution from the solution pool for a MIP in the MST format to the file denoted by name.

By convention, the file extension is .mst. The MST file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
soln - The index of the solution pool member for which to write a MIP start. A value of -1 specifies that the values written should correspond to the incumbent rather than a member of the solution pool.
Throws:
IloException
See Also:
IloCplex.readMIPStart(java.lang.String)

writeMIPStarts

public void writeMIPStarts(java.lang.String name)
                    throws IloException
Writes all starting solutions from the solution pool for a MIP in the MST format to the file denoted by name.

By convention, the file extension is .mst. The MST file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to write.
Throws:
IloException

readOrder

public void readOrder(java.lang.String name)
               throws IloException
Reads the ORD file specified by 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 reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to read.
Throws:
IloException
See Also:
IloCplex.writeOrder(java.lang.String)

readParam

public void readParam(java.lang.String name)
               throws IloException
Reads parameters and their settings from the file specified by name and applies them to the invoking object.

All parameter settings corresponding to those read from the file and that were previously active are overridden.

By convention, the file extension is .prm. The PRM file format is documented in the reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to read.
Throws:
IloException
See Also:
IloCplex.writeParam(java.lang.String)

readBasis

public void readBasis(java.lang.String name)
               throws IloException
Reads a simplex basis from the BAS file specified by 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 reference manual ILOG CPLEX File Formats.

Parameters:
name - The name of the file to read.
Throws:
IloException
See Also:
IloCplex.writeBasis(java.lang.String)

readSolution

public void readSolution(java.lang.String name)
                  throws IloException
Reads a solution from the SOL file denoted by 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 reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to read.
Throws:
IloException
See Also:
IloCplex.writeSolution(java.lang.String)

readVectors

public void readVectors(java.lang.String name)
                 throws IloException
Deprecated.  

Throws:
IloException

readMIPStart

public void readMIPStart(java.lang.String name)
                  throws IloException
Reads the SOL file denoted by 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 .sol. The SOL file format is documented in the reference manual ILOG CPLEX File Formats 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 ILOG CPLEX User's Manual.

Parameters:
name - The name of the file to read.
Throws:
IloException
See Also:
IloCplex.writeMIPStart(java.lang.String)

use

public void use(IloCplex.Callback cb)
         throws IloException
Installs a user-written callback.

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.

Parameters:
cb - 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.
Throws:
IloException
See Also:
IloCplex.Callback

clearCallbacks

public void clearCallbacks()
                    throws IloException
Removes all callbacks from the invoking IloCplex object.

Throws:
IloException

getRay

public IloLinearNumExpr getRay()
                        throws IloException

Returns a linear expression of the unbounded direction of a model proven unbounded by a simplex method.

This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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.

Returns:
A linear expression describing unbounded direction for the unbounded active model
Throws:
IloException

getDiverging

public IloCopyable getDiverging()
                         throws IloException

Returns the diverging variable or constraint from a model found infeasible by the primal simplex algorithm.

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.

Throws:
IloException

dualFarkas

public double dualFarkas(IloConstraint[] rng,
                         double[] y)
                  throws IloException

Returns a Farkas proof of infeasibility.

This is an advanced method.

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG 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 one of the simplex optimizers. 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 function CPXdualfarkas, documented in the reference manual of the Callable Library.

Parameters:
rng - Array of length getNrows where constraints corresponding to the values in y are returned.
y - array of length getNrows.
Returns:
The value of 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.
Throws:
IloException

qpIndefCertificate

public void qpIndefCertificate(IloNumVar[] var,
                               double[] x)
                        throws IloException

Returns a vector proving that the Q matrix of QP is not positive semi-definite.

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.

Parameters:
var - 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.
Throws:
IloException

end

public void end()

Releases the IloCplex license held by the invoking object and frees all the memory allocated by it.

When you no longer use an instance of IloCplex and any Concert model created with it, you should call the method end to release the license. 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) may no longer be used. Attempting to use them subsequently will cause the exception IloCplex.CplexEndedException to be thrown.


registerLicense

public static void registerLicense(java.lang.String ilm_CPLEX_license,
                                   int ilm_CPLEX_license_signature)
                            throws IloException

Passes memory-based information to the ILOG License Manager.

The registerLicense method passes memory-based information to the ILOG License Manager embedded inside the class IloCplex.

Parameters:
ilm_CPLEX_license - A string containing the RUNTIME key, which is obtained from ILOG.
ilm_CPLEX_license_signature - An integer associated with the RUNTIME key, obtained from ILOG with the key.
Throws:
IloException - if there is invalid information in the license key passed into the routine.
IloException

putenv

public static void putenv(java.lang.String envstr)
                   throws IloException

Sets the environment variable specifying the ILOG license file used by CPLEX.

This function sets the ILOG_LICENSE_FILE environment variable to specify the path to the file containing the ILOG license key. It must not be used to set any other environment variable.

Parameters:
envstr - String of the form ILOG_LICENSE_FILE=..., where ... is the setting of the environment variable ILOG_LICENSE_FILE .
Throws:
IloException - if the environment variable could not be set.
IloException

and

public final IloCplex.Goal and(IloCplex.Goal goal1,
                               IloCplex.Goal goal2)

Creates and returns a conjunctive goal (that is, an and-goal) from two arguments.

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.

Parameters:
goal1 - A goal to be pushed on the goal stack.
goal2 - A goal to be pushed on the goal stack.
Returns:
The and goal composed from the goals passed as arguments.

and

public final 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.

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.

Parameters:
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.
Returns:
The and goal composed from the goals passed as arguments.

and

public final 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.

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.

Parameters:
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.
Returns:
The and goal composed from the goals passed as arguments.

and

public final IloCplex.Goal and(IloCplex.Goal goal1,
                               IloCplex.Goal goal2,
                               IloCplex.Goal goal3,
                               IloCplex.Goal goal4,
                               IloCplex.Goal goal5)

Creates and returns a conjuctive goal (that is, an and-goal) from five arguments.

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.

Parameters:
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.
Returns:
The and goal composed from the goals passed as arguments.

and

public final 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.

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.

Parameters:
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.
Returns:
The and goal composed from the goals passed as arguments.

or

public final IloCplex.Goal or(IloCplex.Goal goal1,
                              IloCplex.Goal goal2)

Creates and returns an or-goal from two arguments.

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.

Parameters:
goal1 - A goal to be used for a child node.
goal2 - A goal to be used for a child node.
Returns:
The or goal composed from the goals passed as arguments.

or

public final IloCplex.Goal or(IloCplex.Goal goal1,
                              IloCplex.Goal goal2,
                              IloCplex.Goal goal3)

Creates and returns an or-goal from three arguments.

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.

Parameters:
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.
Returns:
The or goal composed from the goals passed as arguments.

or

public final IloCplex.Goal or(IloCplex.Goal goal1,
                              IloCplex.Goal goal2,
                              IloCplex.Goal goal3,
                              IloCplex.Goal goal4)

Creates and returns an or-goal from four arguments.

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.

Parameters:
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.
Returns:
The or goal composed from the goals passed as arguments.

or

public final 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.

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.

Parameters:
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.
Returns:
The or goal composed from the goals passed as arguments.

or

public final 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.

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.

Parameters:
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.
Returns:
The or goal composed from the goals passed as arguments.

branchAsCplex

public final 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.

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.


apply

public final 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.

In doing so, it changes the order of processing of the active nodes of the search tree defined by goal according to evaluator.

Returns:
The goal that applies the node selection strategy defined by evaluator to the search tree defined by goal.

limitSearch

public final IloCplex.Goal limitSearch(IloCplex.Goal goal,
                                       IloCplex.SearchLimit limit)

Returns a goal to limit a search tree.

This function 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.

Returns:
A goal imposing the search tree defined by goal to search limit limit.

solve

public final boolean solve(IloCplex.Goal goal)
                    throws IloException

Solves the active MIP model using the search strategy defined by the specified goal.

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.

Parameters:
goal - The goal that controls the branch-and-cut search to be performed.
Returns:
A Boolean value reporting whether a feasible solution has been found. This solution is not necessarily the optimal solution, if for example the search is prematurely terminated because a limit is encountered.
Throws:
IloException
See Also:
IloCplex.Goal

failGoal

public final IloCplex.Goal failGoal()

Creates and returns a goal that always fails.

The node on which the goal is executed will be pruned, thus discarding the subtree rooted at that node.

Returns:
The new fail goal.

constraintGoal

public final IloCplex.Goal constraintGoal(IloConstraint cut)
                                   throws IloException

Creates and returns a constraint goal for the specified constraint 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.

Parameters:
cut - The constraint to added to the node and its descendents.
Returns:
A constraint goal for adding cut.
Throws:
IloException

constraintGoal

public final IloCplex.Goal constraintGoal(IloConstraint[] cut)
                                   throws IloException

Creates and returns a constraint goal for the constraints specified in the array 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.

Parameters:
cut - The constraints to added to the current subtree.
Returns:
A constraint goal for adding the constraints in cut.
Throws:
IloException

globalCutGoal

public final IloCplex.Goal globalCutGoal(IloConstraint cut)
                                  throws IloException

Creates and returns a global cut goal for the constraint 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.

Parameters:
cut - The constraint to added as a global cut.
Returns:
A global cut goal for adding the constraint cut as a global cut.
Throws:
IloException

globalCutGoal

public final IloCplex.Goal globalCutGoal(IloConstraint[] cut)
                                  throws IloException

Creates and returns a global cut goal for the constraints specified in the array 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.

Parameters:
cut - The constraints to added as global cuts.
Returns:
A global cut goal for adding the constraints cut as global cuts.
Throws:
IloException

solutionGoal

public final IloCplex.Goal solutionGoal(IloNumVar[] vars,
                                        double[] vals)
                                 throws IloException

Creates and returns a solution goal.

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 that may get 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.

Parameters:
vars - 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].
Returns:
The goal that injects the solution.
Throws:
IloException

eqGoal

public IloCplex.Goal eqGoal(IloNumExpr expr,
                            double rhs)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr - The lefthand side expression of the constraint.
rhs - The righthand side value of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

eqGoal

public IloCplex.Goal eqGoal(IloNumExpr expr1,
                            IloNumExpr expr2)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr1 - The lefthand side expression of the constraint.
expr2 - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

eqGoal

public IloCplex.Goal eqGoal(double lhs,
                            IloNumExpr expr)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
lhs - The lefthand side value of the constraint.
expr - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

geGoal

public IloCplex.Goal geGoal(IloNumExpr expr,
                            double rhs)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr - The lefthand side expression of the constraint.
rhs - The righthand side value of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

geGoal

public IloCplex.Goal geGoal(IloNumExpr expr1,
                            IloNumExpr expr2)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr1 - The lefthand side expression of the constraint.
expr2 - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

geGoal

public IloCplex.Goal geGoal(double lhs,
                            IloNumExpr expr)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
lhs - The lefthand side value of the constraint.
expr - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

leGoal

public IloCplex.Goal leGoal(IloNumExpr expr,
                            double rhs)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr - The lefthand side expression of the constraint.
rhs - The righthand side value of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

leGoal

public IloCplex.Goal leGoal(IloNumExpr expr1,
                            IloNumExpr expr2)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
expr1 - The lefthand side expression of the constraint.
expr2 - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

leGoal

public IloCplex.Goal leGoal(double lhs,
                            IloNumExpr expr)
                     throws IloException

Creates a constraint goal for the constraint 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.

Parameters:
lhs - The lefthand side value of the constraint.
expr - The righthand side expression of the constraint.
Returns:
A constraint goal for adding the specified constraint.
Throws:
IloException

getSolnPoolMeanObjValue

public double getSolnPoolMeanObjValue()
                               throws IloException
Returns the mean objective value of the solution pool.

Returns:
The mean objective value of the solution pool.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getSolnPoolNsolns

public int getSolnPoolNsolns()
Returns the number of solutions in the solution pool.

Returns:
The number of solutions in the solution pool.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

getSolnPoolNreplaced

public int getSolnPoolNreplaced()
Returns the number of replaced solutions.

Returns:
The number of replaced solutions.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

delSolnPoolSoln

public void delSolnPoolSoln(int soln)
                     throws IloException

Deletes the designated solution from the solution pool.

Parameters:
soln - The index of the solution pool member which is to be deleted.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

delSolnPoolSolns

public void delSolnPoolSolns(int start,
                             int num)
                      throws IloException

Deletes a range of solutions from the solution pool.

Parameters:
start - The index of the first solutio which is to be deleted from the solution pool.
num - The number of consecutive solutions which are to be deleted from the solution pool.
Throws:
IloException - If the method fails, an exception of type IloException, or one of its derived classes, is thrown.

addDiversityFilter

public IloCplex.FilterIndex addDiversityFilter(double lower_cutoff,
                                               double upper_cutoff,
                                               IloNumVar[] vars,
                                               double[] weights,
                                               double[] refval)

Creates and installs a diversity filter for the designated variables with the specified lower and upper cutoff values, reference values, and weights.


addDiversityFilter

public IloCplex.FilterIndex addDiversityFilter(double lower_cutoff,
                                               double upper_cutoff,
                                               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 cutoff values, reference values, and weights.


getFilterIndex

public IloCplex.FilterIndex getFilterIndex(java.lang.String s)
                                    throws IloException

Accesses the index of the filter specified by the name.

Throws:
IloException

getNfilters

public int getNfilters()

Returns the number of filters associated with the solution pool.


getFilterType

public int getFilterType(IloCplex.FilterIndex i)

Accesses the type of the filter specified by its index.


getDiversityFilterLowerCutoff

public double getDiversityFilterLowerCutoff(IloCplex.FilterIndex i)

Accesses the lower cutoff of a diversity filter, specified by its index.


getDiversityFilterUpperCutoff

public double getDiversityFilterUpperCutoff(IloCplex.FilterIndex i)

Accesses the upper cutoff of a diversity filter, specified by its index.


getFilterVars

public IloNumVar[] getFilterVars(IloCplex.FilterIndex i)

Accesses the variables of a diversity filter, specified by its index.


getDiversityFilterWeights

public double[] getDiversityFilterWeights(IloCplex.FilterIndex i)

Accesses the weights of a diversity filter, specified by its index.


getDiversityFilterRefVals

public double[] getDiversityFilterRefVals(IloCplex.FilterIndex i)

Accesses the reference values of a diversity filter, specified by its index.


addRangeFilter

public 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 values.


addRangeFilter

public 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 values.


getRangeFilterLowerBound

public double getRangeFilterLowerBound(IloCplex.FilterIndex i)

Accesses the lower bound of the range filter specified by its index.


getRangeFilterUpperBound

public double getRangeFilterUpperBound(IloCplex.FilterIndex i)

Accesses the upper bound of the range filter specified by its index.


getRangeFilterCoefs

public double[] getRangeFilterCoefs(IloCplex.FilterIndex i)

Accesses the coefficients of the range filter specified by its index.


delFilter

public void delFilter(IloCplex.FilterIndex i)
               throws IloException

Deletes the specified range filter from the solution pool.

Throws:
IloException

readFilters

public IloCplex.FilterIndex[] readFilters(java.lang.String filename)
                                   throws IloException

Reads filters from a specified file and associates them with the solution pool.

For more detail about the format of files containing filters for the solution pool, see the topic FLT in the ILOG CPLEX File Format Reference Manual.

Throws:
IloException

writeFilters

public void writeFilters(java.lang.String filename)
                  throws IloException

Writes the filters associated with the solution pool to the specified file.

For more detail about the format of files containing filters for the solution pool, see the topic FLT in the ILOG CPLEX File Format Reference Manual.

Throws:
IloException

populate

public boolean populate()
                 throws IloException
Generates multiple solutions to a mixed integer programming (MIP) model.

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:

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.

Throws:
IloException

use

public IloCplex.Aborter use(IloCplex.Aborter abort)
                     throws IloException

Instructs the invoking object to use the aborter to control termination of its solving and tuning methods.

If another aborter is already being used by the invoking object, then this method overrides the previously used aborter.

Returns:
A handle to the aborter installed in the invoking object.
Throws:
IloException

getAborter

public IloCplex.Aborter getAborter()

Returns a handle to the aborter being used by the invoking object.


remove

public void remove(IloCplex.Aborter abort)
            throws IloException

Removes the specified aborter from the invoking object.

Throws:
IloException