Instructs CPLEX to stop the current optimization after the user-written callback finishes.
This method can be called from a user-written implementation of a main
method to instruct the invoking CPLEX optimizer to abort the current optimization. Note that executing additional callback methods in the callback can lead to unpredictable behavior. For example, callback methods such as Cplex.SolveCallback.Solve
or Cplex.BranchCallback.MakeBranch
can overwrite the callback status and thus enable the optimization to continue. Therefore, to abort an optimization effectively, a user should exit the callback by one of the following ways:
return
immediately after the call of abort
. Cplex.Callback
and its subclasses after abort
.