I am trying to remove a container of constraints after solving it to add a new set of constraints before resolving it: @constraint(model, A[s=1:n], x[s] == y[s])
I tried for s in 1:n delete(model, A[s]) end
or delete.(Ref(model),A)
but I always get this error JULIA: MethodError: no method matching iterate(::Nothing)
I am using direct_model with MOSEK which I construct a linear approximation for SOCP constraints to provide a hot start for the next run. Then I remove the linear approximation constraints and add a set of new variables and SOCP constraints.
Can I reuse the same model? Or should I create a new one?
If I have to create a new model, I believe I can’t share the constraints from the original model with the new model; what about variables?