Skip to content

Feature/variable costate#234

Merged
ocots merged 7 commits into
developfrom
feature/variable-costate
May 22, 2026
Merged

Feature/variable costate#234
ocots merged 7 commits into
developfrom
feature/variable-costate

Conversation

@ocots
Copy link
Copy Markdown
Member

@ocots ocots commented May 22, 2026

No description provided.

ocots added 7 commits May 21, 2026 22:29
…ostate

- Add _variable_costate()::Bool = false default in Common/default.jl
- Add initial_variable_costate stub on AbstractConfig
- Add AugmentedHamiltonianPointConfig{T0,X0,P0,PV0,TF} struct with getters
- Add Base.show overloads for AugmentedHamiltonianPointConfig
- Update Common.jl exports for AugmentedHamiltonianPointConfig, initial_variable_costate, _variable_costate
- Add tests for _variable_costate in test_default.jl
- Add comprehensive tests for AugmentedHamiltonianPointConfig in test_configs.jl
…spatch

- Updated build_solution signature to accept ::Type{Common.PointTrait}, ::Type{Common.StateTrait}, etc. instead of trait instances
- Updated calling code in src/Flows/calling.jl to pass trait types via Common.mode_trait and Common.content_trait
- Updated internal RHS builder functions in vector_field_system.jl and hamiltonian_vector_field_system.jl to use ::Type{OutOfPlace} and ::Type{InPlace}
- Added comprehensive docstrings for all modified functions
- Updated all test files to match new signature:
  - test_sciml_extension.jl
  - test_calling_flows.jl
  - test_flow_callables.jl
  - test_calling_multiphase.jl
  - test_building_solutions.jl
- Fixed method ambiguity in test_flow_callables.jl by splitting mock into type-specific methods
- Removed unused _rhs_oop wrapper function from hamiltonian_vector_field_system.jl
…ions

- Add new trait family AbstractVariableCostateCapability (SupportsVariableCostate, NoVariableCostate)
- Move ad_trait to Common with default WithoutAD implementation
- Add variable_costate_trait getter on systems (SupportsVariableCostate for NonFixed)
- Add ad_trait and variable_costate_trait getters on flows
- Update prepare_cache to use Common.ad_trait
- Add _aug_split_solution helper and build_solution overload for AugmentedHamiltonianTrait
- Add build_problem overload for augmented Hamiltonian configs in CTFlowsSciML
- Add variable_costate kwarg and call_variable_costate dispatch chain in Flows
- Create test_variable_costate.jl with 20 unit tests
- Update test_abstract_trait.jl with new trait tests
- Update exports in Common/Common.jl
- Added scalarize helper in Common/helpers.jl for handling scalar/vector conversions
- Updated build_solution signatures to use config instead of initial_state
- Added variable costate dispatch with type-based error handling (PreconditionError)
- Implemented call_variable_costate methods for SupportsVariableCostate/NoVariableCostate traits
- Added error handling for missing variable parameter and trajectory configs
- Updated test_variable_costate.jl with linear Hamiltonian and analytical solution
- Fixed test signatures for build_solution across multiple test files
- Added comprehensive error tests for variable costate constraints
@ocots ocots merged commit 11f28af into develop May 22, 2026
6 checks passed
@ocots ocots deleted the feature/variable-costate branch May 22, 2026 12:03
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