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
Using Pyomo5 expressions, the named expression objects are the only sub-expressions that are mutable. This form of mutability explicitly represents user expectations that these sub-expressions can change after being used to form an expression tree.
There are two contexts where the implication of this mutability are not clear:
Replacing a terms in an expression with a walker: If we descend into a named expression and replace terms there, then is that named expression replaced in the original expression or preserved?
Cloning an expression: When cloning an expression, when we clone a sub-expression that is a named expression, do we create separate clones for that expression object, or replace the named expression itself? If the latter, then how do we manage those cloned named expressions in the model?
The text was updated successfully, but these errors were encountered:
Using Pyomo5 expressions, the named expression objects are the only sub-expressions that are mutable. This form of mutability explicitly represents user expectations that these sub-expressions can change after being used to form an expression tree.
There are two contexts where the implication of this mutability are not clear:
Replacing a terms in an expression with a walker: If we descend into a named expression and replace terms there, then is that named expression replaced in the original expression or preserved?
Cloning an expression: When cloning an expression, when we clone a sub-expression that is a named expression, do we create separate clones for that expression object, or replace the named expression itself? If the latter, then how do we manage those cloned named expressions in the model?
The text was updated successfully, but these errors were encountered: