Commit d2c72827 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

CapacityStationExit only to output if it is the final one

parent 4de3d13e
...@@ -44,7 +44,7 @@ class CapacityStationExit(Exit): ...@@ -44,7 +44,7 @@ class CapacityStationExit(Exit):
self.nextCapacityStationBufferId=nextCapacityStationBufferId # the id of the next station. If it is None it self.nextCapacityStationBufferId=nextCapacityStationBufferId # the id of the next station. If it is None it
# means it is the end of the system. # means it is the end of the system.
self.nextCapacityStationBuffer=None # the next buffer. If it is None it self.nextCapacityStationBuffer=None # the next buffer. If it is None it
# means it is the end of the system. # means it is the end of the system.
def initialize(self): def initialize(self):
Exit.initialize(self) Exit.initialize(self)
self.isLocked=True self.isLocked=True
...@@ -63,4 +63,13 @@ class CapacityStationExit(Exit): ...@@ -63,4 +63,13 @@ class CapacityStationExit(Exit):
def canAccept(self, callerObject=None): def canAccept(self, callerObject=None):
if self.isLocked: if self.isLocked:
return False return False
return Exit.canAccept(self) return Exit.canAccept(self)
\ No newline at end of file
# =======================================================================
# outputs results to JSON File
# =======================================================================
def outputResultsJSON(self):
# output results only for the last exit
if not self.nextCapacityStationBuffer:
Exit.outputResultsJSON(self)
\ No newline at end of file
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