idaes-pse
idaes-pse copied to clipboard
Dealing with bound_relax_factor
Repeatedly, IPOPT and AMPL cause problems with certain functions for which function evaluation errors are possible (fractional powers, logs, etc). Fortunately, we have display_potential_evaluation_errors in order to avoid these situations. However, even if the user has properly bounded these functions below by zero (or some eps>0), we can still run into problems because IPOPT has the option bound_relax_factor set to 1e-8 by default. I even got caught off-guard today because I bounded a variable below by 1e-7, but that value was transformed to 1e-11 when the Pyomo scaling transformation was applied.
There are two options to deal with this problem:
- Set the default option
bound_relax_factor=0in the IDAES solver config. - Update
display_potential_evaluation_errorsto not just evaluation errors, but also near-evaluation errors.
Option (2) is probably what we'll end up doing. It would be nice to have some discussion, though.