NO FRAMES

CPXgetcallbackpseudocosts

public int CPXgetcallbackpseudocosts(CPXCENVptr env, void * cbdata, int wherefrom, double * uppc, double * downpc, int begin, int end)
Definition file: cplex.h
Note

This is an advanced routine. Advanced routines typically demand a thorough 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 Callable Library routines instead.

The routine CPXgetcallbackpseudocosts retrieves the pseudo-cost values during MIP optimization from within a user-written callback. The values are from the original problem if CPX_PARAM_MIPCBREDLP is set to CPX_OFF. Otherwise, they are from the presolved problem.

Note
When pseudo-costs are retrieved for the original problem variables, pseudo-costs are zero for variables that have been removed from the problem, since they are never used for branching.

This routine may be called only when the value of the wherefrom argument is one of the following:

Example

 status = CPXgetcallbackpseudocosts (env, cbdata, wherefrom,
                                     upcost, downcost,
                                     j, k);

Parameters:

env

A pointer to the CPLEX environment, as returned by CPXopenCPLEX.

cbdata

The pointer passed to the user-written callback. This argument must be the value of cbdata passed to the user-written callback.

wherefrom

An integer value reporting from where the user-written callback was called. The argument must be the value of wherefrom passed to the user-written callback.

uppc

An array to receive the values of up pseudo-costs. This array must be of length at least (end - begin + 1). If successful, uppc[0] through uppc[end-begin] will contain the up pseudo-costs. May be NULL.

downpc

An array to receive the values of the down pseudo-costs. This array must be of length at least (end - begin + 1). If successful, downpc[0] through downpc[end-begin] will contain the down pseudo-costs. May be NULL.

begin

An integer specifying the beginning of the range of pseudo-costs to be returned.

end

An integer specifying the end of the range of pseudo-costs to be returned.

Returns:

The routine returns zero if successful and nonzero if an error occurs.