feat: constraint-kind trait family and path-constraint/multiplier carriers#484
Merged
Conversation
…riers
- Add AbstractConstraintKind trait family (Traits/constraint_kind.jl):
StateConstraintKind, ControlConstraintKind, MixedConstraintKind
- Add constraint_kind() accessor and predicates (is_state/control/mixed_constraint)
- Wire into Traits.jl (includes, exports, module docstring)
- Add AbstractPathConstraint{K,TD,VD} abstract type (Data/abstract_path_constraint.jl)
- Add PathConstraint{F,K,TD,VD} concrete type with natural/uniform call signatures
- User-facing constructors: StateConstraint(), ControlConstraint(), MixedConstraint()
- Add AbstractMultiplier{TD,VD} abstract type (Data/abstract_multiplier.jl)
- Add Multiplier{F,TD,VD} concrete type with natural/uniform call signatures
- Add display helpers in Data/helpers.jl (_kind_label, _natural_sig_pc, _uniform_sig_pc,
_natural_sig_mult, _uniform_sig_mult)
- Wire into Data.jl (includes, exports)
- Update test_data_module.jl export/private symbol lists
- Add 5 new test files: test_constraint_kind.jl, test_abstract_path_constraint.jl,
test_path_constraint.jl, test_abstract_multiplier.jl, test_multiplier.jl
- Full CTBase test suite: 4579/4579 passing (Aqua included)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Introduces trait family for constraint kinds and generic carriers for path constraints and multipliers, laying groundwork for constrained optimal control flows.
AbstractConstraintKindtrait family (Traits/constraint_kind.jl):StateConstraintKind,ControlConstraintKind,MixedConstraintKindwithconstraint_kind()accessor and predicatesPathConstraint{F,K,TD,VD}type (Data/path_constraint.jl): carriers for path-constraint functions with constraint kind, time/variable dependence. Natural call signatures per kind (g(x),g(u),g(x,u)) and uniformg(t,x,u,v). User-facing constructors:StateConstraint(),ControlConstraint(),MixedConstraint().Multiplier{F,TD,VD}type (Data/multiplier.jl): carriers for Lagrange multipliers with time/variable dependence. Call signatureμ(t,x,p,v)and natural forms.Design reference
See .reports/constraints-and-duals-design.md section B1 (CTBase phase).
Test plan
Version bumped to 0.27.3-beta.
🤖 Generated with Claude Code