sil-kit icon indicating copy to clipboard operation
sil-kit copied to clipboard

-- time sync: Couple virtual time to wall clock

Open KonradBkd opened this issue 1 year ago • 0 comments

Subject

Introduce wall clock coupling of virtual time. Accessible via participant configuration:

Experimental:
  TimeSynchronization:
    AnimationFactor: 1.0

Description

  • Added a WallClockCoupling thread similar to the WatchDog thread that manages the time advances when due
  • Prevent sending NextSimTask at other places than the WallClockCoupling thread if the coupling is active
  • Improved performance for mixed system w/ wo/ time synchronization by not sending NextSimTask message to participants that don't use a TimeSyncService:
    • The timeSyncService is created by default with a lifecycle service, although it might be unused
    • Now, controllers can be created internally without performing the message subscriptions (preventing RegisterSilKitService)
    • For the TimeSyncService, the subscriptions are then performed when the user calls CreateTimeSyncService

Instructions for review / testing

  • Review code changes
  • Review changes to docs in configuration.rst and experimental-configuration.rst
  • Try with any demo: Comment out sleeps in SimStepHandler, use adapted participant config with e.g.
Experimental:
  TimeSynchronization:
    AnimationFactor: 100.0

  • Test is not run in the CI, run FTest_WallClockCoupling.cpp manually

Developer checklist (address before review)

  • [x] Changelog.md updated
  • [x] Documentation updated (public API changes only)
  • [ ] Squash and merge → proper PR title

KonradBkd avatar Jul 08 '24 09:07 KonradBkd