To solve a problem using optimisation, you need both a model and a solver. We covered the formulation of an optimisation model in another blog. Here, we show how to decide which solver to use, given a model. In the following, we will not attempt to give a comprehensive overview of available vendors and tools, but highlight some relevant properties of solvers, and the major benefits that commercial solvers offer over open-source solvers, with a focus on solvers that handle Mixed-Integer Linear Programs (MILP).
Superior Performance
Many comparisons of solvers focus on the runtime performance. Publicly available benchmarks compare the time needed to solve a set of instances to proven optimality, yielding a ranking of solvers, or generic “speed-up factors”. Beware of giving these results too much weight because they vary heavily for different models. Preferably run your own experiments based on your specific application. Note also that performance can be improved both by parameter tuning in the solver, or adjustments and simplifications to the model and approach.
Other Benefits
There are more benefits that commercial solvers offer beyond performance. Most offer excellent technical support that goes beyond correct usage of the software and can offer valuable feedback on your modelling or even suggest better approaches to your problems. These solvers also provide more reliability, meaning both the absence of programming errors but also the ability to solve models that suffer from numerical instability, which is common in energy applications. Extended modelling functionality offers convenience and rapid implementation, e.g., for hierarchical objectives, or nonlinear expressions. Finally, additional tooling is included, to help with automated parameter tuning or analysis of infeasible or poorly formulated models.

Challenges
On the other hand, the use of commercial solvers involves some challenges, such as a license fee that may exceed the limited budget of a pilot project. Further, license management adds some complexity to development and deployment. In principle, open-source solvers allow users to implement their own improvements or bug fixes, but in practice, the relevant expert knowledge is often missing. Most solvers still allow for customisation via plugins or callbacks to varying degrees.
If no solver-specific functionality is required, we recommend separating the formulation of the model from the solver used to find the solution. This allows us to run experiments with multiple solvers, or use different solvers in development and production.


