Commit 9d486235 authored by Georgios Dagkakis's avatar Georgios Dagkakis

isAssembly changed to requireFullProject

parent ad7a8801
......@@ -35,10 +35,10 @@ class CapacityStationBuffer(Queue):
#===========================================================================
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def __init__(self, id, name, isAssembly=False, capacity=float("inf"), isDummy=False, schedulingRule="FIFO", gatherWipStat=False):
def __init__(self, id, name, requireFullProject =False, capacity=float("inf"), isDummy=False, schedulingRule="FIFO", gatherWipStat=False):
Queue.__init__(self, id, name, capacity=capacity)
self.isLocked=True
self.isAssembly=isAssembly # flag that shows if here the whole project is assembled
self.requireFullProject=requireFullProject # flag that shows if here the whole project is assembled
def initialize(self):
Queue.initialize(self)
......
......@@ -189,7 +189,7 @@ class CapacityStationController(EventGenerator):
if totalAvailableCapacity<=0:
continue
# if the buffer is not assembly
if not buffer.isAssembly:
if not buffer.requireFullProject:
# calculate the total capacity that is requested
totalRequestedCapacity=0
for entity in buffer.getActiveObjectQueue():
......@@ -274,7 +274,7 @@ class CapacityStationController(EventGenerator):
totalCapacityRequirement=0
# if the buffer acts as assembly there is no need to calculate the total capacity requirement,
# it will be the one that the project has as a total for this station
if buffer.isAssembly:
if buffer.requireFullProject:
totalCapacityRequirement=project.capacityRequirementDict[nextStation.id]
# else calculate the total capacity requirement by adding the one each entity requires
else:
......
......@@ -812,8 +812,8 @@ def createObjects():
elif objClass=='Dream.CapacityStationBuffer':
id=element.get('id', 'not found')
name=element.get('name', 'not found')
isAssembly=bool(element.get('isAssembly', 0))
CB=CapacityStationBuffer(id,name,isAssembly=isAssembly)
requireFullProject=bool(element.get('requireFullProject', 0))
CB=CapacityStationBuffer(id,name,requireFullProject=requireFullProject)
CB.nextIds=getSuccessorList(id)
G.CapacityStationBufferList.append(CB)
G.ObjList.append(CB)
......
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