simpy.rt — Real-time simulation¶
Execution environment for events that synchronizes passing of time with the real-time (aka wall-clock time).
- class simpy.rt.RealtimeEnvironment(initial_time=0, factor=1.0, strict=True)¶
Execution environment for an event-based simulation which is synchronized with the real-time (also known as wall-clock time). A time step will take factor seconds of real time (one second by default). A step from 0 to 3 with a factor=0.5 will, for example, take at least 1.5 seconds.
- factor = None¶
Scaling factor of the real-time.
- strict = None¶
The currently active process of the environment.
alias of AllOf
alias of AnyOf
alias of Event
Stop the current process, optionally providing a value.
This is a convenience function provided for Python versions prior to 3.3. From Python 3.3, you can instead use return value in a process.
The current simulation time.
alias of Process
Executes step() until the given criterion until is met.
- If it is None (which is the default), this method will return when there are no further events to be processed.
- If it is an Event, the method will continue stepping until this event has been triggered and will return its value.
- If it is a number, the method will continue stepping until the environment’s time reaches until.
- schedule(event, priority=1, delay=0)¶
Schedule an event with a given priority and a delay.
Synchronize the internal time with the current wall-clock time.
alias of Timeout