0

Well, I have a quadratic programming optimization problem, well structured in Matlab. For instance, With x a n*1 vector, we have

x = argmin (1/2*x'*H*x+f'*x)
s.t.
A*x <= b
x_lb<=x<=x_ub

Of course, A is a matrix and b, x_lb, x_ub are vectors. However, my question is, how to construct such a standard in Julia I tried with Jump. Actually,

A*x .<= b 

can make the last constiant work. But how to construct the second constraint x_lb<=x<=x_ub in JuMP? I tried with

[x_lb[i]<=x[i]<=x_ub[i] for i =1:X_dim]  

but it didn't work. It seems like only constant can be assigned as upper/lower bounds?

Also, for the quadratic objective, "aff" and "quad" can be used but we need to treat x, H and f element-wisely, which makes such a job time-consuming.

Any help is appreciated!

AlessioX
  • 3,167
  • 6
  • 24
  • 40
  • convex.jl would allow the matrix-form description, but there are some trade-offs (should be clear after reading the docs). With JuMP, you can give those bounds at var-declaration time (not necessarily formulated as constraints; probably depends on the solver) like shown in the [docs](http://jump.readthedocs.io/en/latest/refvariable.html). – sascha Mar 04 '18 at 12:51
  • Hi Sascha, you are absolutely right. Convex.jl makes quadratic programming much easier. – Zejiang Wang Mar 04 '18 at 19:27

0 Answers0