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

enhancements in capacity station objects

parent 1901e681
......@@ -39,21 +39,21 @@ class CapacityStation(Queue):
# the __init__ method of the CapacityStation
#===========================================================================
def __init__(self, id, name, capacity=float("inf"), intervalCapacity=[], schedulingRule="FIFO", gatherWipStat=False):
Queue.__init__(self, id, name, capacity, schedulingRule, gatherWipStat)
Queue.__init__(self, id, name, capacity=capacity)
# a list that holds the capacity (manhours) that is available in each interval
self.intervalCapacity=intervalCapacity
# a list that holds the capacity (manhours) that is available in each interval for the remaining time
self.dailyIntervalCapacity=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
self.isBlocked=True
self.isLocked=True
def initialize(self):
Queue.initialize(self)
self.dailyIntervalCapacity=list(self.intervalCapacity)
self.isBlocked=True
self.remainingIntervalCapacity=list(self.intervalCapacity)
self.isLocked=True
def canAccept(self):
if self.isBlocked:
if self.isLocked:
return False
return Queue.canAccept()
......@@ -36,15 +36,15 @@ class CapacityStationBuffer(Queue):
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def __init__(self, id, name, capacity=float("inf"), isDummy=False, schedulingRule="FIFO", gatherWipStat=False):
Queue.__init__(self, id, name, capacity, isDummy, schedulingRule, gatherWipStat)
self.isBlocked=True
Queue.__init__(self, id, name, capacity=capacity)
self.isLocked=True
def initialize(self):
Queue.initialize(self)
self.isBlocked=True
self.isLocked=True
def canAccept(self):
if self.isBlocked:
if self.isLocked:
return False
return Queue.canAccept()
......@@ -38,15 +38,17 @@ class CapacityStationExit(Exit):
#===========================================================================
# the __init__ method of the CapacityStationExit
#===========================================================================
def __init__(self, id, name=None):
def __init__(self, id, name=None, nextCapacityStationBufferId=None):
Exit.__init__(self, id, name)
self.isBlocked=True
self.isLocked=True
self.nextCapacityStationBufferId=nextCapacityStationBufferId # the id of the next station. If it is None it
# means it is the end of the system.
def initialize(self):
Exit.initialize(self)
self.isBlocked=True
self.isLocked=True
def canAccept(self):
if self.isBlocked:
if self.isLocked:
return False
return Exit.canAccept()
\ 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