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

Encountered BurntToast in parameter estimation problem

Open dallan-keylogic opened this issue 2 years ago • 0 comments
trafficstars

While setting up a parameter estimation problem, I encountered BurntToast while trying to initialize:

Exception has occurred: BurntToast
Degrees of freedom were not zero [4] after trying to fix state variables. Something broke in the generic property package code - please inform the IDAES developers.
  File "C:\Users\[REDACTED]\Repos\idaes-pse\idaes\models\properties\modular_properties\base\generic_property.py", line 1722, in initialize
    raise BurntToast(
  File "C:\Users\[REDACTED]\Repos\CESAR_1\PZ_fitting\PZ_henry_estimate.py", line 130, in <module>
    m.state_hartono.initialize(hold_state=False)
idaes.core.util.exceptions.BurntToast: Degrees of freedom were not zero [4] after trying to fix state variables. Something broke in the generic property package code - please inform the IDAES developers.

The reason is pretty simple: I (foolishly) unfixed the parameters I wanted to estimate before trying to initialize. The local fix is pretty simple, but the user isn't ever supposed to encounter BurntToast exceptions. Clearly we need to rewrite the exception to account for this possibility.

dallan-keylogic avatar Sep 29 '23 15:09 dallan-keylogic