Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #4347 (new defect)

Opened 2 years ago

Last modified 21 months ago

Conceptual issue / flaw with Params and mutability

Reported by: jwatson Owned by: unassigned
Priority: normal Milestone: Coopr 3.x
Component: coopr.pyomo Version:
Keywords: Cc:

Description

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.

Attachments

Change History

comment:1 Changed 23 months ago by jdsiiro

The Param rework ([5803:5805]) should have resolved this issue. I do not, however have a test to verify it, so I will leave this ticket open for the time being.

comment:2 Changed 23 months ago by gabeh

The mutability testes for indexed params test against this issue. I believe it is safe to close this ticket.

comment:3 Changed 21 months ago by jwatson

  • Milestone changed from Coopr 3.2 to Coopr 3.x
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.