Commit ed6df30c authored by Georgios Dagkakis's avatar Georgios Dagkakis

endSimulation to cancel all future events and reser maxSimTime

parent 0dc8e8bc
......@@ -181,9 +181,14 @@ class ManPyObject(object):
# ======================================================================
@staticmethod
def endSimulation():
# cancel all the scheduled events
from Globals import G
G.env.exit()
from copy import copy
scheduledEvents=copy(G.env._queue)
for scheduledEvent in scheduledEvents:
G.env._queue.remove(scheduledEvent)
G.maxSimTime=G.env.now
# =======================================================================
# checks if there are entities in the system
# ======================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment