Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
4d36a154
Commit
4d36a154
authored
Dec 26, 2014
by
Georgios Dagkakis
Committed by
Ioannis Papagiannopoulos
Jan 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all examples updated
parent
ee94b2aa
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
31 deletions
+31
-31
dream/simulation/Examples/ParallelServers1.py
dream/simulation/Examples/ParallelServers1.py
+4
-4
dream/simulation/Examples/ParallelServers2.py
dream/simulation/Examples/ParallelServers2.py
+4
-4
dream/simulation/Examples/ParallelServers3.py
dream/simulation/Examples/ParallelServers3.py
+4
-4
dream/simulation/Examples/ParallelServers4.py
dream/simulation/Examples/ParallelServers4.py
+4
-4
dream/simulation/Examples/TwoServers.py
dream/simulation/Examples/TwoServers.py
+5
-5
dream/simulation/Examples/TwoServersPlots.py
dream/simulation/Examples/TwoServersPlots.py
+5
-5
dream/simulation/Examples/TwoServersStochastic.py
dream/simulation/Examples/TwoServersStochastic.py
+5
-5
No files found.
dream/simulation/Examples/ParallelServers1.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S'
,
'Source'
,
inter
ArrivalTime
=
{
'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
])
...
...
dream/simulation/Examples/ParallelServers2.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S'
,
'Source'
,
inter
ArrivalTime
=
{
'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
])
...
...
dream/simulation/Examples/ParallelServers3.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S'
,
'Source'
,
inter
ArrivalTime
=
{
'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
...
...
dream/simulation/Examples/ParallelServers4.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S'
,
'Source'
,
inter
ArrivalTime
=
{
'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
...
...
dream/simulation/Examples/TwoServers.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S1'
,
'Source'
,
inter
ArrivalTime
=
{
'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
])
...
...
dream/simulation/Examples/TwoServersPlots.py
View file @
4d36a154
...
@@ -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'
,
inter
arrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
S
=
Source
(
'S1'
,
'Source'
,
inter
ArrivalTime
=
{
'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
])
...
...
dream/simulation/Examples/TwoServersStochastic.py
View file @
4d36a154
...
@@ -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
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment