mcpField
C
cuopt-numerical-optimization-api-cli

cuopt-numerical-optimization-api-cli

github.com/promptingcompanyData & databases039 installsUpdated 17w ago
Repository

About cuopt-numerical-optimization-api-cli

A CLI skill for solving LP, MILP, and QP problems with NVIDIA cuOpt from MPS files. It covers problem formulation, command options, QP constraints, and common input troubleshooting.

Key features

  1. 01Solve LP, MILP, and QP from MPS
  2. 02Configure time limits and MIP tolerance
  3. 03Follow MPS section and marker rules
  4. 04Apply QP-specific formulation constraints
  5. 05Troubleshoot parsing and infeasibility

Use cases

  1. 01Solving an LP or MILP stored as MPS
  2. 02Setting a solve time limit or MIP gap
  3. 03Running a continuous-variable QP from MPS

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/promptingcompany/nv-skills --skill cuopt-numerical-optimization-api-cli

After installing, type/cuopt-numerical-optimization-api-cliin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

BENCHMARK.md
skill-card.md
skill.oms.sig
assets/
README.md
assets/lp_production/
production.mps
README.md
assets/lp_simple/
README.md
sample.mps
assets/milp_facility/
facility.mps
README.md
evals/
evals.json

Details

From the project README

cuOpt Numerical Optimization — CLI

Solve LP, MILP, and QP problems from MPS files via cuopt_cli. The same command, options, and MPS workflow apply across all three; QP uses the standard MPS quadratic-objective extension.

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)

  1. NAME — problem name
  2. ROWS — N (objective), L/G/E (constraints)
  3. COLUMNS — variable names, row names, coefficients
  4. RHS — right-hand side values
  5. BOUNDS (optional) — LO, UP, FX, BV, LI, UI
  6. ENDATA

Integer variables: use 'MARKER' 'INTORG' before and 'MARKER' 'INTEND' after the integer columns.

QP via CLI (beta)

Quadratic objectives extend the standard MPS workflow — same cuopt_cli command, same options. Check cuopt_cli --help for QP-specific flags and the repo docs at docs/cuopt/source/cuopt-cli/ for the quadratic-objective MPS format.

QP rules:

  • MINIMIZE only. For maximization, negate the objective coefficients (and Q entries) in the MPS file.
  • Continuous variables only — do not mix integer markers with quadratic objectives.

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

Getting the CLI

CLI is included with the Python package (cuopt). Install via pip or conda; then run cuopt_cli --help to verify.

Comments

Markdown supported