Configuring the optimization solver
A number of modules in xserver use a so-called solver to perform complex mathematical calculations quickly. Xserver supports two such solver: Gurobi and CBC. As Gurobi is (to the best of our knowledge) superior to CBC in almost all use-cases, we highly recommend using Gruobi as a solver, which is also active as default in the xserver.
Currently the following modules make use of Gurobi:
Configuration possibilities for Gurobi
Gurobi is enabled out of the box. For most use cases, there is no need to configure anything further.
If you want your xserver to support multiple request in modules that use Gurobi, you can do so by making according adjustments in the core modules configuration in conf/xserver.conf
. Note however that this is only recommended if you have sufficient hardware to support this. Multiple instances of a Gurobi solver may consume much more memory and cpu power than is available on your machine.
- If, for example, you want xroute and xdima to handle four requests at the same time, while xcluster (which uses Gurobi) should only handle two requests at the same time, you can achieve the by the following core modules configuration.
core { modules { definitions { default { services = [xroute, xdima] } gurobiEnabled { services = [xcluster] } } instances { default = 4 // Still allow four parallel xroute or xdima requests gurobiEnabled = 2 // Only allow two Gurobi related requests } } ... }
If you are unsure about the best configuration for your back-end instances, our support will be able to assist you.
Do not forget to restart the server after you are finish. It is also recommended to validate that the modules are still functional.
Moving back to Cbc
- In case you want to use the open source solver Cbc and explicitly prevent the xserver to use Gurobi, you can do so by the following adjustments to
conf/xserver.conf
: Set thesolverType
for all modules you want to use Cbc with toCbc
. E.g. for xcluster this would be:xcluster { solverType = "Cbc" }