Cuopt numerical optimization api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.From its SKILL.md
npx -y skills add NVIDIA/skills --skill cuopt-numerical-optimization-apiAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.8 KB, as published. Nobody here has run it
cuOpt Numerical Optimization API
Model and solve LP, MILP, and QP problems using NVIDIA cuOpt's GPU-accelerated solver.
Interface Selection
Choose the reference for the user's interface:
| Interface | When to use | Reference |
|---|---|---|
| Python | User is writing Python code | references/python_api.md |
| C / C++ | User is embedding in a C/C++ application | references/c_api.md |
| CLI | User is solving from MPS files on the command line | references/cli_api.md |
If the interface is not yet clear, ask before writing any code.
Already using a modeling language? cuOpt also works as a solver backend for third-party modeling tools — AMPL, GAMS / GAMSPy, PuLP, JuMP, Pyomo, and CVXPY — with near-zero code changes (point the model's solver at cuOpt). CVXPY additionally covers convex QP and, in beta, QCQP / SOCP. Prefer this when the user already has a model in one of these tools rather than porting it to the cuOpt API. See Third-Party Modeling Languages.
Choosing LP vs MILP vs QP
Decide from the objective and variables:
| If the objective is... | And variables are... | Use |
|---|---|---|
Linear (sum of c_i * x_i) | All continuous | LP |
| Linear | Some integer or binary | MILP |
Has squared (x*x) or cross (x*y) terms | Continuous (integer QP not supported) | QP (beta) |
Prefer LP when the problem allows it. LP solves faster and has stronger optimality guarantees. Use MILP only when the problem logically requires whole numbers or yes/no decisions. Use QP only when the objective is genuinely quadratic (variance, squared error, kinetic energy).
- Use LP when every quantity can meaningfully be fractional: flows, proportions, rates, dollars, hours, tonnes of material, etc.
- Use MILP when the problem mentions counts of discrete entities, yes/no choices, or either/or decisions (e.g. open a facility or not, assign a person to a shift, number of trucks).
- Use QP when the objective minimizes variance, squared error, or any expression with
x*xorx*yterms (portfolio optimization, least squares, regularized regression).
Integer vs Continuous from Wording
| Problem wording / concept | Variable type | Examples |
|---|---|---|
| Discrete entities (counts) | INTEGER | Workers, cars, trucks, machines, pilots, facilities, units to manufacture |
| Yes/no or on/off | INTEGER (binary, lb=0 ub=1) | Open a facility, run a machine, assign a person to a shift |
| Amounts that can be fractional | CONTINUOUS | Tonnes, litres, dollars, hours, kWh, proportion of capacity |
| Rates or fractions | CONTINUOUS | Utilization, percentage, share of budget |
Rule of thumb: "How many things" → INTEGER. "How much" → CONTINUOUS.
QP Rules (all interfaces)
- MINIMIZE only — the solver rejects MAXIMIZE for quadratic objectives. To maximize
f(x), minimize-f(x)and negate the reported objective value. - Continuous variables only — integer QP is not supported.
- Q should be positive semi-definite for a convex, well-posed problem.
- Beta — API may evolve; treat as production-capable for typical convex QP.
Dual Values
Duals and reduced costs are available for LP and QP only:
- MILP — no duals (integer optima are not continuous).
- Quadratic constraints — duals unavailable even for LP/QP; all values return
NaN. - PDLP warmstart — LP only; MILP solves do not accept a PDLP warmstart.
Common Issues (all interfaces)
| Problem | Likely cause | Fix |
|---|---|---|
| Infeasible | Conflicting constraints | Check constraint logic and bounds |
| Unbounded | Missing bounds | Add variable bounds |
| Slow solve | Large problem | Set time limit; increase gap tolerance |
| QP rejected with MAXIMIZE | QP only supports MINIMIZE | Negate the objective; negate the result |
| QP returns non-optimal | Q not PSD or badly scaled | Check Q is PSD; rescale variables |
Solver Settings (concepts)
| Setting | Purpose |
|---|---|
time_limit | Stop after N seconds |
mip_relative_gap | Stop MILP when within X% of optimal |
mip_absolute_tolerance | Absolute MIP gap stop |
log_to_console | Enable solver logging |
Syntax varies by interface — see the interface reference file.
What ships with it: 51 files
112.5 KB alongside SKILL.md, 10 of them executable
assets/
- cli/lp_production/production.mps375 B
- cli/lp_production/README.md192 B
- cli/lp_simple/README.md191 B
- cli/lp_simple/sample.mps490 B
- cli/milp_facility/facility.mps694 B
- cli/milp_facility/README.md199 B
- cli/README.md856 B
- c/lp_basic/lp_simple.c3.6 KB
- c/lp_basic/README.md466 B
- c/lp_duals/lp_duals.c4.0 KB
- c/lp_duals/README.md500 B
- c/lp_warmstart/README.md289 B
- c/milp_basic/milp_simple.c3.4 KB
- c/milp_basic/README.md405 B
- c/milp_production_planning/milp_production.c3.5 KB
- c/milp_production_planning/README.md459 B
- c/mps_solver/data/sample.mps490 B
- c/mps_solver/mps_solver.c3.4 KB
- c/mps_solver/README.md590 B
- c/README.md1.7 KB
- python/least_squares/model.pyruns831 B
- python/least_squares/README.md136 B
- python/lp_basic/model.pyruns1.1 KB
- python/lp_basic/README.md207 B
- python/lp_duals/model.pyruns1.2 KB
- python/lp_duals/README.md227 B
- python/lp_warmstart/model.pyruns1.8 KB
- python/lp_warmstart/README.md140 B
- python/maximization_workaround/model.pyruns736 B
- python/maximization_workaround/README.md152 B
- python/milp_basic/incumbent_callback.pyruns1.8 KB
- python/milp_basic/model.pyruns1.2 KB
- python/milp_basic/README.md433 B
- python/milp_production_planning/model.pyruns1.2 KB
- python/milp_production_planning/README.md165 B
- python/mps_solver/data/README.md2.0 KB
- python/mps_solver/data/sample.mps490 B
- python/mps_solver/model.pyruns8.2 KB
- python/mps_solver/README.md2.2 KB
- python/mps_solver/results.md2.5 KB
11 more files not listed here. See all 51 in the repository.
Gives 0 of the 12 instructions most performance cost skills give
Counted across 797 of the 1,117 authors here whose files we hold, read 2026-09-06
- Check for product marketing context firstin 46 of 797, across 20 files
- Measure before optimizingin 31 of 797, across 25 files
- Profile first to identify the actual bottleneckin 23 of 797, across 22 files
- Verify your robots.txt allows AI crawlersin 21 of 797, across 12 files
- Import directly and avoid barrel filesin 19 of 797, across 15 files
- Spawn all runs in the same turnin 18 of 797, across 11 files
- Write a draft of the skillin 17 of 797, across 10 files
- Understand the user's intentin 17 of 797, across 10 files
- Use React.cache for per-request deduplicationin 16 of 797, across 11 files
- Profile before optimizingin 16 of 797, across 14 files
- Include specific numbers with sourcesin 15 of 797, across 8 files
- Add lazy loading to below-fold imagesin 15 of 797, across 10 files
Said here and by no other author read
- Ask before writing any code if the interface is unclear
- Prefer third-party modeling tools when available
- Prefer LP when the problem allows it
- Minimize only for quadratic objectives
- Use continuous variables only for QP
- Negate the objective and result to maximize quadratic objectives
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.