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!