NO FRAMES

Class IloCplex::IncumbentCallbackI

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.

This callback is called whenever a new potential incumbent is found during branch & cut searches. It allows you to analyze the proposed incumbent and optionally reject it. In this case, CPLEX will continue the branch & cut search. This callback is thus typically combined with a branch callback that instructs CPLEX how to branch on a node after it has found a potential incumbent and thus considered the node solution to be integer feasible.

See Also:

Method Summary
protected NodeData *getNodeData() const
protected NodeIdgetNodeId() const
protected IloNumgetObjValue() const
protected IloNumgetSlack(const IloRange rng) const
protected voidgetSlacks(IloNumArray val, const IloRangeArray con) const
protected IloNumgetValue(const IloIntVar var) const
protected IloNumgetValue(const IloNumVar var) const
protected IloNumgetValue(const IloExprArg expr) const
protected voidgetValues(IloNumArray val, const IloIntVarArray vars) const
protected voidgetValues(IloNumArray val, const IloNumVarArray vars) const
protected voidreject()
Inherited Methods from MIPCallbackI
getNcliques, getNcovers, getNdisjunctiveCuts, getNflowCovers, getNflowPaths, getNfractionalCuts, getNGUBcovers, getNimpliedBounds, getNMIRs, getObjCoef, getObjCoef, getObjCoefs, getObjCoefs, getUserThreads
Inherited Methods from MIPInfoCallbackI
getBestObjValue, getCutoff, getDirection, getDirection, getIncumbentObjValue, getIncumbentSlack, getIncumbentSlacks, getIncumbentValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMyThreadNum, getNiterations, getNnodes, getNremainingNodes, getPriority, getPriority, hasIncumbent
Inherited Methods from OptimizationCallbackI
getModel, getNcols, getNQCs, getNrows
Inherited Methods from CallbackI
abort, duplicateCallback, getEnv, main
Method Detail

getNodeData

protected NodeData * getNodeData() const

This method retrieves the NodeData object that may have previously been assigned to the current node by the user with method IloCplex::BranchCallbackI::makeBranch. If no data object has been assigned to the current node, 0 will be returned.


getNodeId

protected NodeId getNodeId() const

This method returns the NodeId of the current node.


getObjValue

protected IloNum getObjValue() const

This method returns the query objective value of the potential incumbent.

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


getSlack

protected IloNum getSlack(const IloRange rng) const

This method returns the slack value for the range specified by rng for the potential incumbent.


getSlacks

protected void getSlacks(IloNumArray val, const IloRangeArray con) const

This method puts the slack value for each range in the array of ranges con into the corresponding element of the array val for the potential incumbent. For this CPLEX resizes array val to match the size of array con.


getValue

protected IloNum getValue(const IloIntVar var) const

This method returns the query value of the variable var in the potential incumbent solution.


getValue

protected IloNum getValue(const IloNumVar var) const

This method returns the value of the variable var in the potential incumbent solution.


getValue

protected IloNum getValue(const IloExprArg expr) const

This method returns the value of the expr for the potential incumbent solution.


getValues

protected void getValues(IloNumArray val, const IloIntVarArray vars) const

This method returns the query values of the variables in the array vars in the potential incumbent solution and copies them to val. CPLEX automatically resizes the array val to match the size of the array vars.


getValues

protected void getValues(IloNumArray val, const IloNumVarArray vars) const

This method returns the query values of the variables in the array vars in the potential incumbent solution and copies them to val. CPLEX automatically resizes the array val to match the length of the array vars.


reject

protected void reject()

This method rejects the proposed incumbent.