LP File Parsing

File I/O 1 implementation

Sections: Minimize/Maximize, Subject To, Bounds, Integers/Generals/Binaries, End Algebraic format: constraint_name: coeff1var1 + coeff2var2 <= rhs

Constraint types: <= (L), >= (G), = (E) Bound keywords: Free, Inf, -Inf Variable types: Integers, Generals (same), Binaries, Semi-Continuous

Mathematical Formulation

Reads: min/max c'x s.t. Ax ≤ b, Ax ≥ b, Ax = b Bounds: lb ≤ x ≤ ub or x free Integrality: x ∈ Z or x ∈ {0,1}

Complexity

Parsing: O(file_size), token-based lexer More human-readable than MPS but less standardized

Implementations

CoinUtils

  • CoinLpIO.hpp - LP file format reader/writer for linear programming problems

Reads/writes CPLEX LP format with Min/Max objective, constraints, bounds, and integer/binary variable declarations.