0
$\begingroup$

The other day I had a discussion with a friend about the GAMS solvers and we were wondering what are the mathematical differences between the solvers. Which one to use for which kind of problem? How to know which solvers to use and what happens if the "wrong" solver is selected?

$\endgroup$

2 Answers 2

3
$\begingroup$

Somewhere in the GAMS file, after you've declared almost all of your model, you have to write a solve statement of the form solve <your_problem> using <formulation> {minimizing|maximizing} <your_objective_function_variable>;, where:

  • <your_problem> should be replaced with the name of your problem
  • <formulation> is one of the GAMS formulation types (lp, mip, nlp, etc.)
  • {minimizing|maximizing} means you're either solving a minimization problem or a maximization problem, so pick one of the two
  • <your_objective_function_variable> is whatever gams variable you're using to encode the objective function

Given a formulation type, GAMS provides a list of solvers you can use to solve that type of formulation. So if you use the wrong combination of formulation and solver, GAMS will return an error.

You probably want to pick the most restrictive formulation type that satisfies the formulation you've declared in the GAMS file. That is, you could write out an LP and then write in your GAMS file solve MyProblem using nlp minimizing z;, but LP solvers generally exploit additional structure to make solves faster.

For general solver recommendations, you can look at Hans Mittelmann's benchmark data for general purpose recommendations.

My experience is as follows, with the caveat that solver performance obviously depends on problem instance and input parameters, you should try multiple solvers and parameter tuning for best performance, and you should definitely consult Mittelmann's benchmarks yourself:

LP/QCP/MIP/MIQCP solvers: use CPLEX or Gurobi, if possible. Those two solvers are best of breed, and around 10x faster than anything else. SCIP is also pretty good, and CBC is one of the best free options.

NLP solvers (convex): CONOPT and DICOPT were good for small to medium-scale problems; for medium-scale problems, SNOPT works pretty well, too; for large-scale problems, I'd use IPOPT first.

MINLP/NLP (nonconvex): BARON's been considered the gold standard for a while. ANTIGONE is relatively new, and worth trying. COUENNE and BONMIN are also good options.

$\endgroup$
-2
$\begingroup$

For MILP the best solvers are CPLEX offered by GAMS, LINGO, and Gurobi in Python. You should have the full version of these solvers. There is no single solver is superior among these three solvers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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