Skip to content

[FEATURE] Design execution timing mechanism rehaul #117

@yunlishao

Description

@yunlishao

Is your feature request related to a problem?

As Real-Sim FIXS expands to support more XIL configurations and multi-rate co-simulation scenarios, the execution timing architecture needs a deliberate redesign. A formalized timing framework would enable real-time pacing, multi-rate execution, and predictable behavior under load.

Core areas to address:

  • Execution timing contract: Establish a formal contract defining how simulation steps are scheduled, what timing guarantees are provided, and how components declare their timing requirements.
  • Deadline miss behavior: Allow users to declare what should happen when a simulation step cannot meet its timing deadline (e.g., skip, catch up, warn, halt).
  • Multi-rate co-simulation: Support components running at different rates (e.g., traffic at 10 Hz, vehicle dynamics at 100 Hz) with well-defined synchronization points.

Describe the solution you'd like

This is a design exploration issue. The goal is to investigate the three key ideas above and produce a design/implementation plan.

Scope of design work:

  1. Explore what an execution timing contract should look like for FIXS — how should components declare their timing needs via config.yaml?
  2. Explore user-declared deadline miss policies — what behaviors make sense, and how should they be configured?
  3. Explore multi-rate support — how should TrafficLayer orchestrate components running at different frequencies, considering both SUMO (TrafficLayer-driven stepping) and VISSIM (DLL-driven stepping)?
  4. Consider impact on existing XIL integrations (CarMaker, Simulink, Carla).
  5. Identify sub-tasks to be filed as separate implementation issues under milestone 0.10.0.

Output:

  • Design document with implementation plan (markdown in doc/ or wiki)
  • List of follow-up implementation issues for milestone 0.10.0

Describe alternatives you've considered

  • Keeping current execution model and handling timing externally per-component — fragments timing logic and makes system behavior harder to reason about.
  • Incremental pacing additions without a broader timing contract — doesn't address multi-rate needs or deadline miss policies.

Additional context

Key files relevant to this design:

  • TrafficLayer/TrafficLayer/mainTrafficLayer.cpp — main simulation loop
  • CommonLib/TrafficHelper.hSIM_STEP, runOneStepSimulation()
  • CommonLib/TrafficHelper.cpp — step execution, SimulationMode handling
  • CommonLib/ConfigHelper.h — configuration parsing

This is the first issue under the new milestone 0.10.0. Implementation issues will follow from the design output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions