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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -