pyomo icon indicating copy to clipboard operation
pyomo copied to clipboard

ScalarParam.values() behaves differently for uninitialized mutable parameters

Open michaelbynum opened this issue 2 years ago • 0 comments

Steps to reproduce the issue

Is this expected? I did not expect it.

In [1]: import pyomo.environ as pe

In [2]: m = pe.ConcreteModel()

In [3]: m.p1 = pe.Param(mutable=True)

In [4]: m.p2 = pe.Param(mutable=True, initialize=5)

In [5]: list(m.p1.values())
Out[5]: []

In [6]: list(m.p2.values())
Out[6]: [<pyomo.core.base.param.ScalarParam at 0x1075fb390>]

michaelbynum avatar Jul 11 '23 15:07 michaelbynum