Solver Options for EPM#
EPM solves large-scale mixed-integer programs (MIPs). Properly configuring solver options can significantly reduce runtime and improve numerical stability.
Solver settings are defined in a cplex.opt
file.
→ See example cplex.opt
for reference.
Recommended Solver Parameters#
Parameter |
Recommended Value |
Description & Rationale |
---|---|---|
|
|
Number of solver threads. Using more threads than CPU cores (oversubscription) can improve performance through load balancing and OS scheduling. Too many threads (e.g., >16) may increase overhead and slow the model. Test different values. |
|
|
Controls which algorithm is used to solve LPs: |
|
|
Starting algorithm for root LPs (when solving MIPs): same values as |
|
|
Tells CPLEX to solve the primal ( |
|
|
Barrier algorithm type: |
|
|
Algorithm used for crossover after barrier: |
|
|
Sets threshold for treating columns as dense in the barrier method. This can greatly impact performance. Try tuning in steps of ±100. |
|
|
Complementarity tolerance for barrier method. Lower values improve precision but may slow convergence. |
|
|
Type of solution to return: |
|
|
Emphasizes memory-saving strategies, helpful for large models prone to memory issues. |
|
|
Controls verbosity during barrier solve. Higher values produce more output (good for diagnostics). |
|
|
Controls constraint matrix scaling: |
|
|
Disables auxiliary tasks in the root node. Reduces time spent in presolve when root node is slow to launch. |
Notes on Performance Tuning#
Start with default recommendations and test on a small-to-medium scenario.
Barrier method parameters (
baralg
,barcolnz
,barepcomp
) can greatly impact performance, especially for LP relaxations.Interior point solution (
solutiontype = 2
) is not always suitable for MIPs. Use only when appropriate.If presolve seems to hang, try setting:
auxrootthreads = 0
Solver Types for EPM#
In EPM, the MODELTYPE
determines the class of optimization problem used during the Solve
statement. You can set it via a macro like:
Solve PA using %MODELTYPE% minimizing vNPVcost;
Using the Python API, epm.py
, it’s the parameter --solver
that can be used to specify the solver (MIP
or RMIP
))
MODELTYPE |
Description |
Use Case / Notes |
---|---|---|
|
Linear Programming |
All variables and constraints are linear. Use for fastest solve when there’s no need for integer or binary decisions. |
|
Mixed Integer Programming |
Linear model with some variables constrained to be integer or binary. Use when decisions involve on/off or countable options. |
|
Relaxed MIP |
Like MIP, but all integer/binary constraints are relaxed to continuous. Useful for debugging or getting bounds before full MIP solve. |
RMIP
keeps the full structure of a MIP model (including integer vars), but relaxes integrality — making it solvable as a continuous problem.
LP
is purely linear, and expects all variables to be continuous.Use
RMIP
when you want to check bounds or feasibility of a MIP model without solving the full integer problem.