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?
GAMS solvers: which one to use
linear programming;nonlinear programming
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 functionGiven 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.