LineGeneration does check if the finalSimulationTime is equal to the...

LineGeneration does check if the finalSimulationTime is equal to the lastExitTime before deciding whether the simulation produced nothing or not
parent ad3245f3
...@@ -687,9 +687,9 @@ def main(argv=[], input_data=None): ...@@ -687,9 +687,9 @@ def main(argv=[], input_data=None):
endList=[] endList=[]
for exit in G.ExitList: for exit in G.ExitList:
endList.append(exit.timeLastEntityLeft) endList.append(exit.timeLastEntityLeft)
# identify the time of the last event # identify the time of the last event
if float(max(endList))!=0 and G.env.now==float('inf'): #do not let G.maxSimTime=0 so that there will be no crash if float(max(endList))!=0 and (G.env.now==float('inf') or G.env.now == max(endList)): #do not let G.maxSimTime=0 so that there will be no crash
G.maxSimTime=float(max(endList)) G.maxSimTime=float(max(endList))
else: else:
print "simulation ran for 0 time, something may have gone wrong" print "simulation ran for 0 time, something may have gone wrong"
......
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