CPXXcallbackgetcandidatepoint and CPXcallbackgetcandidatepoint

Gets the candidate solution and its objective value for callback invocations in the context CPX_CALLBACKCONTEXT_CANDIDATE.

int  CPXXcallbackgetcandidatepoint( CPXCALLBACKCONTEXptr context, double *x, CPXDIM begin, CPXDIM end, double *obj_p, )

int  CPXcallbackgetcandidatepoint( CPXCALLBACKCONTEXptr context, double *x, CPXDIM begin, CPXDIM end, double *obj_p, )

Description

This routine queries the current candidate for an integer feasible solution.

Warning: Calling this function is valid only if the callback is invoked in the context CPX_CALLBACKCONTEXT_CANDIDATE and CPXXcallbackcandidateispoint and CPXcallbackcandidateispoint specifies a bounded solution. In all other situations, this routine returns an error.

Arguments

context

The callback context as passed into the user-written callback function.

x

Buffer to store the values queried. The buffer must have size at least 1+end-end. The buffer can be NULL if begin and end specify an empty range.

begin

First column (inclusive) to query from the candidate solution.

end

Last column (inclusive) to query from the candidate solution.

obj_p

Buffer to store the objective value of the candidate solution. This buffer can be NULL.

Return

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

Example