'Pyomo ConstraintList

Good Morning everybody,

I am looking for a way to generate constraints and add them to a constraintlist by using a function, which returns the rule of the constraint.

For the background: I want to examine an energy system, which should be expandable and adjustable and therefore has to create constraints on its own.

It would be nice, if anyone can help me or give me some hints, I am still searching since a couple of hours without success...

Best greetings! Mathias



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source