Ticket #4347 (new defect)
Conceptual issue / flaw with Params and mutability
|Reported by:||jwatson||Owned by:||unassigned|
One of our users reported an issue with Params, which really needs to be fixed. The situation is as follows. There is a model with a Param, declared something like:
model.foo = Param(model.a, model.b, model.c, default=0.0)
When executing the model, all works well. However, based on the previous solution, this user wanted to modify the value of some Param[a,b,c] values to non-defaults. This works fine, but unfortunately, the results will never propagate through to constraints or objectives that use this param - because all instances point to the ParamVal? associated with the default!
This is a major conceptual problem, which needs to be fixed - we obviously need to support such behaviors. One fix is to only allow defaults is a Param is immutable.