Skip to content

Fix dual signs for greater-than constraints - #135

Merged
lovasoa merged 6 commits into
mainfrom
agent/fix-dual-signs-geq
Aug 2, 2026
Merged

lovasoa merged 6 commits into
mainfrom
agent/fix-dual-signs-geq

Conversation

@lovasoa

@lovasoa lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #82

Summary

Preserve whether a constraint was originally written with >=.

  • HiGHS now emits greater-than constraints as native lower-bounded rows, preserving the solver's dual sign.
  • Clarabel keeps its orientation metadata locally and negates only duals for constraints that were normalized from >=.
  • ConstraintReference remains unchanged.
  • Added a regression test covering the issue's model for both HiGHS and Clarabel.

Validation

  • cargo fmt --all
  • cargo test --features highs,clarabel
  • cargo test --no-default-features --features highs,clarabel --test shadow_price
  • cargo clippy --features highs,clarabel --all-targets -- -D warnings

@lovasoa
lovasoa marked this pull request as ready for review August 2, 2026 20:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf5f6aaa3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/solvers/clarabel.rs Resolved
@lovasoa
lovasoa merged commit e253694 into main Aug 2, 2026
12 checks passed
@lovasoa
lovasoa deleted the agent/fix-dual-signs-geq branch August 2, 2026 21:31
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.

Sign Error on Dual values for >= Constraints

1 participant