I have a usecase where I have to copy models. I also need to access the solver backend. However it seems that I can either use direct_model(), so I have access to the backend, but can’t copy the model, or i can use Model(), but I can’t find the way to access the backend in this mode.
using JuMP using HiGHS backend = HiGHS.Optimizer() m = direct_model(backend) @variable(m, a) Highs_writeOptions(backend, "options.txt") # this works copy_model(m) # this does not
using JuMP using HiGHS m = Model(HiGHS.Optimizer) @variable(m, a) copy_model(m) # this works Highs_writeOptions(m.moi_backend, "options.txt") # this does not