CPXXgetcallbacknodeub and CPXgetcallbacknodeub

The routine CPXXgetcallbacknodeub/CPXgetcallbacknodeub retrieves the upper bound values for the subproblem at the current node during MIP optimization from within a user-written callback.

int  CPXXgetcallbacknodeub( CPXCENVptr env, void * cbdata, int wherefrom, double * ub, CPXDIM begin, CPXDIM end )

int  CPXgetcallbacknodeub( CPXCENVptr env, void * cbdata, int wherefrom, double * ub, int begin, int end )

Description

Warning:

This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXXgetcallbacknodeub/CPXgetcallbacknodeub retrieves the upper bound values for the subproblem at the current node during MIP optimization from within a user-written callback. The upper bounds are tightened after a new incumbent is found, so the values returned by CPXXgetcallbacknodex/CPXgetcallbacknodex may violate these bounds at nodes where new incumbents have been found. The values are from the original problem if the MIP callback switch between original model and reduced, presolved model (CPXPARAM_MIP_Strategy_CallbackReducedLP) is set to CPX_OFF; otherwise, they are from the presolved problem.

This routine can be called for any value of wherefrom except CPX_CALLBACK_MIP_DELETENODE.

Arguments

env
A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/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. Do not call this routine with wherefrom==CPX_CALLBACK_MIP_DELETENODE.
ub
An array to receive the values of the upper bound values. This array must be of length at least (end-begin+1). If successful, ub[0] through ub[end-begin] contain the upper bound values for the current subproblem.
begin
An integer specifying the beginning of the range of upper bound values to be returned.
end
An integer specifying the end of the range of upper bound values to be returned.

Return

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

Example


 status = CPXgetcallbacknodeub (env, cbdata, wherefrom,
                                ub, 0, cols-1);