Cuopt Numerical Optimization API CLI

LP, MILP, and QP (beta) with cuOpt — CLI only (MPS files, cuopt_cli). Use when the user is solving LP, MILP, or QP from MPS via command line.

Published by @NVIDIA·0 agent reads / 30d·0 saves·

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

  • 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.

Bundled with this artifact

11 files

Reference files that ship alongside this artifact. Agents pull these in only when the task needs them.

More on the bench

SKILL0

Postgres

Execute read-only SQL queries against multiple PostgreSQL databases. Use when: (1) querying PostgreSQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

software-engineering+2
0
SKILL0

Pylabrobot

Vendor-agnostic lab automation framework. Use when controlling multiple equipment types (Hamilton, Tecan, Opentrons, plate readers, pumps) or needing unified programming across different vendors. Best for complex workflows, multi-vendor setups, simulation. For Opentrons-only protocols with official API, opentrons-integration may be simpler.

software-engineering+2
0
SKILL0

Nextflow

Build, run, and debug Nextflow data pipelines and nf-core workflows end to end. Use whenever the user mentions Nextflow, nf-core, .nf files, nextflow.config, DSL2, processes/channels/operators, samplesheets, or wants to run a community pipeline (e.g. nf-core/rnaseq, nf-core/sarek), write or test a module/subworkflow with nf-test, configure executors/containers (Docker, Singularity/Apptainer, Conda, Wave), scale a workflow to HPC/SLURM or cloud (AWS Batch, Google Batch, Azure, Kubernetes), or debug a failed/-resume run. Make sure to use this skill for any reproducible scientific/bioinformatics workflow work even if the user does not say the word "Nextflow", and for authoring nf-core-compliant pipelines, modules, configs, and linting.

software-engineering+2
0