The external solver’s optimisation can abort without completely solving the problem, because of some error, or some resource limit was reached. Eplex classifies these into the following cases, with default ways of handling them:
The default behaviours can be overridden for each problem by giving a user defined goal to handle each case during problem setup in eplex_solver_setup/4 (lp_setup/4, lp_demon_setup/5, or later with eplex_set/2 or lp_set/3) as an option. If given, the user defined goal will be executed instead. The user defined handler could for instance change parameter settings and call lp_solve again.
Redefining the default behaviour for infeasible problems allows the infeasible problem state to be examined, e.g. by extracting the IIS (Irreducible Infeasible Subsystem) from it with eplex_get_iis/4. It is recommended that the user-defined handler should fail after examining the state to preserve the correct logical behaviour.
The default behaviour is implemented by raising the events eplex_suboptimal, eplex_unbounded, eplex_infeasible, eplex_unknown and eplex_abort for the different abort cases. These events can themselves be redefined to change the default behaviours. However, as this changes the behaviour globally, it is not recommended.
Note that in the user defined handlers, it may be possible to extract some useful bound information on the optimal objective value using the best_bound and worst_bound options of lp_get/3.