-
Resouce Facilities
-
Resources
- Resources have one or more identical resources units, for example, gas station with gas pumps
- Entities may hold and release the resouce units
-
Levels
- Levels model the supply and consumption of a homogeneous undifferentiated “material”, for example, gas tank with gas
- A Level holds a non-negative number.
- Entities can decrease or increase the non-negative number held by the Level.
-
Stores
- Stores model the production and consumption of distinguishable items, for example, spare parts inventory with spare parts
- A Store holds a list of items of any types
- Entities can insert or remove items from the list
-
SimPy Program
-
Import
- from SimPy.Simulation import *
- from SimPy.SimulationTrace import *
-
Initialize global simulation variables and sets the software clock to 0.0
- initialize()
- Create and activate entities
-
Simulation Execution
- simulate(until=endtime)
-
Simulation termination
- no more events
- endtime is reached
- stopSimulation( )
-
Entities
- Entities are objects of user defined class, for example, automobile
- Each entity has a standard method, Process Execution Method (PEM).
- Activity of an entity may be delayed, interrupted or interact with other entities
-
Monitors
- Monitors record simulation events
- Monitors compile summary statistics
- Simple averages and variances, time-weighted averages, or histograms
-
Processes
- Active entities
- inherited from SimPy's process class
-
Similation Time
- A software clock
- now()