9.9 Error Handling
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:
-
suboptimal
-
This means that a solution was found but it may be suboptimal.
The default behaviour is to print a warning and succeed.
- unbounded
-
This means that the problem is unbounded. The default
behaviour is to bind Cost to infinity (positive or negative
depending on the optimisation direction), print a warning and
succeed. CAUTION: No solution values are computed when the
problem is unbounded, so unless the problem was set up with
the solution(no) option, an error will occur when trying to
continue as if the optimisation had succeeded.
- infeasible
-
This means that the problem is infeasible. Note that it is possible
for a problem that is on the boundary between feasible and
infeasible to be returned as feasible or infeasible, depending on
the solver and solving method used. The default behaviour is to
fail.
- unknown
-
This means that due to the solution method chosen, it is unknown
whether the problem is unbounded or infeasible. The default
behaviour is to print a warning and fail (even though this
may be logically wrong!).
- abort
-
Some other error condition occurred during optimisation.
The default behaviour is to print an error and abort.
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.