cuopt-numerical-optimization-api

작성자: nvidia

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.

npx skills add https://github.com/nvidia/cuopt --skill cuopt-numerical-optimization-api

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:

InterfaceWhen to useReference
PythonUser is writing Python codereferences/python_api.md
C / C++User is embedding in a C/C++ applicationreferences/c_api.md
CLIUser is solving from MPS files on the command linereferences/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 continuousLP
LinearSome integer or binaryMILP
Has squared (x*x) or cross (x*y) termsContinuous (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*x or x*y terms (portfolio optimization, least squares, regularized regression).

Integer vs Continuous from Wording

Problem wording / conceptVariable typeExamples
Discrete entities (counts)INTEGERWorkers, cars, trucks, machines, pilots, facilities, units to manufacture
Yes/no or on/offINTEGER (binary, lb=0 ub=1)Open a facility, run a machine, assign a person to a shift
Amounts that can be fractionalCONTINUOUSTonnes, litres, dollars, hours, kWh, proportion of capacity
Rates or fractionsCONTINUOUSUtilization, 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)

ProblemLikely causeFix
InfeasibleConflicting constraintsCheck constraint logic and bounds
UnboundedMissing boundsAdd variable bounds
Slow solveLarge problemSet time limit; increase gap tolerance
QP rejected with MAXIMIZEQP only supports MINIMIZENegate the objective; negate the result
QP returns non-optimalQ not PSD or badly scaledCheck Q is PSD; rescale variables

Solver Settings (concepts)

SettingPurpose
time_limitStop after N seconds
mip_relative_gapStop MILP when within X% of optimal
mip_absolute_toleranceAbsolute MIP gap stop
log_to_consoleEnable solver logging

Syntax varies by interface — see the interface reference file.

nvidia의 다른 스킬

compileiq-debug
nvidia
Use when something is wrong: Search() hangs, all evaluations return INVALID_SCORE, scores aren't improving, every config returns the same number, ptxas errors…
official
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
official
diagnose-perf
nvidia
First-responder performance triage for Isaac Sim and Isaac Lab. Identifies bottleneck category (GPU-bound, CPU-bound, VRAM, loading) using nvidia-smi and…
official
eagle3-review-logs
nvidia
Review EAGLE3 pipeline experiment logs from the launcher's experiments/ directory. Summarizes pass/fail status for all 4 tasks, diagnoses failures with root…
official
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
official
karpathy-guidelines
nvidia
일반적인 LLM 코딩 실수를 줄이기 위한 행동 지침입니다. 코드 작성, 검토 또는 리팩토링 시 과도한 복잡성을 피하고 정밀한 변경을 위해 사용하세요.
official
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
official
underdeclared-agent
nvidia
A helpful assistant agent
official