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.