From 18dd23ba416b5b2a1b16f7a5d1c6d233cde69045 Mon Sep 17 00:00:00 2001 From: cafzal Date: Thu, 4 Jun 2026 18:12:16 -0700 Subject: [PATCH 1/2] Note dual/sensitivity support per problem type in formulation skill Educate the agent on what cuOpt exposes per problem type: LP and QP (continuous) have dual values (shadow prices) + reduced costs; MILP has none (integer optima are not continuous). Adds a "Duals / sensitivity" row to the problem-type table and a brief post-solve sensitivity note pointing to the lp_duals asset. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: cafzal --- skills/cuopt-numerical-optimization-formulation/SKILL.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skills/cuopt-numerical-optimization-formulation/SKILL.md b/skills/cuopt-numerical-optimization-formulation/SKILL.md index 08a4335c06..9b7e3c149b 100644 --- a/skills/cuopt-numerical-optimization-formulation/SKILL.md +++ b/skills/cuopt-numerical-optimization-formulation/SKILL.md @@ -32,9 +32,12 @@ Concepts and workflow for going from a problem description to a clear formulatio | Constraints | Linear | Linear | Linear (no quadratic constraints) | | Variables | Continuous | Mixed: continuous + integer/binary | Continuous | | Sense | min or max | min or max | **minimize only** (negate to max) | +| Duals / sensitivity | Shadow prices + reduced costs | **None** (integer optima) | Shadow prices + reduced costs (beta) | 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** (shadow prices — 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 cuOpt returns none for them. Read them via the API skills' `lp_duals` asset (`get_dual_solution` / `get_reduced_cost`, or `DualValue` / `ReducedCost` in the modeling API). + ## Required formulation questions Ask these if not already clear: From a401504295552bf5146da97ab76c0f44bffafbeb Mon Sep 17 00:00:00 2001 From: cafzal Date: Thu, 4 Jun 2026 20:52:16 -0700 Subject: [PATCH 2/2] Address #1355-style review feedback: drop beta label and API specifics The multi-objective skill PR (#1355) review asked to avoid maturity labels that go stale ("no need to mention beta ... text could get stale by the next release") and to keep concepts skills free of stale-prone specifics. This formulation skill is concepts-only (no API code), so: - drop the "(beta)" label on the QP duals cell (keep the capability statement) - remove specific method/asset names (lp_duals / get_dual_solution / get_reduced_cost / DualValue / ReducedCost); point to the language-specific API skills instead Keeps the per-type capability and the decision-language definitions. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: cafzal --- skills/cuopt-numerical-optimization-formulation/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/cuopt-numerical-optimization-formulation/SKILL.md b/skills/cuopt-numerical-optimization-formulation/SKILL.md index 9b7e3c149b..1b54e53efb 100644 --- a/skills/cuopt-numerical-optimization-formulation/SKILL.md +++ b/skills/cuopt-numerical-optimization-formulation/SKILL.md @@ -32,11 +32,11 @@ Concepts and workflow for going from a problem description to a clear formulatio | Constraints | Linear | Linear | Linear (no quadratic constraints) | | Variables | Continuous | Mixed: continuous + integer/binary | Continuous | | Sense | min or max | min or max | **minimize only** (negate to max) | -| Duals / sensitivity | Shadow prices + reduced costs | **None** (integer optima) | Shadow prices + reduced costs (beta) | +| Duals / sensitivity | Shadow prices + reduced costs | **None** (integer optima) | Shadow prices + 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** (shadow prices — 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 cuOpt returns none for them. Read them via the API skills' `lp_duals` asset (`get_dual_solution` / `get_reduced_cost`, or `DualValue` / `ReducedCost` in the modeling API). +**Post-solve sensitivity (LP / QP only).** Continuous LP and QP solutions expose **dual values** (shadow prices — 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. See the language-specific API skills for how to retrieve them after a solve. ## Required formulation questions