mixed integer SOCP with CPLEX and Gurobi

697 views
Skip to first unread message

hosein.h...@gmail.com

unread,
Jan 18, 2015, 1:10:31 AM1/18/15
to am...@googlegroups.com
hello,
I solve a mixed-integer second order cone programming problem with Cplex and Gurobi. The model is very small in size. I get two different solutions with these two solvers. Is there any bugs or this is normal?

e.d.an...@mosek.com

unread,
Jan 19, 2015, 9:00:37 AM1/19/15
to am...@googlegroups.com, hosein.h...@gmail.com
Why cant the solution be different? If your problem has multiple optimal solutions then the solutions can easily be different. 

The objective values should be same given the stopping the tolerances is the same. Otherwise your problem might ill conditioned or there is a bug somewhere.

Robert Fourer

unread,
Jan 19, 2015, 9:12:09 AM1/19/15
to am...@googlegroups.com
You should first check that CPLEX and Gurobi both report "optimal solution found" since otherwise the reported solutions are probably not meaningful. If they do both report "optimal solution found" then they should give the same objective values, at least to the first 5 or 6 significant digits. If not then you may want to post your example.

CPLEX and Gurobi may however return different values for the variables, because there can be more than one optimal solution that achieves the same objective value. When there is more than one optimal solution for the variables, then each solver returns the first solution that it finds, and different solvers may return different solutions.

Bob Fourer
am...@googlegroups.com

=======

hosein.h...@gmail.com

unread,
Jan 20, 2015, 12:19:35 AM1/20/15
to am...@googlegroups.com, 4...@ampl.com
hello,
thanks. the message after the solution by Cplex is : "optimal integer solution within mipgap or absmipgap", with " solve_result = solved" and "solve_result_num = 3". 
in addition, the solution produced by Gurobi is not physically meaningful.  

Ejike

unread,
Sep 3, 2015, 1:59:31 PM9/3/15
to AMPL Modeling Language, hosein.h...@gmail.com

Hi,

I am trying to model a mixed inter second order programming problem in AMPL, as the ampl does not have examples on this, i am struglling a bit.
Please, can anyone point me to a sample, code which i can use to familiarise myself with how to implement this in AMPL.

Thanks, to repeat, I am looking for a sample AMPL code for a mixed integer second order cone problem  

victor.z...@gmail.com

unread,
Sep 4, 2015, 1:54:09 PM9/4/15
to am...@googlegroups.com, hosein.h...@gmail.com

Quoting this answer on StackOverflow:

AMPL does support conic programming when used with the CPLEX and Gurobi solvers. See for example these slides:

http://www.ampl.com/MEETINGS/TALKS/2012_08_Berlin_Thu.1.H1058.pdf

http://www.ampl.com/MEETINGS/TALKS/2013_08_Lisbon_Thu.A.23.pdf

In brief, conic constraints are represented in AMPL as quadratic constraints, with a sum of squares of variables on the left-hand side, and either the square of a nonnegative variable or the product of two nonnegative variables on the right-hand side. Actually it is a little more general, as any term may be multiplied by a positive constant.

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages