Solver Options for EPM#

EPM solves large-scale mixed-integer programs (MIPs). Properly configuring modeltype options can significantly reduce runtime and improve numerical stability.

modeltype settings are defined in a cplex.opt file.
→ See example cplex.opt for reference.


How the Solver Works (new users)#

  1. Build the equations. EPM translates your inputs into a large linear model. You choose whether it includes integer decisions via the modeltype flag (for example MIP or RMIP).

  2. Presolve trims the problem. CPLEX removes redundant rows, tightens bounds, and prepares the first LP. If it looks stuck here, the log will linger on “Presolve”; consider adjusting auxrootthreads or the data itself.

  3. Root LP is solved. CPLEX decides automatically between dual-simplex and barrier (interior-point) depending on difficulty. This is where settings like lpmethod, baralg, and barcolnz matter most.

  4. Branch-and-bound (MIP only). If you run a MIP, the solver explores branches to enforce integrality, guided by optcr, mipemphasis, heuristics, and cuts. In RMIP mode there is no branching, so the run finishes here.

  5. Results are reported. The solver writes solution files, IIS diagnostics (if requested), and logs.

Decisions you need to make: (a) pick modeltype (MIP for discrete builds, RMIP for relaxed analysis), (b) point cplexfile to the preset closest to your needs (speed vs precision), and (c) adjust the headline parameters (optcr, mipemphasis, lpmethod, threads) only when you have evidence they are limiting performance.

Quick vocabulary

  • Barrier / interior-point: LP algorithm that keeps variables strictly within bounds while driving the objective to optimality; chosen automatically on hard relaxations.

  • Crossover: Post-barrier step that converts the interior solution into a simplex basis so branch-and-bound can reuse it efficiently.

  • Presolve / root node: Early simplification and the first LP solve before branching. Performance issues here slow down the entire run.

  • Helper threads: Auxiliary workers CPLEX uses at the root; disabling them (auxrootthreads = 0) can unblock stagnating presolve phases.


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 --modeltype that can be used to specify the modeltype (MIPor RMIP))

MODELTYPE

Description

Use Case / Notes

LP

Linear Programming

All variables and constraints are linear. Use for fastest solve when there’s no need for integer or binary decisions.

MIP

Mixed Integer Programming

Linear model with some variables constrained to be integer or binary. Use when decisions involve on/off or countable options.

RMIP

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.

Predefined CPLEX Option Files#

EPM ships several ready-made option files in epm/input/data_test/cplex. Each file aligns with the solver scenarios listed in scenarios_solver.csv.

File

Focus

Notes

cplex_baseline.opt

Balanced defaults

General-purpose settings used by baseline runs.

cplex_rmip_fast.opt

Fast relaxed solves

Opportunistic parallelism, lighter tolerances for exploratory RMIP runs.

cplex_rmip_precision.opt

Accurate relaxed solves

Deterministic parallelism, tighter tolerances for reproducible RMIP diagnostics.

cplex_mip_fast.opt

Fast integer solves

Looser optimality gap (optcr=0.05), heuristic-heavy for quick feasible solutions.

cplex_mip_precision.opt

High-precision integer solves

Tighter gap (optcr=0.01), deterministic search, IIS reporting enabled.

cplex_test.opt

Debug configuration

Verbose output with stable barrier and scaling settings.

To switch the solver configuration:

  • Edit the cplexfile row in your config.csv so it points to the desired option file (for example cplex/cplex_mip_precision.opt).

  • Or, for quick experiments, load scenarios_solver.csv and pick the column that references the file you want.

Example command (run from the epm root) that executes the comparison test:

python epm.py \
  --folder_input epm/input/data_test \
  --config config.csv \
  --scenarios scenarios_solver.csv

Resources#