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