Skip to content
Development
Skill

/cuopt-numerical-optimization-formulation

LP, MILP, QP — concepts, problem-text parsing, and formulation patterns (parameters, constraints, decisions, objective). Concepts only; no API.

From plugin
skills
3.8k200 skills

Claude Code

$ npx -y skills add NVIDIA/skills --skill cuopt-numerical-optimization-formulation --agent claude-code

SKILL.md

cuopt-numerical-optimization-formulation.SKILL.md
name: cuopt-numerical-optimization-formulation
version: "26.10.00"
description: LP, MILP, QP — concepts, problem-text parsing, and formulation patterns (parameters, constraints, decisions, objective). Concepts only; no API.
license: Apache-2.0
metadata:
  author: NVIDIA cuOpt Team
  tags:
    - linear-programming
    - milp
    - qp
    - formulation
    - concepts

Numerical Optimization Formulation

Concepts and workflow for going from a problem description to a clear formulation across LP, MILP, and QP. No API code here.

What is LP / MILP / QP

  • **LP**: Linear objective, linear constraints, continuous variables.
  • **MILP**: Same as LP plus some integer or binary variables (e.g., scheduling, facility location, selection).
  • **QP**: Quadratic objective (e.g., x², x·y terms — portfolio variance, least squares), linear constraints. **QP support in cuOpt is currently in beta.**

Identifying problem type

| Property | LP | MILP | QP | |---|---|---|---| | Objective | Linear | Linear | Quadratic (xᵀQx + cᵀx) | | Constraints | Linear | Linear | Linear + convex quadratic (inequality only) via second-order cones | | Variables | Continuous | Mixed: continuous + integer/binary | Continuous | | Sense | min or max | min or max | **minimize only** (negate to max) | | Duals / sensitivity | Dual values + reduced costs | **None** (integer optima) | Dual values + reduced costs |

If the objective is purely linear, prefer LP/MILP — do not artificially introduce quadratic terms. If any variable is integer or binary, the problem is MILP regardless of the rest.

**Post-solve sensitivity (LP / QP only).** Continuous LP and QP solutions expose **dual values** (the marginal objective change per unit a binding constraint is relaxed: *where to invest to improve the outcome*) and **reduced costs** (for a variable the optimizer left at zero, how far it must improve to enter the solution: a *near-miss*). **MILP solutions have no duals** — integer optima are not continuous, so there are none to return. Duals are also unavailable when the model includes quadratic constraints — the second-order cone path returns primal values only. See the language-specific API skills for how to retrieve them after a solve.

Required formulation questions

Ask these if not already clear:

1. **Decision variables** — What are they? Bounds? 2. **Objective** — Minimize or maximize? Linear or quadratic? For QP: any squared or cross terms (x², x·y)? If maximize a quadratic, the user must negate and minimize. 3. **Constraints** — Linear inequalities/equalities? Convex quadratic constraints (inequality only) are also supported, handled as second-order cones; non-convex or equality quadratic constraints are not. 4. **Variable types** — All continuous (LP / QP) or some integer/binary (MILP)? 5. **Convexity (QP only)** — For minimization, the quadratic form (matrix Q) should be positive semi-definite for well-posed problems.

Typical modeling elements

  • **Continuous variables** — production amounts, flow, allocations, portfolio weights.
  • **Binary variables** — open/close, yes/no (e.g., facility open, item selected).
  • **Linking constraints** — e.g., production only if facility open (Big-M or indicator).
  • **Resource constraints** — linear cap on usage (materials, time, capacity).
  • **Quadratic objective terms** — variance (xᵀQx), squared error (‖Ax − b‖²), interaction terms.

Typical QP use cases

  • Portfolio optimization — minimize variance subject to return and budget.
  • Least squares — minimize ‖Ax − b‖² subject to linear constraints.
  • Other quadratic objectives with linear constraints.

---

Problem statement parsing

When the user gives **problem text**, classify every sentence and then summarize before formulating. The parsing framework below applies regardless of LP / MILP / QP.

**Classify every sentence** as **parameter/given**, **constraint**, **decision**, or **objective**. Watch for **implicit constraints** (e.g., committed vs optional phrasing) and **implicit objectives** (e.g., "determine the plan" + costs → minimize total cost).

**Ambiguity:** If anything is still ambiguous, ask the user or solve all plausible interpretations and report all outcomes; do not assume a single interpretation.

🔒 MANDATORY: When in Doubt — Ask

  • If there is **any doubt** about whether a constraint or value should be included, **ask the user** and state the possible interpretations.

🔒 MANDATORY: Complete-Path Runs — Try All Variants

  • When the user asks to **run the complete path** (e.g., end-to-end, full pipeline), run all plausible variants and **report all outcomes** so the user can choose; do not assume a single interpretation.

Three labels

| Label | Meaning | Examples (sentence type) | |-------|--------|---------------------------| | **Parameter / given** | Fixed data, inputs, facts. Not chosen by the model. | "Demand is 100 units." "There are 3 factories." "Costs are $5 per unit." | | **Constraint** | Something that must hold. May be explicit or **implicit** from phrasing. | "Capacity is 200." "All demand must be met." "At least 2 shifts must be staffed." | | **Decision** | Something we choose or optimize. | "How much to produce." "Which facilities to open." "How many workers to hire." | | **Objective** | What to minimize or maximize. May be **explicit** ("minimize cost") or **implicit** ("determine the plan" with costs given). | "Minimize total cost." "Determine the production plan" (with costs) → minimize total cost. |

Implicit constraints: committed vs optional phrasing

**Committed/fixed phrasing** → treat as **parameter** or **implicit constraint** (everything mentioned is given or must happen). Not a decision.

| Phrasing | Interpretation | Why | |----------|-----------------|-----| | "Plans to produce X products" | **Constraint**: all X must be produced. | Commitment; production level is fixed. | | "Operates 3 factories" | **Parameter**: all 3 are open. Not a location-selection pr

Read more
@nvidia
Ships withskills

Official, NVIDIA-verified Agent Skills for Claude Code, Codex, and other coding agents.

3.8k200 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
3.8k
Star history of NVIDIA/skills on GitHub, a chart by star-history.com

Other skills on skills.

nvidia-skill-finder

nvidia-skill-finder

Use for NVIDIA-related requests where an NVIDIA skill might help, even if the user did not ask for a skill. Trigger on NVIDIA…

@nvidia@nvidiaInstall Skill
accelerated-computing-cudf

accelerated-computing-…

Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby,…

@nvidia@nvidiaInstall Skill
amc-run-rtsp-calibration

amc-run-rtsp-calibrati…

Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or…

@nvidia@nvidiaInstall Skill
amc-run-sample-calibration

amc-run-sample-calibra…

Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice.…

@nvidia@nvidiaInstall Skill
amc-run-video-calibration

amc-run-video-calibrat…

Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live…

@nvidia@nvidiaInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about cuopt-numerical-optimization-formulation.

Which coding agents can use cuopt-numerical-optimization-formulation?
cuopt-numerical-optimization-formulation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.