assert_optimal_termination

(function from pyomo.contrib.solver.util)

pyomo.contrib.solver.util.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)