cuopt-lp-milp-api-cli
cuOpt LP/MILP — CLI
Confirm problem type and formulation (variables, objective, constraints, variable types) before coding.
This skill is CLI only (MPS input).
Basic usage
# Solve LP or MILP from MPS file
cuopt_cli problem.mps
# With options
cuopt_cli problem.mps --time-limit 120 --mip-relative-tolerance 0.01
Common options
cuopt_cli --help
# Time limit (seconds)
cuopt_cli problem.mps --time-limit 120
# MIP gap tolerance (stop when within X% of optimal)
cuopt_cli problem.mps --mip-relative-tolerance 0.001
# MIP absolute tolerance
cuopt_cli problem.mps --mip-absolute-tolerance 0.0001
# Presolve, iteration limit, method
cuopt_cli problem.mps --presolve --iteration-limit 10000 --method 1
MPS format (required sections, in order)
- NAME — problem name
- ROWS — N (objective), L/G/E (constraints)
- COLUMNS — variable names, row names, coefficients
- RHS — right-hand side values
- BOUNDS (optional) — LO, UP, FX, BV, LI, UI
- ENDATA
Integer variables: use 'MARKER' 'INTORG' before and 'MARKER' 'INTEND' after the integer columns.
Troubleshooting
- Failed to parse MPS — Check ENDATA, section order (NAME, ROWS, COLUMNS, RHS, [BOUNDS], ENDATA), integer markers.
- Infeasible — Check constraint directions (L/G/E) and RHS values.
Examples
- assets/README.md — Build/run for sample MPS files
- lp_simple — Minimal LP (PROD_X, PROD_Y, two constraints)
- lp_production — Production planning: chairs + tables, wood/labor
- milp_facility — Facility location with binary open/close
Getting the CLI
CLI is included with the Python package (cuopt). Install via pip or conda; then run cuopt_cli --help to verify.
More from nvidia/cuopt
cuopt-lp-milp-api-c
LP and MILP with cuOpt — C API only. Use when the user is embedding LP/MILP in C/C++.
2cuopt-user-rules
Base behavior rules for using NVIDIA cuOpt. Read this FIRST before any cuOpt user task (routing, LP/MILP, QP, installation, server). Covers handling incomplete questions, clarifying data requirements, verifying understanding, and running commands safely.
1cuopt-developer
Contribute to NVIDIA cuOpt codebase including C++/CUDA, Python, server, docs, and CI. Use when the user wants to modify solver internals, add features, submit PRs, or understand the codebase architecture.
1cuopt-qp-api-cli
QP with cuOpt — CLI (e.g. cuopt_cli with QP-capable input). Use when the user is solving QP from the command line.
1skill-evolution
After solving a non-trivial problem, detect generalizable learnings and propose skill updates so future interactions benefit automatically. Always active — applies to every interaction.
1qp-formulation
Quadratic Programming (QP) — problem form and constraints. Domain concepts; no API or interface. QP is beta.
1