Commit e9dd5605 authored by Georgios Dagkakis's avatar Georgios Dagkakis

capacity stations to read information on shared resources

parent ff890792
......@@ -39,7 +39,8 @@ class CapacityStation(Queue):
#===========================================================================
# the __init__ method of the CapacityStation
#===========================================================================
def __init__(self, id, name, capacity=float("inf"), intervalCapacity=[], schedulingRule="FIFO", gatherWipStat=False):
def __init__(self, id, name, capacity=float("inf"), intervalCapacity=[], schedulingRule="FIFO", gatherWipStat=False,
sharedResources={}):
Queue.__init__(self, id, name, capacity=capacity)
# a list that holds the capacity (manhours) that is available in each interval
self.intervalCapacity=intervalCapacity
......@@ -47,6 +48,8 @@ class CapacityStation(Queue):
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.isLocked=True
# dict that holds information if station shares workpower with some other station
self.sharedResources=sharedResources
def initialize(self):
Queue.initialize(self)
......
......@@ -804,7 +804,8 @@ def createObjects():
id=element.get('id', 'not found')
name=element.get('name', 'not found')
intervalCapacity=element.get('intervalCapacity', [])
CS=CapacityStation(id,name,intervalCapacity=intervalCapacity)
sharedResources=element.get('sharedResources', {})
CS=CapacityStation(id,name,intervalCapacity=intervalCapacity, sharedResources=sharedResources)
CS.nextIds=getSuccessorList(id)
G.CapacityStationList.append(CS)
G.ObjList.append(CS)
......
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