Conversation
- Remove original_dict from ConstraintsModel and original_constraints() accessor
- Add aliases::Vector{Vector{Symbol}} as 5th element in box constraint tuples
- Extend _dedup_box_constraints! to produce aliases (all labels per component)
- Update constraint(model, label) to resolve via aliases, return effective bounds
- Update dual(sol, model, label) to resolve via aliases, slice per-component
- Enforce strict dimension validation in _interpolate_from_data
- Adapt tests to new dedup+intersection semantics and per-component dual convention
- All 3582 tests passing
…_box(sol) - Rename functions to clarify they return dual dimension, not constraint dimension - Use multiple dispatch for _dual_dimension (::Nothing -> 0, ::Function -> length at t0) - Update display to check both duals and model constraints before showing - Add exports for new functions in OCP.jl - Update tests to use new function names - All 89 tests passing
- Add box constraint aliases section to CHANGELOG - Add dual dimension function clarification to CHANGELOG - Document breaking change: dim_*_constraints_box(sol) renamed to dim_dual_*_constraints_box(sol) - Add migration guide in BREAKING.md - Note that Model functions remain unchanged
Contributor
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.
Summary
This PR unifies the box constraint source of truth and clarifies dual dimension functions.
Commit 1: Unify box constraint source of truth with aliases (Option D)
original_dictfromConstraintsModelandoriginal_constraints()accessoraliases::Vector{Vector{Symbol}}as 5th element in box constraint tuples_dedup_box_constraints!to produce aliases (all labels per component)constraint(model, label)to resolve via aliases, return effective boundsdual(sol, model, label)to resolve via aliases, slice per-component_interpolate_from_dataCommit 2: Rename dim_constraints_box(sol) to dim_dual_constraints_box(sol)
_dual_dimension(::Nothing → 0, ::Function → length at t0)Tests
All 3582 tests passing.