Exemple #1
0
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
        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
Exemple #3
0
        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