How to copy variables from one optimized JuMP model into another model?

You cannot do this, and there is no work-around.

You must use a different data structure. For example, something like this:

variables = Dict{Symbol,Any}()
variables[:x1] = sub_model_t0[:x]
variables[:x2] = sub_model_t1[:x]
1 Like