Core components for event-discrete simulation environments.
Base class for event processing environments.
An implementation must at least provide the means to access the current time of the environment (see now) and to schedule (see schedule()) events as well as processing them (see step().
The class is meant to be subclassed for different execution environments. For example, SimPy defines a Environment for simulations with a virtual time and and a RealtimeEnvironment that schedules and executes events in real (e.g., wallclock) time.
The current time of the environment.
The currently active process of the environment.
Schedule an event with a given priority and a delay.
Processes the next event.
Executes step() until the given criterion until is met.
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.
Execution environment for an event-based simulation. The passing of time is simulated by stepping from event to event.
You can provide an initial_time for the environment. By default, it starts at 0.
This class also provides aliases for common event types, for example process, timeout and event.
The current simulation time.
The currently active process of the environment.
Return a new Event instance. Yielding this event suspends a process until another process triggers the 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.
Schedule an event with a given priority and a delay.
Process the next event.
Raise an EmptySchedule if no further events are available.
Executes step() until the given criterion until is met.
Allows classes to behave like methods.
The __get__() descriptor is basically identical to function.__get__() and binds the first argument of the cls to the descriptor instance.
Bind all BoundClass attributes of the instance’s class to the instance itself to increase performance.
Thrown by an Environment if there are no further events to be processed.
Convenience alias for infinity