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

isAssembly changed to requireFullProject

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