Loading...
Searching...
No Matches
Basics of the Command Line Interface for MILPs

Describes the basic usage of idol_cl for MILPs, including the expected input file format.

Input File Format

For MILPs, idol_cl accepts .mps and .lp files.

These are standard formats used by solvers such as Gurobi, Cplex, GLPK, and HiGHS.

In most cases, the file parsing is performed by the underlying solver used by idol.

For more details, refer to the IBM page on the .lp format or the lpsolve page on the .mps format.

Example (.lp and .mps)

Example of a simple MILP:

\[\begin{align} \min_{x,y} \quad & 3x + 4y \\ \text{s.t.} \quad & 2x + y \ge 5 \\ & x + 2y \ge 6 \\ & x, y \in \mathbb{Z}_{\ge 0} \end{align} \]

Corresponding .lp file:

Minimize
obj: 3 x + 4 y
Subject To
c1: 2 x + y >= 5
c2: x + 2 y >= 6
Bounds
x >= 0
y >= 0
Generals
x
y
End

Equivalent .mps file:

NAME example
ROWS
N obj
G c1
G c2
COLUMNS
x obj 3
x c1 2
x c2 1
y obj 4
y c1 1
y c2 2
RHS
rhs c1 5
rhs c2 6
BOUNDS
LO bnd x 0
LO bnd y 0
ENDATA

Solving Your First MILP

To solve a given MILP stored in an .lp file, all you need to do is

idol_cl milp solve model.lp

If you want to set a time limit and use a specific method, run

idol_cl milp solve model.lp --time-limit 3600 --method GLPK

To see which solution methods are available for a given problem, use the list-methods subcommand.

idol_cl milp list model.lp

Sampled Output:

╔════════════════════════════════════════╗
║ idol 0.10.3 ║
║ A C++ Framework for Optimization ║
║ by Henri Lefebvre, 2026 ║
║ https://henrilefebvre.com/idol ║
╚════════════════════════════════════════╝
-- No configuration file loaded.
-- Problem type is MILP.
-- Read main model from 10teams.mps.gz
Applicable Methods
Gurobi
Description: Gurobi Optimizer [https://www.gurobi.com/]
Required Assumptions:
✓ Requires Gurobi to be installed.
GLPK
Description: GLPK (GNU Linear Programming Kit) [https://www.gnu.org/software/glpk/]
Required Assumptions:
✓ Requires GLPK to be installed.
✓ Requires no SOS-type constraints.
✓ Requires no quadratic constraints.
✓ Requires a linear objective function.
HiGHS
Description: High Performance Software for Linear Optimization [https://highs.dev/]
Required Assumptions:
✓ Requires HiGHS to be installed.
✓ Requires no SOS-type constraints.
✓ Requires no quadratic constraints.
✓ Requires a linear objective function.
Other Methods
Cplex
Description: IBM ILOG CPLEX Optimization Studio [https://www.ibm.com/fr-fr/products/ilog-cplex-optimization-studio]
Required Assumptions:
✗ Requires Cplex to be installed.
JuMP
Description: Calls the Julia package JuMP [https://jump.dev/].
Required Assumptions:
✓ Requires JuMP to be installed.
✗ Requires a JuMP Optimizer to be specified with --jump-optimizer.

If no method is specified, idol_cl automatically selects a suitable solver for the detected problem type.