Skip to content

Specifying custom solver options

Gurobi

Refer to the Gurobi manual, which contains a list of parameters. Simply use the parameter names given in the documentation (e.g. "NumericFocus" to set the numerical focus value). Below we list our recommended parameters to speed-up solver performance in large models, based on insights from empirical tests we carried out.

config.solve:
  solver: gurobi
  solver_options:
    Threads: 6            # Number of threads
    Method: 2             # Use Barrier algorithm, do not run other algorithms in parallel
    Crossover: 0          # Stop after barrier, do not perform crossover
    BarConvTol: 1e-4      # Tolerance for convergence

CPLEX

Refer to the CPLEX parameter list. Use the "Interactive" parameter names, replacing any spaces with underscores (e.g., the memory reduction switch is called "emphasis memory", and thus becomes "emphasis_memory"). For example, a similar configuration to the one illustrated above for Gurobi, would look as follows:

config.solve:
  solver: cplex
  solver_options:
    threads: 6                    # Number of threads
    lpmethod: 4                   # Use Barrier algorithm, do not run other algorithms in parallel
    solutiontype: 2               # Stop after barrier, do not perform crossover
    barrier_convergetol: 1e-4     # Tolerance for convergence