15
$\begingroup$

I've been learning and playing with CPLEX/Gurobi for a year using C++/Python API. I know some basic stuff like writing a model, callbacks, basic playing with solvers' parameters.

I am wondering what are the most important steps you recommend to learn more about those solvers. I mean the steps to go from apprenticeship to guru status.

The kind of answers I would enjoy (but feel free to suggest whatever you want ) :

  • Read this (e.g. tutorial, source code)
  • Pay attention to that kind of details
  • Learn about these concepts
  • Implement X
  • ...

Edit : I would appreciate a structured step-by-step path.

Backgrounds : B.S. in pure mathematics, M.S. student in Applied mathematics (with O.R specialization)

$\endgroup$
16
$\begingroup$

You may be interest in the blog by @prubin, which has many interesting CPLEX posts: OR in an OB World.

I think the best way to become better at using solvers, is by actually using them in your own projects. An interesting project could be to solve a problem with Benders decomposition, or with multithreaded callbacks.

This blog post from the above-mentioned blog is about Benders decomposition, and can serve as a starting point.

$\endgroup$
  • 3
    $\begingroup$ @prubin should get some points commission for answers referncing his blog as the key substance. But SE apparenlly has no provision for commission points. $\endgroup$ – Mark L. Stone Sep 9 at 14:35
  • 1
    $\begingroup$ Agreed, but I don't know how we could do this. $\endgroup$ – Kevin Dalmeijer Sep 9 at 18:31
  • 3
    $\begingroup$ I haven't figured out yet where I can spend these points, so I'm not worried too much about it. ;-) $\endgroup$ – prubin Sep 9 at 20:38
7
$\begingroup$

I recommend you read the Gurobi Documentation:

the Gurobi Documentation is better than Cplex Documentation and their classes, functions, ... are similar. Besides that, check some codes using Cplex in a git-hub repository.

A good question to learn more is "how to stop the solver when your model finding the first feasible solution. To clarify, you need to stop your program or return an integer solution found when the column of the Cplex-log named Best Integer to stop being empty".

hint: CPX_PARAM_INTSOLLIM

$\endgroup$
  • $\begingroup$ Could you elaborate your answer on stopping the solver when it finds the first feasible solution ? $\endgroup$ – Amira Zarglayoun Sep 8 at 22:33
  • 1
    $\begingroup$ I will edit this question. $\endgroup$ – Alexandre Frias Sep 8 at 22:35
6
$\begingroup$

Solvers like CPLEX and Gurobi usually use the pre-solve steps to simplify the modeled problem. Actually, the aim of pre-solving step is, to eliminate fixed variables, remove redundant constraints, remove linear dependencies, substitute out (implied) free variables, and reduce the size of the optimization problem in general. As a guru user, you may focus on the implementation of those steps and compare the results(in terms of solution time and complexity) with/without those options. In the pre-solve steps, on the other hand, those solvers use some heuristics to modify the solution space which comes out of a black box without any details. Focusing on the implementation of those heuristics may help you understand and even design more effective approaches.

$\endgroup$
5
$\begingroup$

There's an old joke (popular at least in New York, back in the day). Newly arrived tourist to local: "How do I get to Carnegie Hall?" Local to tourist: "Practice, practice, practice."

I can't say how to reach guru status, not having gotten there myself. I suspect it involves working for the tech team that produces one of the solvers. To get to what I might call "power user" status, you need to use the solver repeatedly, starting with easy to formulate models and progressing to models that involve advanced techniques (decomposition, column generation, mysterious oracles, ...).

Things that have helped me get where I am today vis-a-vis CPLEX, in no particular order, are:

  • Using it ... a lot.
  • Using it with a programming API. APIs require you to attend to details from which modeling languages (such as OPL, MPL, AMPL, GAMS etc.) might shield you. I personally don't think you need experience with more than one API, although it certainly does not hurt. When programming, if something in the API documentation seems unclear or unexpected, take some time to chase it down and see if there is a (possibly hidden) reason why it is the way it is.
  • Monitoring the relevant help forums. (I subscribe to the CPLEX forums via RSS feed.) Not only can you get your own questions answered, but you can learn tidbits about the internals from seeing the answers to other peoples' questions ... plus you can find out where people get confused by the solver.
  • Watching for solver-related questions and answers on forums such as this one.
  • Experimenting, as time permits, to see if you can figure out the answer to a question (or the source of an error message) when someone asks something not particularly mundane on one of those forums.
  • Attending conference workshops (and occasionally presentations in technical sessions) by the vendor. IBM, Gurobi and (I think) FICO put on workshops at some conferences, including the INFORMS annual meetings.
  • Stopping by the vendor booths at those conferences and chatting up the technical folks.
  • Attending (or watching after the fact) vendor webinars. I know that IBM and Gurobi both have periodic free webinars on topics related to their solvers, and I'm pretty sure I've seen FICO webinars listed.

I'm not sure that list is exhaustive, but it's all I can think of at the moment.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.