idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

Dealing with bound_relax_factor

Open dallan-keylogic opened this issue 8 months ago • 6 comments

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:

  1. Set the default option bound_relax_factor=0 in the IDAES solver config.
  2. Update display_potential_evaluation_errors to 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.

dallan-keylogic avatar Feb 11 '25 21:02 dallan-keylogic