NO FRAMES

Class IloCplex::GoalI

Definition file: ilcplex/ilocplexi.h
Note

This is an advanced class. Advanced classes 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 classes instead.

Goals can be used to control the branch & cut search in IloCplex. Goals are implemented in subclasses of the class IloCplex::GoalI. This is the base class for user-written implementation classes of CPLEX goals.

To implement your own goal you need to create a subclass of IloCplex::GoalI and implement its pure virtual methods execute and duplicateGoal. You may use one of the ILOCPLEXGOAL0 macros to assist you in doing so. After implementing your goal class, you use an instance of the class by passing it to the solve method when solving the model.

The method duplicateGoal may be called by IloCplex to create copies of a goal when needed for parallel branch & cut search. Thus the implementation of this method must create and return an exact copy of the invoked object itself.

The method execute controls the branch & cut search of IloCplex by the goal it returns. When IloCplex processes a node, it pops the top goal from the node's goal stack and calls method execute of that goal. It continues executing the top goal from the stack until the node is deactivated or the goal stack is empty. If the goal stack is empty, IloCplex proceeds with the built-in search strategy for the subtree rooted at the current node.

The class IloCplex::GoalI provides several methods for querying information about the current node. The method execute controls how to proceed with the branch & cut search via the goal it returns. The returned goal, unless it is the 0 goal, is pushed on the goal stack and will thus be executed next.

See also the chapter about goals in the ILOG CPLEX User's Manual.

Constructor Summary
public GoalI(IloEnv env)
Method Summary
public voidabort()
public static IloCplex::GoalAndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2)
public static IloCplex::GoalBranchAsCplexGoal(IloEnv env)
public virtual IloCplex::GoalduplicateGoal()
public virtual IloCplex::Goalexecute()
public static IloCplex::GoalFailGoal(IloEnv env)
public IloNumgetBestObjValue() const
public IloNumgetBranch(IloNumVarArray vars, IloNumArray bounds, IloCplex::BranchDirectionArray dirs, IloInt i) const
public GoalI::BranchTypegetBranchType() const
public IloNumgetCutoff() const
public IloCplex::BranchDirectiongetDirection(const IloIntVar var)
public IloCplex::BranchDirectiongetDirection(const IloNumVar var)
public IloNumgetDownPseudoCost(const IloIntVar var) const
public IloNumgetDownPseudoCost(const IloNumVar var) const
public IloEnvgetEnv() const
public voidgetFeasibilities(GoalI::IntegerFeasibilityArray stats, const IloIntVarArray vars) const
public voidgetFeasibilities(GoalI::IntegerFeasibilityArray stats, const IloNumVarArray vars) const
public GoalI::IntegerFeasibilitygetFeasibility(const IloSOS2 sos) const
public GoalI::IntegerFeasibilitygetFeasibility(const IloSOS1 sos) const
public GoalI::IntegerFeasibilitygetFeasibility(const IloIntVar var) const
public GoalI::IntegerFeasibilitygetFeasibility(const IloNumVar var) const
public IloNumgetIncumbentObjValue() const
public IloNumgetIncumbentValue(const IloIntVar var) const
public IloNumgetIncumbentValue(const IloNumVar var) const
public voidgetIncumbentValues(IloNumArray val, const IloIntVarArray vars) const
public voidgetIncumbentValues(IloNumArray val, const IloNumVarArray vars) const
public IloNumgetLB(const IloIntVar var) const
public IloNumgetLB(const IloNumVar var) const
public voidgetLBs(IloNumArray vals, const IloIntVarArray vars) const
public voidgetLBs(IloNumArray vals, const IloNumVarArray vars) const
public IloModelgetModel() const
public IloIntgetMyThreadNum() const
public IloIntgetNbranches() const
public IloIntgetNcliques() const
public IloIntgetNcols() const
public IloIntgetNcovers() const
public IloIntgetNdisjunctiveCuts() const
public IloIntgetNflowCovers() const
public IloIntgetNflowPaths() const
public IloIntgetNfractionalCuts() const
public IloIntgetNGUBcovers() const
public IloIntgetNimpliedBounds() const
public IloIntgetNiterations() const
public IloIntgetNMIRs() const
public IloIntgetNnodes() const
public IloIntgetNremainingNodes() const
public IloIntgetNrows() const
public IloNumgetObjCoef(const IloIntVar var) const
public IloNumgetObjCoef(const IloNumVar var) const
public voidgetObjCoefs(IloNumArray vals, const IloIntVarArray vars) const
public voidgetObjCoefs(IloNumArray vals, const IloNumVarArray vars) const
public IloNumgetObjValue() const
public IloNumgetPriority(const IloIntVar var) const
public IloNumgetPriority(const IloNumVar var) const
public IloNumgetSlack(const IloRange rng) const
public voidgetSlacks(IloNumArray vals, const IloRangeArray rngs) const
public IloNumgetUB(const IloIntVar var) const
public IloNumgetUB(const IloNumVar var) const
public voidgetUBs(IloNumArray vals, const IloIntVarArray vars) const
public voidgetUBs(IloNumArray vals, const IloNumVarArray vars) const
public IloNumgetUpPseudoCost(const IloIntVar var) const
public IloNumgetUpPseudoCost(const IloNumVar var) const
public IloIntgetUserThreads() const
public IloNumgetValue(const IloIntVar var) const
public IloNumgetValue(const IloNumVar var) const
public IloNumgetValue(const IloExpr expr) const
public voidgetValues(IloNumArray vals, const IloIntVarArray vars) const
public voidgetValues(IloNumArray vals, const IloNumVarArray vars) const
public static IloCplex::GoalGlobalCutGoal(IloConstraintArray con)
public static IloCplex::GoalGlobalCutGoal(IloConstraint con)
public IloBoolhasIncumbent() const
public IloBoolisIntegerFeasible() const
public IloBoolisSOSFeasible(const IloSOS2 sos2) const
public IloBoolisSOSFeasible(const IloSOS1 sos1) const
public static IloCplex::GoalOrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2)
public static IloCplex::GoalSolutionGoal(const IloIntVarArray vars, const IloNumArray vals)
public static IloCplex::GoalSolutionGoal(const IloNumVarArray vars, const IloNumArray vals)
Inner Enumeration
GoalI::BranchType
GoalI::IntegerFeasibility
Inner Typedef
GoalI::IntegerFeasibilityArray
Constructor Detail

GoalI

public GoalI(IloEnv env)

The goal constructor. It requires an instance of the same IloEnv as the IloCplex object with which to use the goal. The environment can later be queried by calling method getEnv.


Method Detail

AndGoal

public static IloCplex::Goal AndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2)
public static IloCplex::Goal AndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4, IloCplex::Goal goal5, IloCplex::Goal goal6)
public static IloCplex::Goal AndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4, IloCplex::Goal goal5)
public static IloCplex::Goal AndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4)
public static IloCplex::Goal AndGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3)

The static methods AndGoal all return a goal that pushes the goals passed as parameters onto the goal stack in reverse order. As a consequence, the goals will be executed in the order they are passed as parameters to the AndGoal function.


BranchAsCplexGoal

public static IloCplex::Goal BranchAsCplexGoal(IloEnv env)

This static function returns a goal that creates the same branches as the currently selected built-in branch strategy of IloCplex would choose at the current node. This goal allows you to proceed with the IloCplex search strategy, but keeps the search under goal control, thereby giving you the option to intervene at any point.

This goal is also important when you use node evaluators while you use a built-in branching strategy.

For example, consider the execute method of a goal starting like this:


  if (!isIntegerFeasible())
      return AndGoal(BranchAsCplexGoal(getEnv()), this);

  // do something

 

It would do something only when IloCplex found a solution it considers to be a candidate for a new incumbent. Note there is a test of integer feasibility before returning BranchAsCplexGoal. Without the test, BranchAsCplex would be executed for a solution IloCplex considers to be feasible, but IloCplex would not know how to branch on it. An endless loop would result.


FailGoal

public static IloCplex::Goal FailGoal(IloEnv env)

This static method creates a goal that fails. That means that the branch where the goal is executed will be pruned or, equivalently, the search is discontinued at that node and the node is discarded.


GlobalCutGoal

public static IloCplex::Goal GlobalCutGoal(IloConstraintArray con)

This method creates a goal that when executed adds the constraints (provided in the paramter array con) as global cuts to the model. These global cuts must be valid for the entire model, not only for the current subtree. In other words, these global cuts will be respected at every node.

IloCplex takes over memory managment for the cuts passed to the method GlobalCutGoal. Thus IloCplex will call the method end as soon as it can be discarded after the goal executes. Calling end yourself or the constraints in the array con passed to method GlobalCutGoal or the array itself is an error and must be avoided.


GlobalCutGoal

public static IloCplex::Goal GlobalCutGoal(IloConstraint con)

This method creates a goal that when executed adds the constraint con (provided as a parameter) as global cuts to the model. These global cuts must be valid for the entire model, not only for the current subtree. In other words, these global cuts will be respected at every node.

IloCplex takes over memory managment for the cut passed to the method GlobalCutGoal. Thus IloCplex will call the method end as soon as it can be discarded after the goal executes. Calling end yourself for the constraint passed to method GlobalCutGoal is an error and must be avoided.


OrGoal

public static IloCplex::Goal OrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2)
public static IloCplex::Goal OrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4, IloCplex::Goal goal5, IloCplex::Goal goal6)
public static IloCplex::Goal OrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4, IloCplex::Goal goal5)
public static IloCplex::Goal OrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3, IloCplex::Goal goal4)
public static IloCplex::Goal OrGoal(IloCplex::Goal goal1, IloCplex::Goal goal2, IloCplex::Goal goal3)

The static methods OrGoal all return a goal that creates as many branches (or, equivalently, subproblems) as there are parameters. Each of the subnodes will be initialized with the remaining goal stack of the current node. In addition, the goal parameter will be pushed on the goal stack of the corresponding subgoal. If more than six branches need to be created, instances of OrGoal can be combined.


SolutionGoal

public static IloCplex::Goal SolutionGoal(const IloIntVarArray vars, const IloNumArray vals)

This static method creates and returns a goal that attempts to inject a solution specified by setting the variables listed in array vars to the corresponding values listed in the array vals.

IloCplex will not blindly accept such a solution as a new incumbent. Instead, it will make sure that this solution is compatible with both the model and the goals. When checking feasibility with goals, it checks feasibility with both the goals that have already been executed and the 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.

IloCplex takes over memory managment for arrays vars and vals passed to SolutionGoal. Thus IloCplex will call method end for these arrays as soon as they can be discarded. Calling end for the arrays passed to SolutionGoal is an error and must be avoided.


SolutionGoal

public static IloCplex::Goal SolutionGoal(const IloNumVarArray vars, const IloNumArray vals)

This static method creates and returns a goal that attempts to inject a solution specified by setting the variables listed in array vars to the corresponding values listed in the array vals.

IloCplex will not blindly accept such a solution as a new incumbent. Instead, it will make sure that this solution is compatible with both the model and the goals. When checking feasibility with goals, it checks feasibility with both the goals that have already been executed and the 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.

IloCplex takes over memory managment for arrays vars and vals passed to SolutionGoal. Thus IloCplex will call method end for these arrays as soon as they can be discarded. Calling end for the arrays passed to SolutionGoal is an error and must be avoided.


abort

public void abort()

Abort the optimization, that is, the execution of method IloCplex::solve currently in process.


duplicateGoal

public virtual IloCplex::Goal duplicateGoal()

This virtual method must be implemented by the user. It must return a copy of the invoking goal object. This method may be called by IloCplex when doing parallel branch & cut search.


execute

public virtual IloCplex::Goal execute()

This virtual method must be implemented by the user to specify the logic of the goal. The instance of IloCplex::Goal returned by this method will be added to the goal stack of the node where the invoking goal is being executed for further execution.


getBestObjValue

public IloNum getBestObjValue() const

This method returns the currently best known bound on the optimal solution value of the problem at the time the invoking goal is executed by an instance of IloCplex while solving a MIP. When a model has been solved to optimality, this value matches the optimal solution value. Otherwise, this value is computed for a minimization (maximization) problem as the minimum (maximum) objective function value of all remaining unexplored nodes.


getBranch

public IloNum getBranch(IloNumVarArray vars, IloNumArray bounds, IloCplex::BranchDirectionArray dirs, IloInt i) const

This method accesses branching information for the i-th branch that the invoking instance of IloCplex is about to create. The parameter i must be between 0 (zero) and getNbranches - 1; that is, it must be a valid index of a branch; normally, it will be zero or one.

A branch is normally defined by a set of variables and the bounds for these variables. Branches that are more complex cannot be queried. The return value is the node estimate for that branch.

dir[j] == IloCplex::BranchUp

means that bounds[j] specifies a lower bound for vars[j].

dirs[j] == IloCplex::BranchDown

means that bounds[j] specifies an upper bound for vars[j].


getBranchType

public GoalI::BranchType getBranchType() const

This method returns the type of branching IloCplex is going to do for the current node.


getCutoff

public IloNum getCutoff() const

The method returns the current cutoff value. An instance of IloCplex uses the cutoff value (the value of the objective function of the subproblem at a node in the search tree) to decide when to prune nodes from the search tree (that is, when to cut off that node and discard the nodes beyond it). The cutoff value is updated whenever a new incumbent is found.


getDirection

public IloCplex::BranchDirection getDirection(const IloIntVar var)

This method returns the branch direction previously assigned to variable var with method IloCplex::setDirection or IloCplex::setDirections. If no direction has been assigned, IloCplex::BranchGlobal will be returned.


getDirection

public IloCplex::BranchDirection getDirection(const IloNumVar var)

This method returns the branch direction previously assigned to variable var with method IloCplex::setDirection or IloCplex::setDirections. If no direction has been assigned, IloCplex::BranchGlobal will be returned.


getDownPseudoCost

public IloNum getDownPseudoCost(const IloIntVar var) const

This method returns the current pseudo cost for branching downward on the variable var.


getDownPseudoCost

public IloNum getDownPseudoCost(const IloNumVar var) const

This method returns the current pseudo cost for branching downward on the variable var.


getEnv

public IloEnv getEnv() const

Returns the instance of IloEnv passed to the constructor of the goal.


getFeasibilities

public void getFeasibilities(GoalI::IntegerFeasibilityArray stats, const IloIntVarArray vars) const

This method considers whether each of the variables in the array vars is integer feasible, integer infeasible, or implied integer feasible and puts the status in the corresponding element of the array stats.


getFeasibilities

public void getFeasibilities(GoalI::IntegerFeasibilityArray stats, const IloNumVarArray vars) const

This method considers whether each of the variables in the array vars is integer feasible, integer infeasible, or implied integer feasible and puts the status in the corresponding element of the array stats.


getFeasibility

public GoalI::IntegerFeasibility getFeasibility(const IloSOS2 sos) const

This method specifies whether the SOS sos is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

public GoalI::IntegerFeasibility getFeasibility(const IloSOS1 sos) const

This method specifies whether the SOS sos is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

public GoalI::IntegerFeasibility getFeasibility(const IloIntVar var) const

This method specifies whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

public GoalI::IntegerFeasibility getFeasibility(const IloNumVar var) const

This method specifies whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getIncumbentObjValue

public IloNum getIncumbentObjValue() const

This method returns the value of the objective function of the incumbent solution (that is, the best integer solution found so far). If there is no incumbent, this method throws an exception.


getIncumbentValue

public IloNum getIncumbentValue(const IloIntVar var) const

This method returns the value of var in the incumbent solution. If there is no incumbent, this method throws an exception.


getIncumbentValue

public IloNum getIncumbentValue(const IloNumVar var) const

This method returns the value of var in the incumbent solution. If there is no incumbent, this method throws an exception.


getIncumbentValues

public void getIncumbentValues(IloNumArray val, const IloIntVarArray vars) const

Returns the value of each variable in the array vars with respect to the current incumbent solution, and it puts those values into the corresponding array vals. If there is no incumbent, this method throws an exception.


getIncumbentValues

public void getIncumbentValues(IloNumArray val, const IloNumVarArray vars) const

Returns the value of each variable in the array vars with respect to the current incumbent solution, and it puts those values into the corresponding array vals. If there is no incumbent, this method throws an exception.


getLB

public IloNum getLB(const IloIntVar var) const

This method returns the lower bound of var in the current node relaxation. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks a lower bound, then getLB returns a value greater than or equal to -IloInfinity for greater than or equal to constraints with no lower bound.


getLB

public IloNum getLB(const IloNumVar var) const

This method returns the lower bound of var in the current node relaxation. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks a lower bound, then getLB returns a value greater than or equal to -IloInfinity for greater than or equal to constraints with no lower bound.


getLBs

public void getLBs(IloNumArray vals, const IloIntVarArray vars) const

This method puts the lower bound in the current node relaxation of each element of the array vars into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks a lower bound, then getLBs returns a value greater than or equal to -IloInfinity for greater than or equal to constraints with no lower bound.


getLBs

public void getLBs(IloNumArray vals, const IloNumVarArray vars) const

This method puts the lower bound in the current node relaxation of each element of the array vars into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks a lower bound, then getLBs returns a value greater than or equal to -IloInfinity for greater than or equal to constraints with no lower bound.


getModel

public IloModel getModel() const

This method returns the model currently extracted for the instance of IloCplex where the invoking goal applies.


getMyThreadNum

public IloInt getMyThreadNum() const

Returns the identifier of the parallel thread being currently executed. This number is between 0 (zero) and the value returned by the method getUserThreads()-1.


getNGUBcovers

public IloInt getNGUBcovers() const

Returns the total number of GUB cover cuts that have been added to the model so far during the current optimization.


getNMIRs

public IloInt getNMIRs() const

Returns the total number of MIR cuts that have been added to the model so far during the current optimization.


getNbranches

public IloInt getNbranches() const

This method returns the number of branches IloCplex is going to create at the current node.


getNcliques

public IloInt getNcliques() const

Returns the total number of clique cuts that have been added to the model so far during the current optimization.


getNcols

public IloInt getNcols() const

This method returns the number of columns in the current optimization model.


getNcovers

public IloInt getNcovers() const

Returns the total number of cover cuts that have been added to the model so far during the current optimization.


getNdisjunctiveCuts

public IloInt getNdisjunctiveCuts() const

Returns the total number of disjunctive cuts that have been added to the model so far during the current optimization.


getNflowCovers

public IloInt getNflowCovers() const

Returns the total number of flow cover cuts that have been added to the model so far during the current optimization.


getNflowPaths

public IloInt getNflowPaths() const

Returns the total number of flow path cuts that have been added to the model so far during the current optimization.


getNfractionalCuts

public IloInt getNfractionalCuts() const

Returns the total number of fractional cuts that have been added to the model so far during the current optimization.


getNimpliedBounds

public IloInt getNimpliedBounds() const

Returns the total number of implied bound cuts that have been added to the model so far during the current optimization.


getNiterations

public IloInt getNiterations() const

Returns the total number of iterations executed so far during the current optimization to solve the node relaxations.


getNnodes

public IloInt getNnodes() const

This method returns the number of nodes already processed in the current optimization.


getNremainingNodes

public IloInt getNremainingNodes() const

This method returns the number of nodes left to explore in the current optimization.


getNrows

public IloInt getNrows() const

This method returns the number of rows in the current optimization model.


getObjCoef

public IloNum getObjCoef(const IloIntVar var) const

Returns the linear objective coefficient for var in the model currently being solved.


getObjCoef

public IloNum getObjCoef(const IloNumVar var) const

Returns the linear objective coefficient for var in the model currently being solved.


getObjCoefs

public void getObjCoefs(IloNumArray vals, const IloIntVarArray vars) const

This method puts the linear objective coefficient of each of the variables in the array vars into the corresponding element of the array vals.


getObjCoefs

public void getObjCoefs(IloNumArray vals, const IloNumVarArray vars) const

This method puts the linear objective coefficient of each of the variables in the array vars into the corresponding element of the array vals.


getObjValue

public IloNum getObjValue() const

This method returns the objective value of the solution of the current node.

If you need the object representing the objective itself, consider the method IloCplex::getObjective instead.


getPriority

public IloNum getPriority(const IloIntVar var) const

Returns the branch priority used for variable var in the current optimization.


getPriority

public IloNum getPriority(const IloNumVar var) const

Returns the branch priority used for variable var in the current optimization.


getSlack

public IloNum getSlack(const IloRange rng) const

This method returns the slack value for the constraint specified by rng in the solution of the current node relaxation.


getSlacks

public void getSlacks(IloNumArray vals, const IloRangeArray rngs) const

This method puts the slack value in the solution of the current node relaxation of each of the constraints in the array of ranges rngs into the corresponding element of the array vals.


getUB

public IloNum getUB(const IloIntVar var) const

This method returns the upper bound of the variable var in the current node relaxation. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks an upper bound, then getUB returns a value less than or equal to IloInfinity for less than or equal to constraints with no lower bound.


getUB

public IloNum getUB(const IloNumVar var) const

This method returns the upper bound of the variable var in the current node relaxation. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks an upper bound, then getUB returns a value less than or equal to IloInfinity for less than or equal to constraints with no lower bound.


getUBs

public void getUBs(IloNumArray vals, const IloIntVarArray vars) const

This method puts the upper bound in the current node relaxation of each element of the array vars into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks an upper bound, then getUBs returns a value less than or equal to IloInfinity for less than or equal to constraints with no lower bound.


getUBs

public void getUBs(IloNumArray vals, const IloNumVarArray vars) const

This method puts the upper bound in the current node relaxation of each element of the array vars into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.

Unbounded Variables

If a variable lacks an upper bound, then getUBs returns a value less than or equal to IloInfinity for less than or equal to constraints with no lower bound.


getUpPseudoCost

public IloNum getUpPseudoCost(const IloIntVar var) const

This method returns the current pseudo cost for branching upward on the variable var.


getUpPseudoCost

public IloNum getUpPseudoCost(const IloNumVar var) const

This method returns the current pseudo cost for branching upward on the variable var.


getUserThreads

public IloInt getUserThreads() const

This method returns the total number of parallel threads currently running.


getValue

public IloNum getValue(const IloIntVar var) const

This method returns the value of the variable var in the solution of the current node relaxation.


getValue

public IloNum getValue(const IloNumVar var) const

This method returns the value of the variable var in the solution of the current node relaxation.


getValue

public IloNum getValue(const IloExpr expr) const

This method returns the value of the expression expr in the solution of the current node relaxation.


getValues

public void getValues(IloNumArray vals, const IloIntVarArray vars) const

This method puts the current node relaxation solution value of each variable in the array vars into the corresponding element of the array vals.


getValues

public void getValues(IloNumArray vals, const IloNumVarArray vars) const

This method puts the current node relaxation solution value of each variable in the array vars into the corresponding element of the array vals.


hasIncumbent

public IloBool hasIncumbent() const

This method returns IloTrue if an integer feasible solution has been found.


isIntegerFeasible

public IloBool isIntegerFeasible() const

This method returns IloTrue if the solution of the current node is integer feasible.


isSOSFeasible

public IloBool isSOSFeasible(const IloSOS2 sos2) const

This method returns IloTrue if the solution of the current node is SOS feasible for the special ordered set specified in its argument. The SOS passed as a parameter to this method must be of type 2; the equivalent method for an SOS of type 1 is also available. See the User's Manual for more about these types of special ordered sets.


isSOSFeasible

public IloBool isSOSFeasible(const IloSOS1 sos1) const

This method returns IloTrue if the solution of the current node is SOS feasible for the special ordered set specified in its argument. The SOS passed as a parameter to this method must be of type 1; the equivalent method for an SOS of type 2 is also available. See the User's Manual for more about these types of special ordered sets.


Inner Enumeration Detail

Enumeration BranchType

Definition file: ilcplex/ilocplexi.h

IloCplex::GoalI::BranchType is an enumeration limited in scope to the class IloCplex::GoalI. This enumeration is used by the method IloCplex::GoalI::getBranchType to tell what kind of branch IloCplex is about to make:

See Also:

Fields
BranchOnVariable
= CPX_TYPE_VAR
BranchOnSOS1
= CPX_TYPE_SOS1
BranchOnSOS2
= CPX_TYPE_SOS2
BranchOnAny
= CPX_TYPE_ANY
UserBranch

Enumeration IntegerFeasibility

Definition file: ilcplex/ilocplexi.h

The enumeration IloCplex::GoalI::IntegerFeasibility is an enumeration limited in scope to the class IloCplex::GoalI. This enumeration is used by IloCplex::GoalI::getFeasibility to access the integer feasibility of a variable or SOS in the current node solution:

See Also:

Fields
ImpliedInfeasible
Feasible
= CPX_INTEGER_FEASIBLE
Infeasible
= CPX_INTEGER_INFEASIBLE
ImpliedFeasible
= CPX_IMPLIED_INTEGER_FEASIBLE
Inner Typedef Detail

Typedef IntegerFeasibilityArray

Definition file: ilcplex/ilocplexi.h

IloArray< IntegerFeasibility > IntegerFeasibilityArray

This type defines an array type for IloCplex::GoalI::IntegerFeasibility. The fully qualified name of an integer feasibility array is IloCplex::GoalI::IntegerFeasibilityArray.

See Also: