Exemple #1
0
 def __init__(self, id=None, name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=None, 
                 orderDate=None, 
                 extraPropertyDict=None,
                 order=None, 
                 requestingComponent = None, 
                 isCritical=False,
                 **kw):
     Job.__init__(self, id, name, route, priority, dueDate, orderDate, extraPropertyDict, isCritical)
     self.order=order            # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP 
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager=self.order.manager
     # if the componentType of the component is Auxiliary then there need a requesting Component be defined
     # the requestingComponent is the component that needs the auxiliary component during its processing
     # the auxiliary component should then be added to the requestingComponent's auxiliaryList
     self.requestingComponent = requestingComponent  # the id of the requesting component
     # used by printRoute
     if self.order:
         self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
Exemple #2
0
 def __init__(self, id=None, name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=0, 
                 orderDate=0, 
                 extraPropertyDict=None,
                 order=None, 
                 remainingProcessingTime={}, 
                 remainingSetupTime={},
                 currentStation=None,
                 requestingComponent = None, 
                 isCritical=False,
                 **kw):
     Job.__init__(self, id=id, name=name, route=route, priority=priority, dueDate=dueDate, orderDate=orderDate, 
                  extraPropertyDict=extraPropertyDict, isCritical=isCritical, 
                  remainingProcessingTime=remainingProcessingTime, remainingSetupTime=remainingSetupTime,
                  currentStation=currentStation)
     self.order=order            # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP 
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager=self.order.manager
     #=======================================================================
     # if the componentType of the component is Auxiliary then there need a requesting Component be defined
     # the requestingComponent is the component that needs the auxiliary component during its processing
     # the auxiliary component should then be added to the requestingComponent's auxiliaryList
     self.requestingComponent = requestingComponent  # the id of the requesting component
     #=======================================================================
     # used by printRoute
     if self.order:
         self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
         
     route = [x for x in self.route]       #    copy self.route
     #Below it is to assign an order decomposition if it was not assigned in JSON
     #have to talk about it with NEX
     odAssigned=False
     for element in route:
         elementIds = element.get('stationIdsList',[])
         for obj in G.ObjList:
             for elementId in elementIds:
                 if obj.id==elementId and obj.type=='OrderDecomposition':
                     odAssigned=True 
     if not odAssigned:
         odId=None
         for obj in G.ObjList:
             if obj.type=='OrderDecomposition':
                 odId=obj.id
                 break
         if odId:
             route.append({'stationIdsList':[odId],\
                           'processingTime':\
                          {'distributionType':'Fixed',\
                           'mean':'0'}})
         self.route=route
     # add the OrderDesign to the DesignList and the OrderComponentList
     G.OrderComponentList.append(self)
     G.DesignList.append(self)
     G.WipList.append(self)
Exemple #3
0
 def __init__(self,
              id=None,
              name=None,
              route=[],
              priority=0,
              dueDate=0,
              orderDate=0,
              extraPropertyDict=None,
              order=None,
              currentStation=None,
              isCritical=False,
              **kw):
     Job.__init__(self,
                  id,
                  name,
                  route=route,
                  priority=priority,
                  dueDate=dueDate,
                  orderDate=orderDate,
                  extraPropertyDict=extraPropertyDict,
                  isCritical=isCritical,
                  currentStation=currentStation)
     self.order = order  # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager = self.order.manager
     # used by printRoute
     if self.order:
         self.alias = self.order.alias + 'C' + str(len(
             G.OrderComponentList))
Exemple #4
0
    def __init__(self, id=None, name=None, 
                    route=[], 
                    priority=0, 
                    dueDate=None, 
                    orderDate=None, 
                    extraPropertyDict=None,
                    componentType='Basic', 
                    order=None, 
                    requestingComponent = None, 
                    readyForAssembly = 0, 
                    isCritical=False):
        Job.__init__(self, id, name, route, priority, dueDate, orderDate, extraPropertyDict, isCritical)
        self.auxiliaryList=[]       # Holds the auxiliary components that the component needs for a certain processing
        self.order=order            # parent order of the order component
        # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
        #     or create the initiate the parent order not as WIP 
        if self.order:
            # if the order is not None, and the order.manager is given
            if self.order.manager:
                self.manager=self.order.manager
        # TODO: isCritical argument is deprecated
#         self.isCritical=isCritical  # this should be self.order.isCritical. Added now for testing
        self.componentType = componentType  # the type of the component which can be Basic/Secondary/Auxiliary
        # if the componentType of the component is Auxiliary then there need a requesting Component be defined
        # the requestingComponent is the component that needs the auxiliary component during its processing
        # the auxiliary component should then be added to the requestingComponent's auxiliaryList
        self.requestingComponent = requestingComponent  # the id of the requesting component
        self.readyForAssembly = readyForAssembly        # flag informing weather the component was received
                                                        #     by the MouldAssembleBuffer
        
Exemple #5
0
 def __init__(self, id=None, 
              name=None, 
              route=[], 
              priority=0, 
              dueDate=0, 
              orderDate=0, 
              extraPropertyDict=None,
              order=None, 
              remainingProcessingTime={}, 
              remainingSetupTime={},
              currentStation=None,
              isCritical=False,**kw):
     Job.__init__(self, id, name, route=route, priority=priority, dueDate=dueDate, orderDate=orderDate, 
                  extraPropertyDict=extraPropertyDict, isCritical=isCritical,
                  remainingProcessingTime=remainingProcessingTime, remainingSetupTime=remainingSetupTime,
                  currentStation=currentStation)
     self.order=order            # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP 
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager=self.order.manager
     # used by printRoute
     if self.order:
         self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
Exemple #6
0
    def __init__(self, id=None, 
                 name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=0, 
                 orderDate=0, 
                 extraPropertyDict=None,
                 order=None, 
                 currentStation=None,
                 isCritical=False,**kw):
        Job.__init__(self, id, name, route=route, priority=priority, dueDate=dueDate, orderDate=orderDate, 
                     extraPropertyDict=extraPropertyDict, isCritical=isCritical,currentStation=currentStation)
        self.order=order            # parent order of the order component
        # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
        #     or create the initiate the parent order not as WIP 
        if self.order:
            # if the order is not None, and the order.manager is given
            if self.order.manager:
                self.manager=self.order.manager
        # variable to be used by OperatorRouter
        self.hot=False
        # TODO: isCritical argument is deprecated
#         self.isCritical=isCritical  # this should be self.order.isCritical. Added now for testing
        # used by printRoute
        if self.order:
            self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
Exemple #7
0
    def __init__(self, name, age, location, jobTitle):
        Person.__init__(
            self, name, age, location,
            Language("human-human", "italian", "mother tongue",
                     ["communicative", "informative", "educational"]))
        Job.__init__(self, "VDU operator", jobTitle, "Milan Area",
                     ["money", "family well-being", "personal fulfillment"])

        self.hasChildren = True
Exemple #8
0
    def __init__(self,
                 id=None,
                 name=None,
                 route=[],
                 priority=0,
                 dueDate=0,
                 orderDate=0,
                 extraPropertyDict=None,
                 componentType='Basic',
                 order=None,
                 requestingComponent=None,
                 readyForAssembly=0,
                 isCritical=False,
                 remainingProcessingTime={},
                 remainingSetupTime={},
                 currentStation=None,
                 **kw):
        Job.__init__(self,
                     id,
                     name,
                     route=route,
                     priority=priority,
                     dueDate=dueDate,
                     orderDate=orderDate,
                     extraPropertyDict=extraPropertyDict,
                     isCritical=isCritical,
                     remainingProcessingTime=remainingProcessingTime,
                     remainingSetupTime=remainingSetupTime,
                     currentStation=currentStation)
        #=======================================================================
        self.auxiliaryList = [
        ]  # Holds the auxiliary components that the component needs for a certain processing
        #=======================================================================
        self.order = order  # parent order of the order component
        # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
        #     or create the initiate the parent order not as WIP
        if self.order:
            # if the order is not None, and the order.manager is given
            if self.order.manager:
                self.manager = self.order.manager
        self.componentType = componentType  # the type of the component which can be Basic/Secondary/Auxiliary
        #=======================================================================
        # if the componentType of the component is Auxiliary then there need a requesting Component be defined
        # the requestingComponent is the component that needs the auxiliary component during its processing
        # the auxiliary component should then be added to the requestingComponent's auxiliaryList
        self.requestingComponent = requestingComponent  # the id of the requesting component
        #=======================================================================
        self.readyForAssembly = readyForAssembly  # flag informing weather the component was received
        #     by the MouldAssembleBuffer
        # used by printRoute
        if self.order:
            self.alias = self.order.alias + 'C' + str(len(
                G.OrderComponentList))

        G.OrderComponentList.append(self)
        G.WipList.append(self)
 def __init__(self, id=None, name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=0, 
                 orderDate=0, 
                 extraPropertyDict=None,
                 order=None, 
                 requestingComponent = None, 
                 isCritical=False,
                 **kw):
     Job.__init__(self, id=id, name=name, route=route, priority=priority, dueDate=dueDate, orderDate=orderDate, 
                  extraPropertyDict=extraPropertyDict, isCritical=isCritical)
     self.order=order            # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP 
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager=self.order.manager
     #=======================================================================
     # if the componentType of the component is Auxiliary then there need a requesting Component be defined
     # the requestingComponent is the component that needs the auxiliary component during its processing
     # the auxiliary component should then be added to the requestingComponent's auxiliaryList
     self.requestingComponent = requestingComponent  # the id of the requesting component
     #=======================================================================
     # used by printRoute
     if self.order:
         self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
         
     route = [x for x in self.route]       #    copy self.route
     #Below it is to assign an order decomposition if it was not assigned in JSON
     #have to talk about it with NEX
     odAssigned=False
     for element in route:
         elementIds = element.get('stationIdsList',[])
         for obj in G.ObjList:
             for elementId in elementIds:
                 if obj.id==elementId and obj.type=='OrderDecomposition':
                     odAssigned=True 
     if not odAssigned:
         odId=None
         for obj in G.ObjList:
             if obj.type=='OrderDecomposition':
                 odId=obj.id
                 break
         if odId:
             route.append({'stationIdsList':[odId],\
                           'processingTime':\
                          {'distributionType':'Fixed',\
                           'mean':'0'}})
         self.route=route
     # add the OrderDesign to the DesignList and the OrderComponentList
     G.OrderComponentList.append(self)
     G.DesignList.append(self)
     G.WipList.append(self)
Exemple #10
0
 def __init__(self,orderID, MAid, SPid, PPOSid, qty, minQty, origWeek, future):
     Job.__init__(self, id=MAid)
     self.type = 'item'
     self.orderID = orderID
     self.MAid = MAid
     self.SPid = SPid
     self.PPOSid = PPOSid
     self.qty = qty
     self.minQty = minQty
     self.originalWeek = origWeek
     self.future = future        # if 1 suggests that the MA belongs to the future demand (0 for the PPOS to be disaggregated)
     self.weekPlan = self.originalWeek
Exemple #11
0
 def __init__(self, orderID, MAid, SPid, PPOSid, qty, minQty, origWeek,
              future):
     Job.__init__(self, id=MAid)
     self.type = 'item'
     self.orderID = orderID
     self.MAid = MAid
     self.SPid = SPid
     self.PPOSid = PPOSid
     self.qty = qty
     self.minQty = minQty
     self.originalWeek = origWeek
     self.future = future  # if 1 suggests that the MA belongs to the future demand (0 for the PPOS to be disaggregated)
     self.weekPlan = self.originalWeek
Exemple #12
0
    def __init__(self,
                 id=None,
                 name=None,
                 route=[],
                 priority=0,
                 dueDate=None,
                 orderDate=None,
                 isCritical=False,
                 componentsList=[],
                 manager=None,
                 basicsEnded=0,
                 componentsReadyForAssembly=0,
                 extraPropertyDict=None,
                 **kw):
        Job.__init__(self,
                     id=id,
                     name=name,
                     route=route,
                     priority=priority,
                     dueDate=dueDate,
                     orderDate=orderDate,
                     isCritical=isCritical,
                     extraPropertyDict=extraPropertyDict)
        self.componentsList = componentsList  # list of components that the order will be broken into
        self.components = []  # list of all the child components of the order
        self.assemblyComponents = [
        ]  # list of the required components to build the mould
        self.assemblyRequested = False  # flag used to check whether a mould is created out of other orderComponents
        #=======================================================================
        self.basicComponentsList = [
        ]  # list that holds the Basic Components of the order
        self.secondaryComponentsList = [
        ]  # list that holds the Secondary Components of the order
        self.auxiliaryComponentsList = [
        ]  # list of the auxiliary components of the order
        self.basicsEnded = basicsEnded  # flag that informs that the basic components of the order are finished
        self.manager = manager  # the manager responsible to handle the order
        #=======================================================================
        # flag that informs weather the components needed for the assembly are present in the Assembly Buffer
        self.componentsReadyForAssembly = componentsReadyForAssembly

        #         self.decomposed=False
        # used by printRoute
        self.alias = 'O' + str(len(G.OrderList))

        def createRoute(self, route):
            return route
Exemple #13
0
 def __init__(self, id=None, name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=0, 
                 orderDate=0, 
                 extraPropertyDict=None,
                 componentType='Basic', 
                 order=None, 
                 requestingComponent = None, 
                 readyForAssembly = 0, 
                 isCritical=False,
                 remainingProcessingTime={}, 
                 remainingSetupTime={},
                 currentStation=None,
                 **kw):
     Job.__init__(self, id, name, route=route, priority=priority, dueDate=dueDate, 
                  orderDate=orderDate, extraPropertyDict=extraPropertyDict, isCritical=isCritical,
                  remainingProcessingTime=remainingProcessingTime, remainingSetupTime=remainingSetupTime,
                  currentStation=currentStation)
     #=======================================================================
     self.auxiliaryList=[]       # Holds the auxiliary components that the component needs for a certain processing
     #=======================================================================
     self.order=order            # parent order of the order component
     # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
     #     or create the initiate the parent order not as WIP 
     if self.order:
         # if the order is not None, and the order.manager is given
         if self.order.manager:
             self.manager=self.order.manager
     self.componentType = componentType  # the type of the component which can be Basic/Secondary/Auxiliary
     #=======================================================================
     # if the componentType of the component is Auxiliary then there need a requesting Component be defined
     # the requestingComponent is the component that needs the auxiliary component during its processing
     # the auxiliary component should then be added to the requestingComponent's auxiliaryList
     self.requestingComponent = requestingComponent  # the id of the requesting component
     #=======================================================================
     self.readyForAssembly = readyForAssembly        # flag informing weather the component was received
                                                     #     by the MouldAssembleBuffer
     # used by printRoute
     if self.order:
         self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
     
     G.OrderComponentList.append(self)
     G.WipList.append(self)
Exemple #14
0
    def __init__(self, id=None, 
                 name=None, 
                 route=[], 
                 priority=0, 
                 dueDate=None, 
                 orderDate=None, 
                 extraPropertyDict=None,
                 order=None, 
                 isCritical=False):
        Job.__init__(self, id, name, route, priority, dueDate, orderDate, extraPropertyDict, isCritical)
        self.order=order            # parent order of the order component
        # TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
        #     or create the initiate the parent order not as WIP 
        if self.order:
            # if the order is not None, and the order.manager is given
            if self.order.manager:
                self.manager=self.order.manager
        # variable to be used by OperatorRouter
        self.hot=False
        # TODO: isCritical argument is deprecated
#         self.isCritical=isCritical  # this should be self.order.isCritical. Added now for testing
Exemple #15
0
 def __init__(self, name, params):
   Job.__init__(self, name, params)