Suppose I have a data matrix
A that is used in one of the constraints:
using JuMP nx, ny = 150, 100 A = rand(nx, ny) m = Model() @variable(m, X[1:nx,1:ny]) @constraint(m, [i=1:nx,j=1:ny], X[i,j]-A[i,j] ≤ tol) # more constraints and objective... for i=1:100 # solve optimization solve(m) # update data matrix A A += ... # update constraints? end
Is it possible to modify the data in a loop and update the constraint with the new data or I need to recreate the entire model inside of the loop?