| 1 |
Additional examples |
| 2 |
=================== |
| 3 |
|
| 4 |
The following examples are included in the SimPy source distribution. |
| 5 |
|
| 6 |
Car |
| 7 |
--- |
| 8 |
|
| 9 |
.. index:: example; car |
| 10 |
.. literalinclude:: programs/car.py |
| 11 |
|
| 12 |
Output: |
| 13 |
|
| 14 |
.. literalinclude:: programs/car.out |
| 15 |
|
| 16 |
|
| 17 |
CarT |
| 18 |
---- |
| 19 |
.. index:: example; carT |
| 20 |
.. literalinclude:: programs/carT.py |
| 21 |
|
| 22 |
Output: |
| 23 |
|
| 24 |
.. literalinclude:: programs/carT.out |
| 25 |
|
| 26 |
|
| 27 |
Cars |
| 28 |
---- |
| 29 |
|
| 30 |
.. index:: example; cars |
| 31 |
.. literalinclude:: programs/cars.py |
| 32 |
|
| 33 |
Output: |
| 34 |
|
| 35 |
.. literalinclude:: programs/cars.out |
| 36 |
|
| 37 |
|
| 38 |
CarsT |
| 39 |
----- |
| 40 |
|
| 41 |
.. index:: example; carsT |
| 42 |
.. literalinclude:: programs/carsT.py |
| 43 |
|
| 44 |
Output: |
| 45 |
|
| 46 |
.. literalinclude:: programs/carsT.out |
| 47 |
|
| 48 |
|
| 49 |
Carwash |
| 50 |
------- |
| 51 |
|
| 52 |
.. index:: example; carwash |
| 53 |
.. literalinclude:: programs/carwash.py |
| 54 |
|
| 55 |
Output: |
| 56 |
|
| 57 |
.. literalinclude:: programs/carwash.out |
| 58 |
|
| 59 |
|
| 60 |
Breakdown |
| 61 |
--------- |
| 62 |
|
| 63 |
.. index:: example; breakdown |
| 64 |
.. literalinclude:: programs/breakdown.py |
| 65 |
|
| 66 |
Output: |
| 67 |
|
| 68 |
.. literalinclude:: programs/breakdown.out |
| 69 |
|
| 70 |
|
| 71 |
Firework |
| 72 |
-------- |
| 73 |
|
| 74 |
.. index:: example; firework |
| 75 |
.. literalinclude:: programs/firework.py |
| 76 |
|
| 77 |
Output: |
| 78 |
|
| 79 |
.. literalinclude:: programs/firework.out |
| 80 |
|
| 81 |
|
| 82 |
Levelinventory |
| 83 |
-------------- |
| 84 |
|
| 85 |
.. index:: example; levelinventory |
| 86 |
.. literalinclude:: programs/levelinventory.py |
| 87 |
|
| 88 |
Output: |
| 89 |
|
| 90 |
.. literalinclude:: programs/levelinventory.out |
| 91 |
|
| 92 |
|
| 93 |
Message |
| 94 |
------- |
| 95 |
|
| 96 |
.. index:: example; message |
| 97 |
.. literalinclude:: programs/message.py |
| 98 |
|
| 99 |
Output: |
| 100 |
|
| 101 |
.. literalinclude:: programs/message.out |
| 102 |
|
| 103 |
|
| 104 |
Resource |
| 105 |
-------- |
| 106 |
|
| 107 |
.. index:: example; resource |
| 108 |
.. literalinclude:: programs/resource.py |
| 109 |
|
| 110 |
Output: |
| 111 |
|
| 112 |
.. literalinclude:: programs/resource.out |
| 113 |
|
| 114 |
|
| 115 |
Resource monitor |
| 116 |
---------------- |
| 117 |
|
| 118 |
.. index:: example; resourcemonitor |
| 119 |
.. literalinclude:: programs/resourcemonitor.py |
| 120 |
|
| 121 |
Output: |
| 122 |
|
| 123 |
.. literalinclude:: programs/resourcemonitor.out |
| 124 |
|
| 125 |
|
| 126 |
Shopping |
| 127 |
-------- |
| 128 |
|
| 129 |
.. index:: example; shopping |
| 130 |
.. literalinclude:: programs/shopping.py |
| 131 |
|
| 132 |
Output: |
| 133 |
|
| 134 |
.. literalinclude:: programs/shopping.out |
| 135 |
|
| 136 |
|
| 137 |
Storewidget |
| 138 |
----------- |
| 139 |
|
| 140 |
.. index:: example; storewidget |
| 141 |
.. literalinclude:: programs/storewidget.py |
| 142 |
|
| 143 |
Output: |
| 144 |
|
| 145 |
.. literalinclude:: programs/storewidget.out |
| 146 |
|
| 147 |
|