Repository navigation
Conversation
pol3et
force-pushed
the
fix/fix-933-bound-constraints
branch
from
September 29, 2026 21:22
bc3485e to
80bec49
Compare
Collaborator
|
this seems to be overly complicated. It's better if we just raise an error when someone is trying to edit a constraint. It should not be supported I think |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #933.
After a constraint is inserted, editing its original expression currently leaves the stored Rust row unchanged. For example, changing the coefficient in
x >= 2to 2 still exportsx >= 2and solves to x=2. With this change, it exports2 x >= 2and solves to x=1.Keep inserted row handles on the expression and read/write through the model-owned rows. Coefficient, RHS, sense and in-place edits propagate across repeated insertions; insertion names stay row-local. Copies and ordinary arithmetic remain independent. Replacement validates the expression before writing and clears stale dual/slack values after success.
Three regression tests cover binding, repeated insertion, copies, serialization, side-effect-free formatting/arithmetic and rejected replacement preserving the complete previous row.
Validation against current master
1e6e325c164bc722a55c58ee9b665fccc5698a95(Python 3.12, Rust 1.98.1):--all-extras --no-extra mosek): 1,034 tests, 456 passed, 578 skipped, no failures or errors. The original clean-master failure / patched success was rerun.uv run ty check pulp,uv run ruff check pulp,uv run ruff format pulp --check, anduv run cargo check --manifest-path pulp/rust/Cargo.tomlpass. Extension rebuilt with maturin; focused mutation checks pass.This contribution was developed with AI assistance and checked with the regression and baseline comparisons above.
Replaces #947 after renaming the source branch. The patch commit is unchanged.