Skip to content

ForceFreeStates: file split (DeltaPrime/Chunking) and unified integration_method API #255

Closed

Description

@logan-nc

Two related cleanups carried by the historical-record PR #252 that are worth landing on top of #178.

File split

Extract from the current combined files:

  • DeltaPrime.jl — Δ' matrix assembly (≈817 lines on the rewrite branch).
  • Chunking.jl — cost-based load-balanced partitioning, including the empirical log-divergent cost model from Glasser 2018 / STRIDE (≈202 lines).

This makes Riccati.jl / Integration.jl smaller and gives Δ' assembly and chunking their own units of testability and review.

Unified integration_method / integration_threads API

Collapse the per-feature flags (use_parallel, use_riccati, parallel_threads) on PerturbedEquilibriumControl into a single dispatcher:

  • integration_method::Symbol — e.g. :ChunkedRiccati (default), :LegacyEulerLagrange, plus whatever follow-on names make sense.
  • integration_threads::Int — threads available to the dispatched method.

Pre-0.1.0 we don't need deprecation shims for the old flags — see the project memory note no-deprecation-shims-pre-010. Update the example gpec.toml files and any tests that still reference the old flags.

Reference implementation: src/ForceFreeStates/{Integration,Riccati,DeltaPrime,Chunking}.jl on feature/forcefreestates-rewrite (PR #252).

Acceptance:

  • DeltaPrime.jl and Chunking.jl exist as their own files with focused responsibilities.
  • use_parallel / use_riccati / parallel_threads removed from PerturbedEquilibriumControl; only integration_method + integration_threads remain.
  • All example TOMLs and tests updated.

Activity

  1. added this to the GPEC v2.0.0 milestone on Jun 17, 2026
  2. jhalpern30 commented on Sep 29, 2026

    @jhalpern30
    Collaborator

    Closing as superseded. The integrator refactor stack (#381, #393, #400) landed the substance of this in a different form:

    • Unified API: use_riccati / use_parallel / parallel_threads are gone; they now sit in the deprecated-keys list. Integrator
      selection is a single integrator = "forward" | "riccati" | "galerkin" backed by the AbstractIntegrator types
      (ForceFreeStates/Integrators.jl).
    • File split: ForceFreeStates/Riccati/ is its own subdirectory, and Δ′ assembly lives in Riccati/DeltaPrimeBVP.jl.

    The only item not done as written is a standalone Chunking.jl; the partitioning lives in Riccati/Driver.jl (377 lines). Open a
    small follow-up if that split is still wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorBehavior-preserving restructuring

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions