what kind of method does gurobi use for solving LP? simplex??

1,079 views
Skip to first unread message

ingundinfo...@gmail.com

unread,
Aug 7, 2014, 12:19:21 PM8/7/14
to gur...@googlegroups.com
Hi all,

I am very new in the field of LP and gurobi and I would like to know what kind of method gurobi uses for solving LP. Simplex method or maybe another existing method? Is there any resource available about it?

I am trying to write a small program to get familiar with gurobi. In order to get the number of iterations ( is this in simplex method? I guess so) and the number of solutions via Java, I write as follows:
            logger.info("Optimal value " + model.get(GRB.DoubleAttr.ObjVal)) ;
            logger.info("#iterations : " + model.get(GRB.DoubleAttr.IterCount ) ) ;
            logger.info("#solutions : "  +  model.get(GRB.IntAttr.SolCount) ) ;
And I receive the following as result :
#iterations : 0.0
#solutions : 1
I cannot understand why I am getting always 0 for #iterations and 1 for solutions. Is that normal? 

Is it the correct way to receive the number of iterations via model.get(GRB.DoubleAttr.IterCount )  ?

How can I understand ( is there a variable to check in java ) which LP method gurobi is using for my problem?

Thanks for your help!!
Regards

Jakob Sch.

unread,
Aug 7, 2014, 3:14:05 PM8/7/14
to gur...@googlegroups.com
Hi,

Unless you stated something else, gurobi will use the dual simplex method for solving linear problems. In order to change that you'll have to change the method parameter (see http://www.gurobi.com/documentation/5.6/reference-manual/method#parameter:Method). Maybe, if your model is very small, the presolving routines in gurobi were able to solve your problem so the simplex algorithm had not to be started.

Best regards,
Jakob

ingundinfo...@gmail.com

unread,
Aug 8, 2014, 10:46:36 AM8/8/14
to gur...@googlegroups.com
Hi Jakob,

Thank you very much for your reply! How may I use the parameter GRB.IntParam.Method in JAVA?  I would like to see which integer value it has chosen and applied for solving the LP problem.
And how can I set this parameter in Java?

Regards,
Ing.

Jakob Sch.

unread,
Aug 8, 2014, 1:03:53 PM8/8/14
to gur...@googlegroups.com

ingundinfo...@gmail.com

unread,
Aug 11, 2014, 10:43:31 AM8/11/14
to gur...@googlegroups.com
Thank you so much : )
Reply all
Reply to author
Forward
0 new messages