"Solver not applicable (gurobi)" but the problem can be solved by 'quadprog'

99 views
Skip to first unread message

Jane Zheng

unread,
Dec 2, 2014, 5:47:52 AM12/2/14
to yal...@googlegroups.com
Does anybody know that in which case a problem can be solved by 'quadprog' but cannot by 'gurobi'? My problem should be a quadratic programming problem, however, when I set the 'solver' to 'gurobi', it shows me "Solver not applicable (gurobi)"  while when I left out the solver specification, the problem can successfully solved by 'QUADPROG'.
Thanks in advance!

Jane

Johan Löfberg

unread,
Dec 2, 2014, 6:22:35 AM12/2/14
to yal...@googlegroups.com
Quadprog accepts nonconvex QPs (and tries to return a locally optimal point). Gurobi does not.

Jane Zheng

unread,
Dec 2, 2014, 7:11:34 AM12/2/14
to yal...@googlegroups.com
Thanks for your reply, Johan! I have modified my objective function and Gurobi works.

Jane

Martin Voříšek

unread,
Mar 28, 2015, 4:41:19 PM3/28/15
to yal...@googlegroups.com
Hi Jane and Johan, 

Can you (or anyone else) please give me advice, how did you modify your objective function to be convex?

I definy mine as follows:

for k = 1:horizont
    Objective = Objective + C(k)*H(k)*(0.009*Q(k)+ 0.001); 
end

where C is a vector of electricity prices(pre-defined, so it is not variable) and H(k) and Q(k) are variables...

Thanks in advance...
Reply all
Reply to author
Forward
0 new messages