assert_optimal_termination

(function from pyomo.opt.results.solver)

pyomo.opt.results.solver.assert_optimal_termination(results)[source]

This function checks if the termination condition for the solver is ‘optimal’, ‘locallyOptimal’, or ‘globallyOptimal’, and the status is ‘ok’ and it raises a RuntimeError exception if this is not true.

Parameters:

results (Pyomo results object returned from solver.solve)