Model Reconstruction after Modification to Model Objects

8 views
Skip to first unread message

Pa Hari Krishna Achuthan

unread,
Sep 16, 2025, 7:43:51 PMSep 16
to Pyomo Forum
Greetings All,

Im trying to model a two stage iterative model where i am conditionally adding scenarios to the first stage in an iterative model. The scenarios themselves are added in to the first stage as an addition of an element to a set, for e.g., using:

model.SetA.add(3)

However i recently saw that the reconstruct() method was deprecated. I have a lot of dependent variables, parameters and constraints defined using SetA. How do i effectively reconstruct and solve the model? The simple addition alone does not reflect the changes and create new objects for the variables, parameters and constraints.

Im using Pyomo version 6.9.1.
Reply all
Reply to author
Forward
0 new messages