Skip to content

feat: automatic grid extension for memory optimization (v0.9.14)#295

Merged
ocots merged 1 commit intomainfrom
time_grid
Apr 12, 2026
Merged

feat: automatic grid extension for memory optimization (v0.9.14)#295
ocots merged 1 commit intomainfrom
time_grid

Conversation

@ocots
Copy link
Copy Markdown
Member

@ocots ocots commented Apr 12, 2026

  • Add automatic extension of time grids that differ by only the last element
  • This enables UnifiedTimeGridModel instead of MultipleTimeGridModel for memory optimization
  • Add _extend_grid_to_match() helper function in solution.jl
  • Integrate grid extension into build_solution() after validation
  • Update build_solution() docstring with Automatic Grid Extension section
  • Add test/suite/ocp/test_grid_extension.jl with 8 tests
  • Update CHANGELOG.md and BREAKING.md for version 0.9.14
  • Bump version to 0.9.14 in Project.toml

Extension condition: grid must be a strict prefix (missing exactly the last element) All grids (T_state, T_control, T_costate, T_path) are checked for extension Trajectory data matrices remain unchanged; interpolation handles extended grids via T[1:N] No breaking changes - fully backward compatible

- Add automatic extension of time grids that differ by only the last element
- This enables UnifiedTimeGridModel instead of MultipleTimeGridModel for memory optimization
- Add _extend_grid_to_match() helper function in solution.jl
- Integrate grid extension into build_solution() after validation
- Update build_solution() docstring with Automatic Grid Extension section
- Add test/suite/ocp/test_grid_extension.jl with 8 tests
- Update CHANGELOG.md and BREAKING.md for version 0.9.14
- Bump version to 0.9.14 in Project.toml

Extension condition: grid must be a strict prefix (missing exactly the last element)
All grids (T_state, T_control, T_costate, T_path) are checked for extension
Trajectory data matrices remain unchanged; interpolation handles extended grids via T[1:N]
No breaking changes - fully backward compatible
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 12, 2026

Breakage test results
Date: 2026-04-12 17:00:20

Name Latest Stable
CTDirect compat: v0.9.13 compat: v0.9.13
CTFlows compat: v0.9.13 compat: v0.9.13
OptimalControl compat: v0.9.13 compat: v0.9.13

@ocots ocots merged commit 0033751 into main Apr 12, 2026
19 checks passed
@ocots ocots deleted the time_grid branch April 12, 2026 18:41
@ocots ocots mentioned this pull request Apr 12, 2026
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