当前位置: 首页>>代码示例>>Python>>正文


Python Job.__init__方法代码示例

本文整理汇总了Python中Job.Job.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Job.__init__方法的具体用法?Python Job.__init__怎么用?Python Job.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Job.Job的用法示例。


在下文中一共展示了Job.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 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))
开发者ID:Kodextor,项目名称:dream,代码行数:27,代码来源:OrderDesign.py

示例2: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 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)
开发者ID:PanosBarlas,项目名称:dream,代码行数:62,代码来源:OrderDesign.py

示例3: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 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))
开发者ID:PanosBarlas,项目名称:dream,代码行数:28,代码来源:Mould.py

示例4: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
    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
        
开发者ID:mmariani,项目名称:dream,代码行数:31,代码来源:OrderComponent.py

示例5: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
    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))
开发者ID:Kodextor,项目名称:dream,代码行数:28,代码来源:Mould.py

示例6: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 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
开发者ID:Kodextor,项目名称:dream,代码行数:14,代码来源:JobMA.py

示例7: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 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)
开发者ID:PanosBarlas,项目名称:dream,代码行数:46,代码来源:OrderComponent.py

示例8: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
    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
开发者ID:mmariani,项目名称:dream,代码行数:23,代码来源:Mould.py

示例9: __init__

# 需要导入模块: from Job import Job [as 别名]
# 或者: from Job.Job import __init__ [as 别名]
 def __init__(self, name, params):
   Job.__init__(self, name, params)
开发者ID:DarinReid,项目名称:moose,代码行数:4,代码来源:PBSJob.py


注:本文中的Job.Job.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。