Crates.io | mps |
lib.rs | mps |
version | 0.1.1 |
source | src |
created_at | 2023-12-31 00:15:53.817613 |
updated_at | 2024-01-22 23:58:13.573093 |
description | A fast MPS parser |
homepage | https://integrated-reasoning.com/ |
repository | https://github.com/integrated-reasoning/mps/ |
max_upload_size | |
id | 1084493 |
size | 447,388 |
A fast MPS parser written in Rust
mps
is a parser for the Mathematical Programming System (MPS) file format, commonly used to represent optimization problems.
This crate provides both a library and a CLI for parsing MPS data. Key features include:
trace
- Enhanced debugging and statistics via nom_tracable
and nom_locate
.proptest
- Property testing integrations.cli
- Command line interface.Library
use mps::Parser;
let contents = "MPS data...";
match Parser::<f32>::parse(&contents) {
Ok((_, model)) => { /* use MPS model */ },
Err(e) => eprintln!("Parsing error: {}", e),
}
CLI
$ mps --input-path ./data/netlib/afiro
Add mps
to your flake.nix
:
{
inputs.mps.url = "https://flakehub.com/f/integrated-reasoning/mps/*.tar.gz";
outputs = { self, mps }: {
# Use in your outputs
};
}
docker run -it integratedreasoning/mps:latest
Conduct semantic validation to uncover potential issues upfront before passing models to the solver.