BYU-PRISM / GEKKO

GEKKO Python for Machine Learning and Dynamic Optimization
https://machinelearning.byu.edu
Other
595 stars 104 forks source link

Warning for failed solutions #64

Closed APMonitor closed 4 years ago

APMonitor commented 5 years ago

Failed solutions do not produce a Exception or Warning message. To determine that the solution failed, a user either needs to observe the solver output with m.solve(disp=True) or else determine the solution success with APPSTATUS as m.options.APPSTATUS==1. As @loganbeal suggests, we should not block the completion of the program by raising an exception but instead show a warning.

APMonitor commented 4 years ago

This is resolved in release v0.2.5 with the option diaglevel. Setting m.option.diaglevel=0 prevents stopping or an error message when there is an unsuccessful solution.