Skip to content

Commit

Permalink
improved error message. (watertap-org/watertap#1412)
Browse files Browse the repository at this point in the history
* improved error message.

* run black.
  • Loading branch information
k1nshuk authored May 30, 2024
1 parent 8370455 commit db7616e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/watertap_solvers/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def _scale_constraints(self, blk):
self._cleanup()
raise RuntimeError(
"Error in AMPL evaluation.\n"
"Run ipopt with halt_on_ampl_error=yes and symbolic_solver_labels=True to see the affected function."
"Re-run ipopt with:\n"
'1. solver options = {"halt_on_ampl_error" : "yes", "nlp_scaling_method" : "gradient-based"\n'
"2. set keyword argument symbolic_solver_labels=True in the pyomo solve function call to see the affected function.\n"
)
else:
print("Error in constraint_autoscale_large_jac")
Expand Down

0 comments on commit db7616e

Please sign in to comment.