If there a getvariable() equivalent for expressions?

question
jump

#1

I like to build modular optimization models using functions. Occasionally, I will add a variable in one function and then bring it into scope in another function using getvariable(). Is there an equivalent feature for expressions?

In summary, I would like to add an expression to a JuMP model in one scope and use it in another.


#2

No, that functionality does not exist. PRs accepted.


#3

I have used the model ext dictionary to store expressions I want to get at later.