efficiently reusing/updating julia convex constraints -
i'm using julia (with convex) solve convex problem many times same constraint structure. right now, have following simplified structure:
using convex n = int16(1e4) x = variable(n) t = variable() obj = square(x) sim_number = 1:100 z = rand(n) p = minimize(obj) j = 1:n p.constraints += [x[j] >= z[j] + t] end solve!(p) end
is there way initialize structure of n constraints x >= random_val[j] + t
outside of sim_number
loop can reuse / update rhs of constraints only? real problem have, setting n
constraints (i have n = 100,000
) takes long time, solving quick, i'm seeking way reuse constraint structure.
Comments
Post a Comment