-
Notifications
You must be signed in to change notification settings - Fork 567
Open
Description
Summary
I'm using Pyomo DAE's reduce_collocation_points, and I have variables in multiple blocks named "setpoint," leading to a name conflict. I looked into the code and I see where the issue comes form and it seems like a known potential issue. In colloc.py around line 681 (at least in whatever version I have).
# TODO: Use unique_component_name for this
list_name = var.local_name + "_interpolation_constraints"Steps to reproduce the issue
My example is pretty complex, but you just need two blocks with time dependent variables, where the variables have the same local name.
Error Message
RuntimeError: Cannot add component 'setpoint_interpolation_constraints' (type <class 'pyomo.core.base.constraint.ConstraintList'>) to block 'CIB_Chiller_Plant': a component by that name (type <class 'pyomo.core.base.constraint.ConstraintList'>) is already defined.
Reactions are currently unavailable