Commit 4d36a154 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Ioannis Papagiannopoulos

all examples updated

parent ee94b2aa
...@@ -2,12 +2,12 @@ from dream.simulation.imports import Machine, Source, Exit, Part, Queue, Failure ...@@ -2,12 +2,12 @@ from dream.simulation.imports import Machine, Source, Exit, Part, Queue, Failure
from dream.simulation.Globals import runSimulation from dream.simulation.Globals import runSimulation
#define the objects of the model #define the objects of the model
S=Source('S','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
Q=Queue('Q','Queue', capacity=float("inf")) Q=Queue('Q','Queue', capacity=float("inf"))
M1=Machine('M1','Milling1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Machine('M1','Milling1', processingTime={'Fixed':{'mean':0.25}})
M2=Machine('M2','Milling2', processingTime={'distributionType':'Fixed','mean':0.25}) M2=Machine('M2','Milling2', processingTime={'Fixed':{'mean':0.25}})
E=Exit('E1','Exit') E=Exit('E1','Exit')
F=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}) F=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}})
#define predecessors and successors for the objects #define predecessors and successors for the objects
S.defineRouting([Q]) S.defineRouting([Q])
......
...@@ -12,12 +12,12 @@ class SelectiveQueue(Queue): ...@@ -12,12 +12,12 @@ class SelectiveQueue(Queue):
return None return None
#define the objects of the model #define the objects of the model
S=Source('S','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
Q=SelectiveQueue('Q','Queue', capacity=float("inf")) Q=SelectiveQueue('Q','Queue', capacity=float("inf"))
M1=Machine('M1','Milling1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Machine('M1','Milling1', processingTime={'Fixed':{'mean':0.25}})
M2=Machine('M2','Milling2', processingTime={'distributionType':'Fixed','mean':0.25}) M2=Machine('M2','Milling2', processingTime={'Fixed':{'mean':0.25}})
E=Exit('E1','Exit') E=Exit('E1','Exit')
F=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}) F=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}})
#define predecessors and successors for the objects #define predecessors and successors for the objects
S.defineRouting([Q]) S.defineRouting([Q])
......
...@@ -14,12 +14,12 @@ class SelectiveQueue(Queue): ...@@ -14,12 +14,12 @@ class SelectiveQueue(Queue):
return None return None
#define the objects of the model #define the objects of the model
S=Source('S','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
Q=SelectiveQueue('Q','Queue', capacity=float("inf")) Q=SelectiveQueue('Q','Queue', capacity=float("inf"))
M1=Machine('M1','Milling1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Machine('M1','Milling1', processingTime={'Fixed':{'mean':0.25}})
M2=Machine('M2','Milling2', processingTime={'distributionType':'Fixed','mean':0.25}) M2=Machine('M2','Milling2', processingTime={'Fixed':{'mean':0.25}})
E=Exit('E1','Exit') E=Exit('E1','Exit')
F=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}) F=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}})
#create priority attribute in the Machines #create priority attribute in the Machines
M1.priority=10 M1.priority=10
......
...@@ -33,12 +33,12 @@ class CountingExit(Exit): ...@@ -33,12 +33,12 @@ class CountingExit(Exit):
return activeEntity #return the entity obtained return activeEntity #return the entity obtained
#define the objects of the model #define the objects of the model
S=Source('S','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
Q=SelectiveQueue('Q','Queue', capacity=float("inf")) Q=SelectiveQueue('Q','Queue', capacity=float("inf"))
M1=Milling('M1','Milling1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Milling('M1','Milling1', processingTime={'Fixed':{'mean':0.25}})
M2=Milling('M2','Milling2', processingTime={'distributionType':'Fixed','mean':0.25}) M2=Milling('M2','Milling2', processingTime={'Fixed':{'mean':0.25}})
E=CountingExit('E1','Exit') E=CountingExit('E1','Exit')
F=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}) F=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}})
#create the global counter variables #create the global counter variables
G.NumM1=0 G.NumM1=0
......
...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation ...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation
#define the objects of the model #define the objects of the model
R=Repairman('R1', 'Bob') R=Repairman('R1', 'Bob')
S=Source('S1','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S1','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
M1=Machine('M1','Machine1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Machine('M1','Machine1', processingTime={'Fixed':{'mean':0.25}})
Q=Queue('Q1','Queue') Q=Queue('Q1','Queue')
M2=Machine('M2','Machine2', processingTime={'distributionType':'Fixed','mean':1.5}) M2=Machine('M2','Machine2', processingTime={'Fixed':{'mean':1.5}})
E=Exit('E1','Exit') E=Exit('E1','Exit')
#create failures #create failures
F1=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}, repairman=R) F1=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}}, repairman=R)
F2=Failure(victim=M2, distribution={'distributionType':'Fixed','MTTF':40,'MTTR':10}, repairman=R) F2=Failure(victim=M2, distribution={'TTF':{'Fixed':{'mean':40.0}},'TTR':{'Fixed':{'mean':10.0}}}, repairman=R)
#define predecessors and successors for the objects #define predecessors and successors for the objects
S.defineRouting([M1]) S.defineRouting([M1])
......
...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation ...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation
#define the objects of the model #define the objects of the model
R=Repairman('R1', 'Bob') R=Repairman('R1', 'Bob')
S=Source('S1','Source', interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part') S=Source('S1','Source', interArrivalTime={'Fixed':{'mean':0.5}}, entity='Dream.Part')
M1=Machine('M1','Machine1', processingTime={'distributionType':'Fixed','mean':0.25}) M1=Machine('M1','Machine1', processingTime={'Fixed':{'mean':0.25}})
Q=Queue('Q1','Queue') Q=Queue('Q1','Queue')
M2=Machine('M2','Machine2', processingTime={'distributionType':'Fixed','mean':1.5}) M2=Machine('M2','Machine2', processingTime={'Fixed':{'mean':1.5}})
E=Exit('E1','Exit') E=Exit('E1','Exit')
#create failures #create failures
F1=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}, repairman=R) F1=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}}, repairman=R)
F2=Failure(victim=M2, distribution={'distributionType':'Fixed','MTTF':40,'MTTR':10}, repairman=R) F2=Failure(victim=M2, distribution={'TTF':{'Fixed':{'mean':40.0}},'TTR':{'Fixed':{'mean':10.0}}}, repairman=R)
#define predecessors and successors for the objects #define predecessors and successors for the objects
S.defineRouting([M1]) S.defineRouting([M1])
......
...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation ...@@ -3,14 +3,14 @@ from dream.simulation.Globals import runSimulation
#define the objects of the model #define the objects of the model
R=Repairman('R1', 'Bob') R=Repairman('R1', 'Bob')
S=Source('S1','Source', interarrivalTime={'distributionType':'Exp','mean':0.5}, entity='Dream.Part') S=Source('S1','Source', interarrivalTime={'Exp':{'mean':0.5}}, entity='Dream.Part')
M1=Machine('M1','Machine1', processingTime={'distributionType':'Normal','mean':0.25,'stdev':0.1,'min':0.1,'max':1}) M1=Machine('M1','Machine1', processingTime={'Normal':{'mean':0.25,'stdev':0.1,'min':0.1,'max':1}})
M2=Machine('M2','Machine2', processingTime={'distributionType':'Normal','mean':1.5,'stdev':0.3,'min':0.5,'max':5}) M2=Machine('M2','Machine2', processingTime={'Normal':{'mean':1.5,'stdev':0.3,'min':0.5,'max':5}})
Q=Queue('Q1','Queue') Q=Queue('Q1','Queue')
E=Exit('E1','Exit') E=Exit('E1','Exit')
#create failures #create failures
F1=Failure(victim=M1, distribution={'distributionType':'Fixed','MTTF':60,'MTTR':5}, repairman=R) F1=Failure(victim=M1, distribution={'TTF':{'Fixed':{'mean':60.0}},'TTR':{'Fixed':{'mean':5.0}}}, repairman=R)
F2=Failure(victim=M2, distribution={'distributionType':'Fixed','MTTF':40,'MTTR':10}, repairman=R) F2=Failure(victim=M2, distribution={'TTF':{'Fixed':{'mean':40.0}},'TTR':{'Fixed':{'mean':10.0}}}, repairman=R)
#define predecessors and successors for the objects #define predecessors and successors for the objects
S.defineRouting([M1]) S.defineRouting([M1])
......
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