Oemof Warning duals

Hello everybody,

I work with oemof and want to receive dual variables for 3 busses. Since a while I got a warning:

16:51:06-WARNING-Reassigning the non-component attribute rc
on block (model).Model with a new Component
with type <class ‘pyomo.core.base.suffix.Suffix’>.
This is usually indicative of a modelling error.
To avoid this warning, explicitly delete the attribute:
del Model.rc

The model can be solved. But I don’t know why this warning appears. Besides I just have one time in the Code, when I create it.


and later I use 3 functions to store the duals:
def get_el_prices_from_duals(om, datetime_index):

el_prices_list = []

constr = [c for c in om.component_objects(po.Constraint, active = True) if c.name == "Bus.balance"][0]

# duals for el
el_prices_list = [om.dual[constr[index]] for index in constr if index[0].label == "b_el"]
el_prices = pd.DataFrame(data= el_prices_list, index= datetime_index, columns = ["electricity price"])

return el_prices

Has anybody an idea?
It’s not solved by deleting like proposed.

Thank you !

Best regards, C.


Did you get any solution?

To help we need a minimal example to reproduce the problem.

Text and images licensed under CC BY 4.0Data licensed under CC0 1.0Code licensed under MITSite terms of serviceOpenmod mailing list.