npx skills add https://github.com/nvidia/skills
promptingcompany/nv-skills
cuopt-numerical-optimization-api-c
LP, MILP, and QP (beta) with cuOpt — C API only. Use when the user is embedding LP, MILP, or QP in C/C++.
Installation
npx skills add promptingcompany/nv-skills --skill cuopt-numerical-optimization-api-c
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
LP, MILP, and QP (beta) with cuOpt — C API only. Use when the user is embedding LP, MILP, or QP…
1.3K installsPostgreSQL-specific development assistant focusing on unique PostgreSQL features, advanced data…
15.3K installsUniversal SQL performance optimization assistant for comprehensive query tuning, indexing strat…
14.5K installsComprehensive Power BI DAX formula optimization prompt for improving performance, readability, …
9.1K installsAnalyze and improve business processes. Trigger with "this process is slow", "how can we improv…
2.8K installsAlso in this package
Other skills from promptingcompany/nv-skills · top by installs.
npx skills add promptingcompany/nv-skills
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
More metadata
- author
- NVIDIA cuOpt Team
- tags
- ["cuopt","linear-programming","milp","qp","c-api"]
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md3,420 B -
docs
SUMMARY.md149 B
History
- First seen on skills.sh
- First recorded snapshot · 39 installs
SKILL.md
cuOpt Numerical Optimization — C API
Solve LP, MILP, and QP problems via the cuOpt C API. The same library, headers, build pattern, and core calls (cuOptCreate*Problem, cuOptSolve, cuOptGetObjectiveValue) apply across all three; QP extends the API with quadratic-objective creation calls.
Confirm problem type and formulation (variables, objective, constraints, variable types) before coding.
This skill is C only.
API Call Sequence
For LP/MILP, the ordered C entry points are: cuOptCreateRangedProblem (sense CUOPTMINIMIZE / CUOPTMAXIMIZE, CSR constraint matrix as rowoffsets / colindices / values, vartypes char array using CUOPTCONTINUOUS / CUOPTINTEGER macros) → cuOptSolve(problem, settings, &solution) → cuOptGetObjectiveValue(solution, &objvalue) → matching cuOptDestroy* calls. Include <cuopt/mathematicaloptimization/cuoptc.h>. Full ordered code with build instructions in [references/examples.md](references/examples.md).
QP via C API (beta)
QP uses the same library, include/lib paths, and build pattern as LP/MILP — only the problem-creation call differs (it accepts a quadratic objective). See the cuOpt C headers (cpp/include/cuopt/mathematical_optimization/) for the QP-specific creation/solve calls and the repo docs at docs/cuopt/source/cuopt-c/lp-qp-milp/ for end-to-end QP examples.
QP rules:
- MINIMIZE only (
CUOPT_MINIMIZE). To maximizef(x), negate objective coefficients and Q entries. - Continuous variables only — set
CUOPT_CONTINUOUSfor every variable; integer QP is not supported. - Q should be PSD for a convex problem.
Dual values (LP / QP)
cuOptGetDualSolution and cuOptGetReducedCosts return duals and reduced costs for LP and QP. They are not returned for a problem with quadratic constraints (the arrays are filled with NaN), so read them only when all constraints are linear. See [assets/lpduals](assets/lpduals/) for the call sequence.
Debugging (MPS / C)
MPS parsing: Required sections in order: NAME, ROWS, COLUMNS, RHS, (optional) BOUNDS, ENDATA. Integer markers: 'MARKER', 'INTORG', 'INTEND'.
OOM or slow: Check problem size (variables, constraints); use sparse matrix; set time limit and gap tolerance.
Examples
- [examples.md](references/examples.md) — LP/MILP with build instructions
- [assets/README.md](assets/README.md) — Build commands for all reference code below
- [lpbasic](assets/lpbasic/) — Simple LP: create problem, solve, get solution
- [lpduals](assets/lpduals/) — Dual values and reduced costs
- [lpwarmstart](assets/lpwarmstart/) — PDLP warmstart (see README)
- [milpbasic](assets/milpbasic/) — Simple MILP with integer variable
- [milpproductionplanning](assets/milpproductionplanning/) — Production planning with resource constraints
- [mpssolver](assets/mpssolver/) — Solve from MPS file via
cuOptReadProblem
For CLI (MPS files), use cuopt_cli and product docs.
Escalate
For contribution or build-from-source, use product or repo documentation.