You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling component_data_objects returns the values of immutable Params. This is scary since that means that it can return things that don't have a ctype. I think it should only return the ParamDatas for mutable Params.
Steps to reproduce the issue
from pyomo.environ import *
m = ConcreteModel()
m.p = Param([1, 2, 3, 4], initialize={1: 1, 2: 1}, mutable=False, default=0)
for thing in m.component_data_objects(active=True, descend_into=True):
print(thing)
outputs:
p_index
1
1
0
0
Information on your system
Pyomo version: main branch
Python version:
Operating system:
How Pyomo was installed (PyPI, conda, source):
Solver (if applicable):
The text was updated successfully, but these errors were encountered:
Summary
Calling
component_data_objects
returns the values of immutable Params. This is scary since that means that it can return things that don't have actype
. I think it should only return the ParamDatas for mutable Params.Steps to reproduce the issue
outputs:
Information on your system
Pyomo version: main branch
Python version:
Operating system:
How Pyomo was installed (PyPI, conda, source):
Solver (if applicable):
The text was updated successfully, but these errors were encountered: