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

capacityStations to be able to assemble projects partly

parent ddb69fe5
......@@ -36,12 +36,13 @@ class CapacityStationBuffer(Queue):
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def __init__(self, id, name, requireFullProject =False, capacity=float("inf"), isDummy=False,
schedulingRule="FIFO", gatherWipStat=False,**kw):
schedulingRule="FIFO", gatherWipStat=False, notRequiredOperations=[],**kw):
Queue.__init__(self, id, name, capacity=capacity)
self.isLocked=True
self.requireFullProject=requireFullProject # flag that shows if here the whole project is assembled
from dream.simulation.Globals import G
G.CapacityStationBufferList.append(self)
self.notRequiredOperations=notRequiredOperations
def initialize(self):
Queue.initialize(self)
......
......@@ -460,11 +460,25 @@ class CapacityStationController(EventGenerator):
# checks if the given project is all in the buffer
def checkIfProjectAssembledInBuffer(self, project, buffer):
import dream.simulation.Globals as Globals
# find the ids that are in the notRequiredOperations
notRequiredList=[]
if buffer.notRequiredOperations:
for id in buffer.notRequiredOperations:
station=Globals.findObjectById(id)
notRequiredList.append(station.id)
bufferId=station.previous[0].id
notRequiredList.append(bufferId)
exitId=station.next[0].id
notRequiredList.append(exitId)
# loop through all the stations of the system
for object in G.CapacityStationList+G.CapacityStationBufferList+G.CapacityStationExitList:
# skip the given buffer
if object is buffer:
continue
# skip not required operations
if object.id in notRequiredList:
continue
# if there is one entity from the same project which we check somewhere else return false
for entity in object.getActiveObjectQueue():
if entity.capacityProject==project:
......
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