1 """
2 This file provides a global Simulation object and the global simulation methods
3 used by SimPy up to version 1.9.1.
4 """
5
6
7
8 global sim
9 sim = None
10
13
16
20
22 """Returns string with eventlist as;
23 t1: processname, processname2
24 t2: processname4, processname5, . . .
25 . . . .
26 """
27 return sim.allEventNotices()
28
30 """Returns list of all times for which events are scheduled.
31 """
32 return sim.allEventTimes()
33
35 """Starts data collection of all designated Monitor and Tally objects
36 (default = all) at time 'when'.
37 """
38 sim.startCollection( when = when, monitors = monitors, tallies = tallies)
39
41 """Application function to start stepping through simulation for waituntil
42 construct."""
43 sim._startWUStepping()
44
46 """Application function to stop stepping through simulation."""
47 sim._stopWUStepping()
48
49 -def activate(obj, process, at = 'undefined', delay = 'undefined',
50 prior = False):
51 """Application function to activate passive process."""
52 sim.activate(obj, process, at = at, delay = delay, prior = prior)
53
54 -def reactivate(obj, at = 'undefined', delay = 'undefined', prior = False):
55 """Application function to reactivate a process which is active,
56 suspended or passive."""
57 sim.reactivate(obj, at = at, delay = delay, prior = prior)
58
61