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