Parent type for event processing environments.
An implementation must at least provide the means to access the current time of the environment (see
now), to process events (see
peek) and to give a reference to the active process (see
The class is meant to be subclassed for different execution environments. For example, SimJulia defines a
Environment for simulations with a virtual time.
run(env::AbstractEnvironment) → nothing¶
step function until there are no further events to be processed.
run(env::AbstractEnvironment, until::Float64) → nothing
step function until the environment’s time reaches until.
run(env::AbstractEnvironment, until::AbstractEvent) → Any
step function until the until event has been triggered and will return its value.
Stops the simulation, optionally providing an alternative return value to the
Environment <: AbstractEnvironment
Execution environment for a simulation. The passing of time is simulated by stepping from event to event.
Environment(initial_time::Float64=0.0) → Environment¶
Environment. An initial_time for the environment can be specified. By default, it starts at
now(env::Environment) → Float64¶
Returns the current simulation time.
active_process(env::Environment) → Process¶
Returns the active process. If no process is active throws a