This PR addresses #449 , and adds additional tests to ensure coverage of solution_mappings.
In the process, this PR changes how the CompiledDynamics modules interact with the ChiRho LogTrajectory handler. Previously, the LogTrajectory handler only appeared in the interface methods, leaving the CompiledDynamicsforward method responsible only for returning the final state of the simulation. While this is the default behavior of ChiRho, it limited our ability to compose CompiledDynamics modules into ensembles, and resulted in a substantial amount of duplicated code in the interfaces. Now, CompiledDynamics is responsible for the logic of whether to return a single state or a full trajectory, and all downstream computations (e.g. add observables, noise, etc.) compose naturally via tensor broadcasting.
This PR addresses #449 , and adds additional tests to ensure coverage of
solution_mappings
.In the process, this PR changes how the
CompiledDynamics
modules interact with the ChiRhoLogTrajectory
handler. Previously, theLogTrajectory
handler only appeared in the interface methods, leaving theCompiledDynamics
forward
method responsible only for returning the final state of the simulation. While this is the default behavior of ChiRho, it limited our ability to composeCompiledDynamics
modules into ensembles, and resulted in a substantial amount of duplicated code in the interfaces. Now,CompiledDynamics
is responsible for the logic of whether to return a single state or a full trajectory, and all downstream computations (e.g. add observables, noise, etc.) compose naturally via tensor broadcasting.