ilog.cplex
Class IloCplex.Goal

java.lang.Object
  |
  +--ilog.cplex.IloCplex.Goal
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
IloCplex

public abstract static class IloCplex.Goal
extends java.lang.Object
implements java.lang.Cloneable

Goals can be used to control the branch-and-cut search in IloCplex. Goals are implemented in subclasses of class IloCplex.Goal. Thus, 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.Goal and implement its pure virtual method execute. After implementing your goal class, you use it by calling the method IloCplex.solve(goal) instead of the standard IloCplex.solve without parameter.

The execute method is called by IloCplex at each branch-and-cut node (referred to as the current node) after the node relaxation has been solved. Every node maintains a stack of goals, and the top goal from this stack is popped and executed until the stack becomes empty or some special goal is encountered as described below. When the goal stack of a node becomes empty, IloCplex continues with its built-in search for that subtree. When calling IloCplex.solve(goal), goal is simply pushed on the goal stack of the root node before commencing the branch-and-cut search.

The method IloCplex.Goal.execute is where you can control the branch-and-cut search of IloCplex. Class IloCplex.Goal provides several methods for querying information about the current node. It is, however, the goal returned by the execute method that determines how to proceed with the search. IloCplex provides several methods that create special goals that can be used to define the ongoing search in addition to any user-written goal:

Goals returned by IloCplex.or and IloCplex.and allow you to combine goals. IloCplex.and allows you to execute different goals at one node, while IloCplex.or allows you to execute different goals on different newly, created nodes. A typical use of these two goals in a return statement of a user written goal is:

return cplex.and ( cplex.or (branch1, branch2), this);

The IloCplex.and goal first pushes this, that is, the goal currently being executed, on the goal stack and then it pushes the IloCplex.or goal. Thus the IloCplex.or goal is on top of the stack and will be executed next. When the IloCplex.or is executed, it creates two new nodes and copies the remaining goal stack to both of them. Thus both new nodes will have this goal on top of the goal stack at this point. Then the IloCplex.or proceeds to push branch1 on the goal stack of the first child node and branch2 on the goal stack of the second goal child node. Typically, branch1 and branch2 would eventually contain constraint goals so by executing branch1 and branch2 at the respective child nodes, the child nodes will be restricted to represent smaller subproblems than their parent. After branch1 and branch2 have been executed this is on top of the node stack of both child nodes, that is, both child nodes will continue branching according to the same rule. In summary, the above example creates branches described branch1 and branch2 and continues in both branches to control the same search strategy this.

If the default implementation of method clone is not adequate and the goal is to be used for parallel optimization, this method also needs to be implemented by the user. Recall that the default clone method performs a shallow copy, so typically a user implementation would perform a deep copy for objects that should be local to threads or use the synchronize keyword where synchronization is required.

For more information about goals see the chapter in the ILOG CPLEX User's Manual.


Constructor Summary
IloCplex.Goal()
           
 
Method Summary
abstract  IloCplex.Goal execute(ilog.cplex.IloCplex cplex)
          This method must be implemented by the user to specify the logic of the goal.
protected  double getBestObjValue()
          Returns a bound on the optimal solution value of the active problem.
protected  double[] getBranches(ilog.concert.IloNumVar[][] vars, double[][] bounds, IloCplex.BranchDirection[][] dirs)
          Queries the branches IloCplex would create at the current node unless overridden by the invoking goal.
protected  IloCplex.BranchType getBranchType()
          Returns the type of branching IloCplex is going to do at the current node unless overridden by the invoking goal.
protected  double getCutoff()
          Returns the cutoff for the objective value when nodes are being solved during branch-and-cut search.
protected  IloCplex.BranchDirection getDirection(ilog.concert.IloNumVar var)
          Returns the branch direction for variable var.
protected  double getDownPseudoCost(ilog.concert.IloNumVar var)
          Returns the pseudo cost for branching down on variable var.
protected  IloCplex.IntegerFeasibilityStatus[] getFeasibilities(ilog.concert.IloNumVar[] var)
          Indicates whether the variables in array var are integer feasible, integer infeasible, or implied integer feasible in the current node solution.
protected  IloCplex.IntegerFeasibilityStatus[] getFeasibilities(ilog.concert.IloNumVar[] var, int start, int num)
          Indicates whether the specified variables in array var are integer feasible, integer infeasible, or implied integer feasible in the current node solution.
protected  IloCplex.IntegerFeasibilityStatus getFeasibility(ilog.concert.IloNumVar var)
          Indicates whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.
protected  double getIncumbentObjValue()
          Returns the objective value of the current best integer solution.
protected  double getIncumbentValue(ilog.concert.IloNumVar var)
          Returns the value of variable var for the current best integer solution.
protected  double[] getIncumbentValues(ilog.concert.IloNumVar[] vars)
          Returns incumbent solution values for an array of variables.
protected  double[] getIncumbentValues(ilog.concert.IloNumVar[] vars, int start, int num)
          Returns the incumbent solution values for a set of variables.
protected  double getLB(ilog.concert.IloNumVar var)
          Returns the current lower bound for variable var.
protected  double[] getLBs(ilog.concert.IloNumVar[] var)
          Returns the current lower bounds for an array of variables.
protected  double[] getLBs(ilog.concert.IloNumVar[] var, int start, int num)
          Returns the current lower bounds for a set of variables.
protected  int getNbranches()
          Returns the number of branches IloCplex is going to create at the current node unless overridden by the invoking goal.
protected  int getNcliques()
          Returns the number of clique cuts that have been added to the model during the current optimization.
protected  int getNcovers()
          Returns the number of cover cuts that have been added to the model during the current optimization.
protected  int getNdisjunctiveCuts()
          Returns the number of disjunctive cuts that have been added to the model during the current optimization.
protected  int getNflowCovers()
          Returns the number of flow cover cuts that have been added to the model during the current optimization.
protected  int getNflowPaths()
          Returns the number of flow path cuts that have been added to the model during the current optimization.
protected  int getNfractionalCuts()
          Returns the number of fractional cuts that have been added to the model during the current optimization.
protected  int getNGUBcovers()
          Returns the number of GUB cover cuts that have been added to the model during the current optimization.
protected  int getNimpliedBounds()
          Returns the number of implied bound cuts that have been added to the model during the current optimization.
protected  int getNiterations()
          Returns the total number of iterations for solving node problems during the current optimization.
protected  int getNMIRs()
          Returns the number of mixed integer rounding (MIR) cuts that have been added to the model during the current optimization.
protected  int getNnodes()
          Returns the number of nodes processed so far in the active branch-and-cut search.
protected  IloCplex.NodeId getNodeId()
          Returns the node identifier of the current node.
protected  int getNremainingNodes()
          Returns the number of nodes remaining to be processed, or, equivalently, the number of active nodes in the tree.
protected  double getObjCoef(ilog.concert.IloNumVar var)
          Returns the linear objective function coefficient for variable var in the model being solved.
protected  double[] getObjCoefs(ilog.concert.IloNumVar[] vars)
          Returns the linear objective function coefficients for an array of variables in the model being solved.
protected  double[] getObjCoefs(ilog.concert.IloNumVar[] vars, int start, int num)
          Returns the linear objective function coefficients for a set of variables in the model being solved.
protected  double getObjValue()
          Returns the objective function value of the solution of the continuous relaxation of the current node.
protected  int getPriority(ilog.concert.IloNumVar var)
          Returns the branch priority for variable var.
protected  double getSlack(ilog.concert.IloRange rng)
          Returns the slack value of a constraint for the solution of the continuous relaxation of the current node.
protected  double[] getSlacks(ilog.concert.IloRange[] rng)
          Returns the slack values for an array of constraints for the solution of the current node.
protected  double[] getSlacks(ilog.concert.IloRange[] rng, int start, int num)
          Returns the slack values for a set of constraints for the solution of the current node.
protected  IloCplex.IntegerFeasibilityStatus getSOSFeasibility(ilog.concert.IloSOS1 sos)
          Indicates whether the special ordered set of type 1 is integer feasible, integer infeasible, or implied integer feasible in the current node solution.
protected  IloCplex.IntegerFeasibilityStatus getSOSFeasibility(ilog.concert.IloSOS2 sos)
          Indicates whether the special ordered set of type 2 is integer feasible, integer infeasible, or implied integer feasible in the current node solution.
protected  double getUB(ilog.concert.IloNumVar var)
          Returns the current upper bound for variable var.
protected  double[] getUBs(ilog.concert.IloNumVar[] var)
          Returns the current upper bounds for an array of variables.
protected  double[] getUBs(ilog.concert.IloNumVar[] var, int start, int num)
          Returns the current upper bounds for a set of variables.
protected  double getUpPseudoCost(ilog.concert.IloNumVar var)
          Returns the pseudo cost for branching up on variable var.
protected  double getValue(ilog.concert.IloNumExpr expr)
          Returns the value expr takes for the solution of the current node relaxation.
protected  double getValue(ilog.concert.IloNumVar var)
          Returns the solution value of a variable at the current node.
protected  double[] getValues(ilog.concert.IloNumVar[] var)
          Returns the solution values for an array of variables at the current node.
protected  double[] getValues(ilog.concert.IloNumVar[] var, int start, int num)
          Returns the solution values for a set of variables at the current node.
protected  boolean hasIncumbent()
          Returns true if an incumbent solution has been found.
protected  boolean isIntegerFeasible()
          Returns true if current solution is integer feasible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IloCplex.Goal

public IloCplex.Goal()
Method Detail

execute

public abstract IloCplex.Goal execute(ilog.cplex.IloCplex cplex)
                               throws IloException
This method must be implemented by the user to specify the logic of the goal. The IloCplex.Goal returned by this method will be pushed on the goal stack and will thus be executed next.

Parameters:
cplex - The IloCplex object calling this method.
Returns:
The instance of IloCplex.Goal that will be pushed on to the goal stack of the current.
IloException

getBestObjValue

protected double getBestObjValue()
                          throws IloException
Returns a bound on the optimal solution value of the active problem.

When a model has been solved to optimality, this value matches the optimal solution value. 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

protected final 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.
IloException

getIncumbentObjValue

protected final double getIncumbentObjValue()
                                     throws IloException
Returns the objective value of the current best integer solution. This method returns the objective value for the current incumbent solution (that is, the best integer solution found so far).

Returns:
The objective value for the current incumbent solution.
IloException

getIncumbentValue

protected final double getIncumbentValue(ilog.concert.IloNumVar var)
                                  throws IloException
Returns the value of variable var for the current best integer solution. This method returns the value of variable var in the current incumbent solution (that is, the best integer solution found so far).

Parameters:
var - The variable whose incumbent solution value is being queried.
Returns:
The value of variable var in the current incumbent solution.
IloException

getIncumbentValues

protected final double[] getIncumbentValues(ilog.concert.IloNumVar[] vars)
                                     throws IloException
Returns incumbent solution values for an array of variables.

Parameters:
vars - The array of variables whose incumbent solution values are being queried.
Returns:
The incumbent solution values for variables listed in var. The solution value for variable var[j] is returned as element j of the returned array.
IloException

getIncumbentValues

protected final double[] getIncumbentValues(ilog.concert.IloNumVar[] vars,
                                            int start,
                                            int num)
                                     throws IloException
Returns the incumbent solution values for a set of variables.

Parameters:
vars - An array containing the variables whose incumbent solution values are being queried.
start - The index of the first variable in vars for which to return the incumbent solution value.
num - The number of variables in vars for which to return the incumbent solution values.
Returns:
The incumbent solution values for variables listed in var. The solution for variable var[j+start] is returned as element j of the returned array.
IloException

isIntegerFeasible

protected final boolean isIntegerFeasible()
                                   throws IloException
Returns true if current solution is integer feasible

Returns:
true if current solution is integer feasible
IloException

hasIncumbent

protected final boolean hasIncumbent()
                              throws IloException
Returns true if an incumbent solution has been found.

Returns:
true if an incumbent solution has been found.
IloException

getNnodes

protected final int getNnodes()
                       throws IloException
Returns the number of nodes processed so far in the active branch-and-cut search.

Returns:
The number of nodes processed so far.
IloException

getNremainingNodes

protected final int getNremainingNodes()
                                throws IloException
Returns the number of nodes remaining to be processed, or, equivalently, the number of active nodes in the tree.

Returns:
The number of nodes remaining to be processed.
IloException

getNiterations

protected final int getNiterations()
                            throws IloException
Returns the total number of iterations for solving node problems during the current optimization.

Returns:
The total number of iterations for solving node problems.
IloException

getNcliques

protected final int getNcliques()
                         throws IloException
Returns the number of clique cuts that have been added to the model during the current optimization.

Returns:
The number of clique cuts added so far.
IloException

getNcovers

protected final int getNcovers()
                        throws IloException
Returns the number of cover cuts that have been added to the model during the current optimization.

Returns:
The number of cover cuts added so far.
IloException

getNflowCovers

protected final int getNflowCovers()
                            throws IloException
Returns the number of flow cover cuts that have been added to the model during the current optimization.

Returns:
The number of flow cover cuts added so far.
IloException

getNflowPaths

protected final int getNflowPaths()
                           throws IloException
Returns the number of flow path cuts that have been added to the model during the current optimization.

Returns:
The number of flow path cuts added so far.
IloException

getNGUBcovers

protected final int getNGUBcovers()
                           throws IloException
Returns the number of GUB cover cuts that have been added to the model during the current optimization.

Returns:
The number of GUB cover cuts added so far.
IloException

getNfractionalCuts

protected final int getNfractionalCuts()
                                throws IloException
Returns the number of fractional cuts that have been added to the model during the current optimization.

Returns:
The number of fractional cuts added so far.
IloException

getNdisjunctiveCuts

protected final int getNdisjunctiveCuts()
                                 throws IloException
Returns the number of disjunctive cuts that have been added to the model during the current optimization.

Returns:
The number of disjunctive cuts added so far.
IloException

getNMIRs

protected final int getNMIRs()
                      throws IloException
Returns the number of mixed integer rounding (MIR) cuts that have been added to the model during the current optimization.

Returns:
The number of MIR cuts added so far.
IloException

getNimpliedBounds

protected final int getNimpliedBounds()
                               throws IloException
Returns the number of implied bound cuts that have been added to the model during the current optimization.

Returns:
The number of implied bound cuts added so far.
IloException

getDirection

protected final IloCplex.BranchDirection getDirection(ilog.concert.IloNumVar var)
                                               throws IloException
Returns the branch direction for variable var.

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

getPriority

protected final int getPriority(ilog.concert.IloNumVar var)
                         throws IloException
Returns the branch priority for variable var.

Parameters:
var - The variable whose branch priority is being queried.
Returns:
The branch priority for variable var
IloException

getLB

protected final double getLB(ilog.concert.IloNumVar var)
                      throws IloException
Returns the current lower bound for variable var. This may be different from the bound the variable has in the active model, since branching or bound strengthening may have been applied to it.

Parameters:
var - The variable whose current lower bound is being queried.
Returns:
The lower bound for variable var at the current node.
IloException

getLBs

protected final double[] getLBs(ilog.concert.IloNumVar[] var)
                         throws IloException
Returns the current lower bounds for an array of variables. The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them.

Parameters:
var - An array of variables whose current lower bounds are being queried.
Returns:
An array of double values containing the current lower bounds for the specified variables. If the returned array is called lb, lb[j] contains the lower bound of variable var[j] at the current node.
IloException

getLBs

protected final double[] getLBs(ilog.concert.IloNumVar[] var,
                                int start,
                                int num)
                         throws IloException
Returns the current lower bounds for a set of variables. The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them.

Parameters:
var - An array containing the variables whose current lower bounds are being queried.
start - The index of the first variable in var for which to query the current lower bound.
num - The number of variables in var for which to query the current lower bounds.
Returns:
An array of double values containing the current lower bounds for the specified variables. If the returned array is called lb, lb[j] contains the lower bound of variable var[j+start] at the current node, for j = 0, ..., num-1.
IloException

getUB

protected final double getUB(ilog.concert.IloNumVar var)
                      throws IloException
Returns the current upper bound for variable var. This may be different from the bound the variable has in the active model, since branching or bound strengthening may have been applied to it.

Parameters:
var - The variable whose current upper bound is being queried.
Returns:
The upper bound for variable var at the current node.
IloException

getUBs

protected final double[] getUBs(ilog.concert.IloNumVar[] var)
                         throws IloException
Returns the current upper bounds for an array of variables. The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them.

Parameters:
var - An array of variables whose current upper bounds is being queried.
Returns:
An array of double values containing the current upper bounds for the specified variables. If the returned array is called ub, ub[j] contains the upper bound of variable var[j] at the current node.
IloException

getUBs

protected final double[] getUBs(ilog.concert.IloNumVar[] var,
                                int start,
                                int num)
                         throws IloException
Returns the current upper bounds for a set of variables. The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them.

Parameters:
var - An array containing the variables whose current upper bounds are being queried.
start - The index of the first variable in var for which to query the current upper bound.
num - The number of variables in var for which to query the current upper bounds.
Returns:
An array of double values containing the current upper bounds for the specified variables. If the returned array is called ub, ub[j] contains the upper bound of variable var[j+start] at the current node, for j = 0, ..., num-1.
IloException

getObjValue

protected final double getObjValue()
                            throws IloException
Returns the objective function value of the solution of the continuous relaxation of the current node.

Returns:
The objective function value of the solution of the continuous relaxation of the current node.
IloException

getValue

protected final double getValue(ilog.concert.IloNumVar var)
                         throws IloException
Returns the solution value of a variable at the current node.

Parameters:
var - The variable whose current solution value is being queried.
Returns:
The solution value of variable var at the current node.
IloException

getValues

protected final double[] getValues(ilog.concert.IloNumVar[] var)
                            throws IloException
Returns the solution values for an array of variables at the current node.

Parameters:
var - An array of variables whose current solution values are being queried.
Returns:
An array of double values containing the solution values of the specified variables at the current node. If the returned array is called x, x[j] contains the current solution value for variable var[j].
IloException

getValues

protected final double[] getValues(ilog.concert.IloNumVar[] var,
                                   int start,
                                   int num)
                            throws IloException
Returns the solution values for a set of variables at the current node.

Parameters:
var - An array containing the variables whose current solution values are being queried.
start - The index of the first variable in var for which to query the current solution values.
num - The number of variables in var for which to query the current solution values.
Returns:
An array of double values containing the solution values of the specified variables at the current node. If the returned array is called x, x[j] is the current solution value for variable var[j+start].
IloException

getSlack

protected final double getSlack(ilog.concert.IloRange rng)
                         throws IloException
Returns the slack value of a constraint for the solution of the continuous relaxation of the current node.

Parameters:
rng - The constraint whose current slack value is being queried.
Returns:
The slack value of constraint rng for the solution of the continuous relaxation of the current node.
IloException

getSlacks

protected final double[] getSlacks(ilog.concert.IloRange[] rng)
                            throws IloException
Returns the slack values for an array of constraints for the solution of the current node.

Parameters:
rng - An array of constraints whose current slack values are being queried.
Returns:
An array of double values containing the slack values for the specified constraints for the solution of the continuous relaxation of the current node. If the returned array is called s, s[i] contains the current slack value for constraint rng[i].
IloException

getSlacks

protected final double[] getSlacks(ilog.concert.IloRange[] rng,
                                   int start,
                                   int num)
                            throws IloException
Returns the slack values for a set of constraints for the solution of the current node.

Parameters:
rng - An array containing the constraints whose current slack values are being queried.
start - The index of the first constraint in rng for which to query the current slack values.
num - The number of constraints in rng for which to query the current slack values.
Returns:
An array of double values containing the slack values of the specified constraints for the solution of the continuous relaxation of the current node. If s is the returned array, s[i] contains the current slack value for constraint rng[i+start].
IloException

getValue

protected final double getValue(ilog.concert.IloNumExpr expr)
                         throws IloException
Returns the value expr takes for the solution of the current node relaxation.

Parameters:
expr - The expression for which to evaluate the current solution.
Returns:
The value expr takes for the solution of the continuous relaxation of the current node.
IloException

getObjCoef

protected final double getObjCoef(ilog.concert.IloNumVar var)
                           throws IloException
Returns the linear objective function coefficient for variable var in the model being solved.

Parameters:
var - The variable whose linear objective coefficient is being queried.
Returns:
The linear objective coefficient for variable var in the model being solved.
IloException

getObjCoefs

protected final double[] getObjCoefs(ilog.concert.IloNumVar[] vars)
                              throws IloException
Returns the linear objective function coefficients for an array of variables in the model being solved.

Parameters:
vars - An array of variables whose linear objective function coefficients are being queried.
Returns:
An array of double values containing the linear objective function coefficients for the specified variables in the problem being solved. If the returned array is called obj, obj[j] is the linear objective function coefficient for variable var[j].
IloException

getObjCoefs

protected final double[] getObjCoefs(ilog.concert.IloNumVar[] vars,
                                     int start,
                                     int num)
                              throws IloException
Returns the linear objective function coefficients for a set of variables in the model being solved.

Parameters:
vars - An array containing the variables whose linear objective function coefficients are being queried.
start - The index of the first variable in var for which to query the linear objective function coefficients.
num - The number of variables in var for which to query the linear objective function coefficients.
Returns:
An array of double values containing the linear objective function coefficients for the specified variables in the problem being solved. If obj is the returned array, obj[j] is the linear objective function coefficient for variable var[j+start], for j = 0, ..., num-1.
IloException

getDownPseudoCost

protected final double getDownPseudoCost(ilog.concert.IloNumVar var)
                                  throws IloException
Returns the pseudo cost for branching down on variable var.

Parameters:
var - The variable whose down pseudo cost is being queried.
Returns:
The pseudo cost for branching down on variable var.
IloException

getUpPseudoCost

protected final double getUpPseudoCost(ilog.concert.IloNumVar var)
                                throws IloException
Returns the pseudo cost for branching up on variable var.

Parameters:
var - The variable whose up pseudo cost is being queried.
Returns:
The pseudo cost for branching up on variable var.
IloException

getFeasibility

protected final IloCplex.IntegerFeasibilityStatus getFeasibility(ilog.concert.IloNumVar var)
                                                          throws IloException
Indicates whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.

Parameters:
var - The variable whose integer feasibility status is being queried.
Returns:
The integer feasibility status for variable var.
IloException

getFeasibilities

protected final IloCplex.IntegerFeasibilityStatus[] getFeasibilities(ilog.concert.IloNumVar[] var)
                                                              throws IloException
Indicates whether the variables in array var are integer feasible, integer infeasible, or implied integer feasible in the current node solution.

Parameters:
var - An array of variables for which the integer feasibility status is queried.
Returns:
An array containing the integer feasibility statuses for the variables in var at the current node. The integer feasibility status of variable var[j] will be returned as element j of the returned array.
IloException

getFeasibilities

protected final IloCplex.IntegerFeasibilityStatus[] getFeasibilities(ilog.concert.IloNumVar[] var,
                                                                     int start,
                                                                     int num)
                                                              throws IloException
Indicates whether the specified variables in array var are integer feasible, integer infeasible, or implied integer feasible in the current node solution.

Parameters:
var - An array containing the variables whose integer feasibility status is being queried.
start - The index of the first variable in the array var for which the integer feasibility status is queried.
num - The number of variables in the array var, for which the integer infeasibility statuses are queried.
Returns:
An array containing the integer feasibility statuses for the specified variables in var at the current node. If the returned array is inf, the feasibility status for variable var[start+j] will be returned as inf[j].
IloException

getSOSFeasibility

protected final IloCplex.IntegerFeasibilityStatus getSOSFeasibility(ilog.concert.IloSOS1 sos)
                                                             throws IloException
Indicates whether the special ordered set of type 1 is integer feasible, integer infeasible, or implied integer feasible in the current node solution.

Parameters:
sos - The SOS1 for which the integer feasibility status is queried.
Returns:
The integer feasibility status for sos.
IloException

getSOSFeasibility

protected final IloCplex.IntegerFeasibilityStatus getSOSFeasibility(ilog.concert.IloSOS2 sos)
                                                             throws IloException
Indicates whether the special ordered set of type 2 is integer feasible, integer infeasible, or implied integer feasible in the current node solution.

Parameters:
sos - The SOS2 for which the integer feasibility status is queried.
Returns:
The integer feasibility status for sos.
IloException

getNodeId

protected final IloCplex.NodeId getNodeId()
                                   throws IloException
Returns the node identifier of the current node.

Returns:
the node identifier of the current node.
IloException

getNbranches

protected final int getNbranches()
                          throws IloException
Returns the number of branches IloCplex is going to create at the current node unless overridden by the invoking goal.

Returns:
The number of branches IloCplex is going to create at the current node.
IloException

getBranchType

protected final IloCplex.BranchType getBranchType()
                                           throws IloException
Returns the type of branching IloCplex is going to do at the current node unless overridden by the invoking goal.

Returns:
The type of branching IloCplex is going to do at the current node.
IloException

getBranches

protected double[] getBranches(ilog.concert.IloNumVar[][] vars,
                               double[][] bounds,
                               IloCplex.BranchDirection[][] dirs)
                        throws IloException
Queries the branches IloCplex would create at the current node unless overridden by the invoking goal. The returned branch will be performed if the callback does not call the method makeBranch or prune.

Parameters:
vars - An array of length at least getNbranches of arrays, where the variables the bounds of which would be changed for each branch will be stored. Upon completion vars[i] will contain an array with the list of variables used for branch i.
bounds - An array of length at least getNbranches of arrays where the new bounds for the variables IloCplex would branch on each branch will be stored. Upon completion bounds[i] will contain an array with the list of new bounds used for branch i. One bound of variable vars[i][j] will be set to bounds[i][j] for all possible pairs i, j.
dirs - An array of length at least getNbranches of arrays where the branch directions for each branch will be stored. Upon completion of this method dirs[i] will contain an array with the list of branch directions used for branch i. If dirs[i][j] is IloCplex.BranchDirection.Up the lower bound of variable vars[i][j] will be set to bounds[i][j] for all possible pairs i, j. Similarly, if dirs[i][j] is IloCplex.BranchDirection.Down the upper bound of variable vars[i][j] will be set to bounds[i][j] for all possible pairs i, j.
Returns:
an array of double values containing the node estimates for the branches.
IloException