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

correction in new objects canAccept

parent 8ebdc754
......@@ -42,6 +42,7 @@ class CapacityStation(Queue):
Queue.__init__(self, id, name, capacity=capacity)
# a list that holds the capacity (manhours) that is available in each interval
self.intervalCapacity=intervalCapacity
print self.id, intervalCapacity
# a list that holds the capacity (manhours) that is available in each interval for the remaining time
self.remainingIntervalCapacity=list(self.intervalCapacity)
# blocks the entry of the capacity station, so that it can be manipulated to accept only in certain moments of simulation time
......@@ -52,9 +53,9 @@ class CapacityStation(Queue):
self.remainingIntervalCapacity=list(self.intervalCapacity)
self.isLocked=True
def canAccept(self):
def canAccept(self, callerObject=None):
if self.isLocked:
return False
return Queue.canAccept()
return Queue.canAccept(self)
\ No newline at end of file
......@@ -44,7 +44,7 @@ class CapacityStationBuffer(Queue):
Queue.initialize(self)
self.isLocked=True
def canAccept(self):
def canAccept(self, callerObject=None):
if self.isLocked:
return False
return Queue.canAccept()
return Queue.canAccept(self)
......@@ -48,7 +48,7 @@ class CapacityStationExit(Exit):
Exit.initialize(self)
self.isLocked=True
def canAccept(self):
def canAccept(self, callerObject=None):
if self.isLocked:
return False
return Exit.canAccept()
\ No newline at end of file
return Exit.canAccept(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