From 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++.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cuopt-numerical-optimization-api-c:cuopt-numerical-optimization-api-cThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
assets/README.mdassets/lp_basic/README.mdassets/lp_basic/lp_simple.cassets/lp_duals/README.mdassets/lp_duals/lp_duals.cassets/lp_warmstart/README.mdassets/milp_basic/README.mdassets/milp_basic/milp_simple.cassets/milp_production_planning/README.mdassets/milp_production_planning/milp_production.cassets/mps_solver/README.mdassets/mps_solver/data/sample.mpsassets/mps_solver/mps_solver.cresources/examples.mdSolve 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.
#include <cuopt/linear_programming/cuopt_c.h>
// CSR format for constraints
cuopt_int_t row_offsets[] = {0, 2, 4};
cuopt_int_t col_indices[] = {0, 1, 0, 1};
cuopt_float_t values[] = {2.0, 3.0, 4.0, 2.0};
char var_types[] = {CUOPT_CONTINUOUS, CUOPT_INTEGER};
cuOptCreateRangedProblem(
num_constraints, num_variables, CUOPT_MINIMIZE,
0.0, objective_coefficients,
row_offsets, col_indices, values,
constraint_lower, constraint_upper,
var_lower, var_upper, var_types,
&problem
);
cuOptSolve(problem, settings, &solution);
cuOptGetObjectiveValue(solution, &obj_value);
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/linear_programming/) 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:
CUOPT_MINIMIZE). To maximize f(x), negate objective coefficients and Q entries.CUOPT_CONTINUOUS for every variable; integer QP is not supported.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.
cuOptReadProblemFor CLI (MPS files), use cuopt_cli and product docs.
For contribution or build-from-source, use product or repo documentation.
npx claudepluginhub coin-or/cuopt --plugin cuopt-numerical-optimization-api-cLP, 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.
Solve Linear Programming (LP), Mixed-Integer Linear Programming (MILP), and Quadratic Programming (QP, beta) with the Python API. Use when the user asks about optimization with linear or quadratic objectives, linear constraints, integer variables, scheduling, resource allocation, facility location, production planning, portfolio optimization, or least squares.
Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.