Solver Configuration
To define and solve the optimization problems, GenX relies on JuMP, a domain-specific modeling language for mathematical optimization written in Julia, and on a variety of open-source and commercial solvers. GenX supports the following solvers:
- Cbc (open-source)
- Clp (open-source)
- CPLEX (commercial)
- Gurobi (commercial)
- HiGHS (open-source)
- SCIP (open-source)
Solver related settings parameters are specified in the appropriate .yml file (e.g. highs_settings.yml
, gurobi_settings.yml
, etc.), which should be located in the settings
folder inside the current working directory (the same settings
folder where genx_settings.yml
is located). Settings are specific to each solver. Check the Example_Systems
folder for examples of solver settings files and parameters.
GenX supplies default settings for most solver settings in the various solver-specific functions found in the src/configure_solver/
directory. To overwrite default settings, you can specify the below Solver specific settings.
The following table summarizes the solver settings parameters and their default/possible values.
Since each solver has its own set of parameters names, together with a description of the parameter, the table provides a reference to the the corresponding solver specific parameter name.
Solver settings parameters**
Settings Parameter | Description |
---|---|
Method | Algorithm used to solve continuous models or the root node of a MIP model. Generally, barrier method provides the fastest run times for real-world problem set. |
CPLEX: CPX_PARAM_LPMETHOD - Default = 0; See link for more specifications. | |
Gurobi: Method - Default = -1; See link for more specifications. | |
clp: SolveType - Default = 5; See link for more specifications. | |
HiGHS: Method - Default = "choose"; See link for more specifications. | |
BarConvTol | Convergence tolerance for barrier algorithm. |
CPLEX: CPX_PARAM_BAREPCOMP - Default = 1e-8; See link for more specifications. | |
Gurobi: BarConvTol - Default = 1e-8; See link for more specifications. | |
Feasib_Tol | All constraints must be satisfied as per this tolerance. Note that this tolerance is absolute. |
CPLEX: CPX_PARAM_EPRHS - Default = 1e-6; See link for more specifications. | |
Gurobi: FeasibilityTol - Default = 1e-6; See link for more specifications. | |
clp: PrimalTolerance - Default = 1e-7; See link for more specifications. | |
clp: DualTolerance - Default = 1e-7; See link for more specifications. | |
Optimal_Tol | Reduced costs must all be smaller than Optimal_Tol in the improving direction in order for a model to be declared optimal. |
CPLEX: CPX_PARAM_EPOPT - Default = 1e-6; See link for more specifications. | |
Gurobi: OptimalityTol - Default = 1e-6; See link for more specifications. | |
Pre_Solve | Controls the presolve level. |
Gurobi: Presolve - Default = -1; See link for more specifications. | |
clp: PresolveType - Default = 5; See link for more specifications. | |
Crossover | Determines the crossover strategy used to transform the interior solution produced by barrier algorithm into a basic solution. |
CPLEX: CPX_PARAM_SOLUTIONTYPE - Default = 2; See link for more specifications. | |
Gurobi: Crossover - Default = 0; See link for more specifications. | |
NumericFocus | Controls the degree to which the code attempts to detect and manage numerical issues. |
CPLEX: CPX_PARAM_NUMERICALEMPHASIS - Default = 0; See link for more specifications. | |
Gurobi: NumericFocus - Default = 0; See link for more specifications. | |
TimeLimit | Time limit to terminate the solution algorithm, model could also terminate if it reaches MIPGap before this time. |
CPLEX: CPX_PARAM_TILIM- Default = 1e+75; See link for more specifications. | |
Gurobi: TimeLimit - Default = infinity; See link for more specifications. | |
clp: MaximumSeconds - Default = -1; See link for more specifications. | |
MIPGap | Optimality gap in case of mixed-integer program. |
CPLEX: CPX_PARAM_EPGAP- Default = 1e-4; See link for more specifications. | |
Gurobi: MIPGap - Default = 1e-4; See link for more specifications. | |
DualObjectiveLimit | When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit. |
clp: DualObjectiveLimit - Default = 1e308; See link for more specifications. | |
MaximumIterations | Terminate after performing this number of simplex iterations. |
clp: MaximumIterations - Default = 2147483647; See link for more specifications. | |
LogLevel | Set to 1, 2, 3, or 4 for increasing output. Set to 0 to disable output. |
clp: logLevel - Default = 1; See link for more specifications. | |
cbc: logLevel - Default = 1; See link for more specifications. | |
InfeasibleReturn | Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well). |
clp: InfeasibleReturn - Default = 0; See link for more specifications. | |
Scaling | Sets or unsets scaling; 0 -off, 1 equilibrium, 2 geometric, 3 auto, 4 dynamic(later). |
clp: Scaling - Default = 3; See link for more specifications. | |
Perturbation | Perturbs problem; Switch on perturbation (50), automatic (100), don't try perturbing (102). |
clp: Perturbation - Default = 3; See link for more specifications. | |
maxSolutions | Terminate after this many feasible solutions have been found. |
cbc: maxSolutions - Default = -1; See link for more specifications. | |
maxNodes | Terminate after this many branch-and-bound nodes have been evaluated |
cbc: maxNodes - Default = -1; See link for more specifications. | |
allowableGap | Terminate after optimality gap is less than this value (on an absolute scale) |
cbc: allowableGap - Default = -1; See link for more specifications. | |
ratioGap | Terminate after optimality gap is smaller than this relative fraction. |
cbc: ratioGap - Default = Inf; See link for more specifications. | |
threads | Set the number of threads to use for parallel branch & bound. |
cbc: threads - Default = 1; See link for more specifications. |