TECHNOLOGY

SimPy strict=False: suppressing a lateness error does not meet a real-time deadline

In this article
THE QUICK TAKE

Disabling strict mode changes failure reporting; it does not remove computation, recover lost wall-clock time or establish hardware-in-the-loop timing correctness.

A successful run can still deliver stale interaction

A digital twin drives a human-facing panel or a hardware-in-the-loop interface through a real-time environment. Heavy computation causes lateness errors, so the developer disables strict checking and the run finishes. That result establishes a different error policy, not timely interaction. Keep logical event order and wall-clock delivery as separate evidence. A controller receiving an old observation late can violate the experiment’s timing assumptions even when every event eventually executes.

The factor defines an intended time mapping

The real-time guide defines factor as wall-clock duration per unit of simulation time. It controls pacing rather than accelerating the callback’s computation. A smaller intended wall interval leaves less time for the same work. Preserve the time unit, factor and actual processing times when explaining results. A smooth logical clock is insufficient because the event-based model can maintain its own timestamps while actual processing falls behind the intended mapping.

Strict mode governs the reaction to excessive delay

The API reference describes a RuntimeError when processing is too slow under strict mode and permits disabling that behavior. Setting strict=False removes that failure path; it does not subtract already spent computation time. Do not infer zero lateness from an empty error log. If continuing late is acceptable for an offline visualization, state that policy separately from a test that requires observations or commands to arrive within a real-time budget.

Measure event lateness at the interaction boundary

A proposed fixture should retain each relevant logical event time, its intended wall-clock instant and its actual callback or external handoff time. Use a declared monotonic timing reference and distinguish computation delay from transport delay if the experiment includes an external device. Compare strict and nonstrict error handling under the same proposed workload. No real-time simulation or hardware interaction was executed here. This defines evidence to collect, not a measured latency distribution.

Rebasing a clock is a distinct lifecycle action

The API provides sync to align the internal timing baseline with current wall time, useful when time passes between environment creation and execution. Do not describe rebasing as proof that earlier interactions met their deadlines. A chosen lifecycle may deliberately start a fresh pacing interval, but its history and external-device assumptions must remain explicit. Likewise, lowering workload or changing the factor requires a new interpretation of the experiment rather than erasing the previous timing failure.

State the acceptance claim at its actual scope

The simulation-validation study covers a separate physical-evidence boundary; stack reproducibility helps retain pacing configuration. Here acceptance distinguishes runtime continuation from real-time compliance. It does not establish hard operating-system guarantees, safe physical control or universal latency bounds. Those need their own timing design and validation after the team can report lateness even when it deliberately chooses to continue instead of raising an exception.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles