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


Python Machine.priority方法代码示例

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


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

示例1: main

# 需要导入模块: from dream.simulation.imports import Machine [as 别名]
# 或者: from dream.simulation.imports.Machine import priority [as 别名]
        if possibleReceivers[0].canAccept():
            return possibleReceivers[0]
        elif possibleReceivers[1].canAccept():
            return possibleReceivers[1]
        return None
       
#define the objects of the model
S=Source('S','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
Q=SelectiveQueue('Q','Queue', capacity=float("inf"))
M1=Machine('M1','Milling1', processingTime={'Fixed':{'mean':0.25}})
M2=Machine('M2','Milling2', processingTime={'Fixed':{'mean':0.25}})
E=Exit('E1','Exit')  
F=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}})

#create priority attribute in the Machines
M1.priority=10
M2.priority=0

#define predecessors and successors for the objects    
S.defineRouting([Q])
Q.defineRouting([S],[M1,M2])
M1.defineRouting([Q],[E])
M2.defineRouting([Q],[E])
E.defineRouting([M1,M2])

def main(test=0):

    # add all the objects in a list
    objectList=[S,Q,M1,M2,E,F]  
    # set the length of the experiment  
    maxSimTime=1440.0
开发者ID:PanosBarlas,项目名称:dream,代码行数:33,代码来源:ParallelServers3.py

示例2: main

# 需要导入模块: from dream.simulation.imports import Machine [as 别名]
# 或者: from dream.simulation.imports.Machine import priority [as 别名]
        if possibleReceivers[0].canAccept():
            return possibleReceivers[0]
        elif possibleReceivers[1].canAccept():
            return possibleReceivers[1]
        return None
       
#define the objects of the model
S=Source('S','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part')
Q=SelectiveQueue('Q','Queue', capacity=float("inf"))
M1=Machine('M1','Milling1', processingTime={'distributionType':'Fixed','mean':0.25})
M2=Machine('M2','Milling2', processingTime={'distributionType':'Fixed','mean':0.25})
E=Exit('E1','Exit')  
F=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5})

#create priority attribute in the Machines
M1.priority=10
M2.priority=0

#define predecessors and successors for the objects    
S.defineRouting([Q])
Q.defineRouting([S],[M1,M2])
M1.defineRouting([Q],[E])
M2.defineRouting([Q],[E])
E.defineRouting([M1,M2])

def main(test=0):

    # add all the objects in a list
    objectList=[S,Q,M1,M2,E,F]  
    # set the length of the experiment  
    maxSimTime=1440.0
开发者ID:Kodextor,项目名称:dream,代码行数:33,代码来源:ParallelServers3.py


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