Crate mps

source ·
Expand description

§mps

mps is a parser for the Mathematical Programming System (MPS) file format, commonly used to represent optimization problems.

§Examples

Library

use mps::Parser;

let data = "
NAME example
ROWS
 N  OBJ
 L  R1
 L  R2
 E  R3
COLUMNS
    X1        OBJ       -6
    X1        R1        2
    X1        R2        1
    X1        R3        3
    X2        OBJ       7
    X2        R1        5
    X2        R2        -1
    X2        R3        2
    X3        OBJ       4
    X3        R1        -1
    X3        R2        -2
    X3        R3        2
RHS
    RHS1      R1        18
    RHS1      R2        -14
    RHS1      R3        26
BOUNDS
 LO BND1      X1        0
 LO BND1      X2        0
 LO BND1      X3        0
ENDATA";

Parser::<f32>::parse(data);

CLI

$ mps --input-path ./data/netlib/afiro

This crate provides both a library and a CLI for parsing MPS data. Key features include:

  • Configurable Parsing:
    • Supported feature flags:
      • cli - Command line interface.
      • trace - Enhanced debugging and statistics via nom_tracable and nom_locate.
  • Robustness: Extensively tested against Netlib LP test suite.
  • Performance: Benchmarked using Criterion.rs.

§References

Re-exports§

Modules§