Skip to content

Correct quadratic-constraint claims in formulation skill#1407

Draft
cafzal wants to merge 1 commit into
NVIDIA:mainfrom
cafzal:claude/focused-wiles-892533
Draft

Correct quadratic-constraint claims in formulation skill#1407
cafzal wants to merge 1 commit into
NVIDIA:mainfrom
cafzal:claude/focused-wiles-892533

Conversation

@cafzal

@cafzal cafzal commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Corrects a stale claim in the concepts-only cuopt-numerical-optimization-formulation skill, which stated QP allows only linear constraints and that quadratic constraints are unsupported. cuOpt in fact supports convex quadratic constraints (Q PSD, inequality only) — converting them to second-order cones and solving with the barrier method — while non-convex or equality quadratic constraints remain unsupported.

Three concepts-level edits (no API symbols, no maturity labels): the Constraints row of the LP/MILP/QP table, the constraints formulation question, and the post-solve sensitivity note — the last gaining one line that duals are not returned when the model has quadratic constraints (the second-order cone path returns primal values only), so users don't expect a dual off a cone constraint.

Why. Verified against source — python/cuopt/cuopt/tests/socp/test_socp.py adds quadratic constraints solved with the barrier method, and docs/cuopt/source/cuopt-c/convex/convex-examples.rst states "dual variables are not currently returned for problems with quadratic constraints." Phrasing matches the sibling cuopt-multi-objective-exploration skill, which already states this scope. Follows #1393 (dual/sensitivity per problem type) in the same skill.

Validation & gating. ci/utils/validate_skills.sh passes. NVSkills-Eval — which also regenerates BENCHMARK.md, the skill card, and the signature — is the gate and is pending: skills/** CI needs a maintainer and cannot be triggered from a fork branch.

Follow-up. The api-python / api-c skills scope duals to "LP only" while this skill says "LP/QP," and no test asserts duals for a QP with linear constraints; reconciling that (with a test) is tracked separately.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

Companion PRs — coordinated follow-ons to #1393, catching the numerical-optimization skills up to cuOpt's 26.06 QP / quadratic-constraint additions:

Shared verified boundary across all three: a QP with linear constraints returns duals (the barrier solver is primal-dual); any quadratic constraint suppresses duals for the whole solve (cpp/src/pdlp/solve.cu NaN-fills the dual/reduced-cost arrays). MILP has no duals.

The concepts-only formulation skill claimed QP supports only linear
constraints and that quadratic constraints are unsupported. cuOpt does
support convex quadratic constraints (PSD, inequality only), which it
converts to second-order cones and solves with the barrier method;
non-convex or equality quadratic constraints remain unsupported. Fixes
the LP/MILP/QP table Constraints row and the formulation-questions note.

Also adds a boundary to the post-solve sensitivity note: dual values are
not returned when the model includes quadratic constraints, so users do
not expect a dual off a second-order cone constraint.

Verified against python/cuopt/cuopt/tests/socp/test_socp.py (quadratic
constraints solved with SolverMethod.Barrier) and
docs/cuopt/source/cuopt-c/convex/convex-examples.rst ("dual variables
are not currently returned for problems with quadratic constraints").
Phrasing aligned with the sibling cuopt-multi-objective-exploration
skill for consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: cafzal <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

cafzal added a commit to cafzal/cuopt that referenced this pull request Jun 8, 2026
…vior

cpp/src/pdlp/solve.cu (has_quadratic_constraints -> thrust::fill the entire
dual_solution + reduced_cost with quiet_NaN) shows a single quadratic
constraint suppresses duals for the *whole* solve, not just that constraint's
row. Reword "no dual for a quadratic constraint" -> "any quadratic constraint
makes cuOpt return no duals for the whole solve" in Step 3 and the QP eval, for
consistency with PRs NVIDIA#1407 (formulation) and NVIDIA#1408 (api skills, "NaN-filled").

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: cafzal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant