cuopt-numerical-optimization-api-c

Solve LP, MILP, and QP problems via the NVIDIA cuOpt C API.

1.0k|218|Updated Apr 8, 2025
One-click install
npx skills add https://github.com/NVIDIA/cuopt --skill cuopt-numerical-optimization-api-c-nvidia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuopt-numerical-optimization-api-c
Source: https://github.com/NVIDIA/cuopt/tree/main/skills/cuopt-numerical-optimization-api-c
Command: npx skills add https://github.com/NVIDIA/cuopt --skill cuopt-numerical-optimization-api-c-nvidia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Provides a C-only path to solve linear programming (LP), mixed-integer linear programming (MILP), and quadratic programming (QP beta) with NVIDIA cuOpt for near real-time optimization on large problem instances.

Core Features & Use Cases

  • C API end-to-end workflow: create LP/MILP/QP problems, configure solver settings, solve, and retrieve objective and primal results using the cuOpt C API.
  • Sparse constraint modeling: build constraint matrices efficiently in CSR format with explicit variable bounds and variable types (continuous or integer).
  • QP constraints (beta): support quadratic objectives with documented limitations (MINIMIZE only, continuous variables only) for convex-style quadratic formulations.

Quick Start

Tell the assistant to generate a minimal C example that creates and solves an LP using the cuOpt C API with CSR constraints and retrieves the objective value.

Frequently Asked Questions about cuopt-numerical-optimization-api-c

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I solve linear programming and MILP problems in a C application?

Solve linear programming and MILP problems in C by using the cuOpt C API to create formulations, configure solver settings, execute cuOptSolve, and retrieve objective values and primal solutions. Build constraint matrices efficiently in CSR format alongside explicit variable bounds and continuous or integer variable typing.

Can I use GPU acceleration for mixed-integer linear programming with sparse constraints?

Yes, GPU acceleration handles mixed-integer linear programming using sparse constraint matrices modeled in CSR format. This approach supports explicit variable bounds and variable typing for continuous or integer variables, enabling near real-time optimization on large problem instances directly within C applications.

Does the cuOpt C API support quadratic programming?

The cuOpt C API supports quadratic programming in beta with specific limitations: it requires MINIMIZE objectives and continuous variables only. You can formulate convex-style quadratic objectives alongside sparse CSR constraints, but integer variables and maximization senses are not supported for QP problems.

What is the workflow to retrieve primal solutions after solving an LP in C?

The workflow to retrieve primal solutions after solving an LP in C involves creating the problem with cuOpt C headers, configuring solver settings, calling cuOptSolve, and then using cuOptGetObjectiveValue and cuOptGetPrimalSolution. You must validate formulation details including sense and variable types before extracting results.

What are the limitations of quadratic programming in the cuOpt C API?

Quadratic programming limitations in the cuOpt C API include support for MINIMIZE objectives only and continuous variables exclusively. QP formulations are in beta, meaning mixed-integer quadratic programming is unavailable, and users must validate formulation details to ensure compliance with these convex-style restrictions.