CPXXcallbackgetincumbent and CPXcallbackgetincumbent
Gets the incumbent solution and its objective value for callback invocations in the context CPX_CALLBACKCONTEXT_CANDIDATE.dita.
int CPXXcallbackgetincumbent( CPXCALLBACKCONTEXTptr context, double *x, CPXDIM begin, CPXDIM end, double *obj_p, )
int CPXcallbackgetincumbent( CPXCALLBACKCONTEXTptr context, double *x, CPXDIM begin, CPXDIM end, double *obj_p, )
Description
This routine queries the current incumbent solution.
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 beNULLifbeginandendspecify an empty range. - begin
-
First column (inclusive) to query from the incumbent solution.
- end
-
Last column (inclusive) to query from the incumbent solution.
- obj_p
-
Buffer to store the objective value of the incumbent solution. This buffer can be
NULL. If there is no incumbent solution, then a very large value will be returned in this buffer.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.