In the callback example provided on the readme of CPLEX.jl we have:
# You can select where the callback is run
if context_id != CPX_CALLBACKCONTEXT_CANDIDATE
return
end
and then
ispoint_p = Ref{Cint}()
ret = CPXcallbackcandidateispoint(cb_data, ispoint_p)
if ret != 0 || ispoint_p[] == 0
return # No candidate point available or error
end
I do not understand the usefulness of the second part. Can we have the context equal to CPX_CALLBACKCONTEXT_CANDIDATE without having any candidate point available?