Hello Viktor,
Your hypothesis that
> the candidate context means that cplex has found a feasible solution
is actually incorrect. The CANDIDATE context is intended to allow the user to reject the solution, but as the documentation says in
https://www.ibm.com/docs/en/icos/20.1.0?topic=context-cpx-callbackcontext-candidate: If the callback is invoked for a feasible point and does not reject the candidate, this is no guarantee that the candidate will become the new incumbent. The callback is only one of many feasibility tests that are performed on a candidate solution.
In other words, the CANDIDATE context is a tool to ensure the soundness of the results, it's not a tool to measure progress.
I hope this helps.
------------------------------
Xavier
------------------------------
Original Message:
Sent: Mon August 02, 2021 07:07 AM
From: Viktor Bindewald
Subject: Cplex 20.1: terminate soltion process in candidate context from a generic callback
Hello everyone,
I would like to terminate the solution process from the candidate context based on some conditions. I've tried using context.abort() but this seems to result in "unknown" cplex status. I wondering why it is this way because being in the candidate context means that cplex has found a feasible solution and the status should be "feasible" (or even "optimal"). Or am I missing something here?
Best regards,
Viktor
------------------------------
Viktor Bindewald
------------------------------
#DecisionOptimization