Skip to content

Conversation

bradNASA
Copy link
Contributor

@bradNASA bradNASA commented Aug 4, 2025

  • Review: By file with walkthroughs
  • Merge strategy: Merge (no squash)

Description

Implementation of in-memory incremental simulation. By default, this will be turned off except for scheduling.

Details can be found in presentations (that should be downloaded as pptx instead of viewing on web):

Also see the Incremental Simulation discussion.

Merging these changes avoids maintaining this as a separate version, which is problematic for architecture changes that do not consider this version. Updating this branch for new Aerie versions developed in parallel has been almost as much work as the implementation.

Verification

Tests added: IncrementalSimTests, EdgeCaseTests, GeneratedTests

The EdgeCaseTests and GeneratedTests tests validate against a past version of the develop branch copied as a module (merlin-driver-develop). Other implementations may also be compared; and alternative version of incremental sim is included).

Passes all tests

Documentation

No documentation has been invalidated. Documentation is needed.

Future work

Work needed before merging

  • Need a mechanism for turning it on/off while keeping it on for all tests.
  • Ensure simulation is not incremental with the sim configuration changes.
  • Compare performance to develop branch

Future work potentially beyond this pull request

  • IncrementalSimulationFacade needs to be hooked in and debugged--scheduling currently does not use it.
  • Safeguard memory usage; offload in-memory simulations.
  • Store incremental simulation results; currently, the full simulation results are constructed and stored, a bottleneck.
  • Enable UI to update incremental simulation results.
  • UI visualization and controls for turning on/off incremental sim and applicability of incremental sim
  • Coalesce chains of SimulationEngines into one for performance/memory improvement.
  • Tests that validate understanding of how incremental sim works, e.g.. assertDirectiveNotRerun(ActivityDirectiveId)
  • Tests that verify that performance has not changed significantly
  • Performance history/trending across versions would be nice
  • Add back the Aerie 2.1(?) version of merlin-driver to compare. It was replaced with Aerie 3.0.1.
  • Combine with checkpoint restart (persistent checkpoints) to do incremental sim without blowing up memory.
  • Incremental sim for sim configuration changes
  • Others found in discussion

mattdailis and others added 30 commits February 13, 2023 10:59
Need to see if currentTime is a problem for tasks running in the past.
The TimePoint.Deltas in TemporalEventSource make dealing with old and new timelines too awkward.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SimulationResultsInterface was added so that the results of multiple SimulationEngines can be combined lazily.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lets you exclude running specific tests with something like this:
./gradlew test -PexcludeTests="**/IntegrationTest*"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helps with debug

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to know why equals() and maybe hashCode() are necessary.

Copy link
Contributor Author

@bradNASA bradNASA Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added switch to optionally run newly added daemon tasks in the mission model since only some newly added tests need it.

@JoelCourtney
Copy link
Contributor

🫨

Copy link

sonarqubecloud bot commented Aug 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
24.9% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

7 participants