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
a5260c2f
Commit
a5260c2f
authored
Jan 15, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Jan 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JobShop examples updated to follow new notation
parent
9f334383
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
115 additions
and
15 deletions
+115
-15
dream/simulation/Examples/JobShop1.py
dream/simulation/Examples/JobShop1.py
+9
-1
dream/simulation/Examples/JobShop1Trace.py
dream/simulation/Examples/JobShop1Trace.py
+9
-1
dream/simulation/Examples/JobShop2EDD.py
dream/simulation/Examples/JobShop2EDD.py
+24
-3
dream/simulation/Examples/JobShop2MC.py
dream/simulation/Examples/JobShop2MC.py
+24
-3
dream/simulation/Examples/JobShop2Priority.py
dream/simulation/Examples/JobShop2Priority.py
+24
-3
dream/simulation/Examples/JobShop2RPC.py
dream/simulation/Examples/JobShop2RPC.py
+25
-4
No files found.
dream/simulation/Examples/JobShop1.py
View file @
a5260c2f
...
...
@@ -18,8 +18,16 @@ E=ExitJobShop('E','Exit')
G
.
ObjList
=
[
M1
,
M2
,
M3
,
Q1
,
Q2
,
Q3
,
E
]
#add all the objects in G.ObjList so that they can be easier accessed later
#define the route of the Job in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J
=
Job
(
'J1'
,
'Job1'
,
route
=
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
)
J
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
)
G
.
EntityList
=
[
J
]
#a list to hold all the jobs
initialize
()
#initialize the simulation (SimPy method)
...
...
dream/simulation/Examples/JobShop1Trace.py
View file @
a5260c2f
...
...
@@ -20,8 +20,16 @@ E=ExitJobShop('E','Exit')
G
.
ObjList
=
[
M1
,
M2
,
M3
,
Q1
,
Q2
,
Q3
,
E
]
#add all the objects in G.ObjList so that they can be easier accessed later
#define the route of the Job in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J
=
Job
(
'J1'
,
'Job1'
,
route
=
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
)
J
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
)
G
.
EntityList
=
[
J
]
#a list to hold all the jobs
initialize
()
#initialize the simulation (SimPy method)
...
...
dream/simulation/Examples/JobShop2EDD.py
View file @
a5260c2f
...
...
@@ -25,10 +25,31 @@ M1.defineRouting(predecessorList=[Q1])
M2
.
defineRouting
(
predecessorList
=
[
Q2
])
M3
.
defineRouting
(
predecessorList
=
[
Q3
])
#define the routes of the Jobs in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
J2Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"4"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"6"
}},
{
"stationIdsList"
:
[
"E"
],}]
J3Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"10"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J1
=
Job
(
'J1'
,
'Job1'
,
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
[[
'Q1'
,
0
],[
'M1'
,
2
],[
'Q2'
,
0
],[
'M2'
,
4
],[
'Q3'
,
0
],[
'M3'
,
6
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
[[
'Q1'
,
0
],[
'M1'
,
10
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'E'
,
0
]]
,
priority
=
0
,
dueDate
=
110
)
J1
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
route
=
J2Route
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
route
=
J3Route
,
priority
=
0
,
dueDate
=
110
)
G
.
JobList
=
[
J1
,
J2
,
J3
]
#a list to hold all the jobs
G
.
maxSimTime
=
1440.0
#set G.maxSimTime 1440.0 minutes (1 day)
...
...
dream/simulation/Examples/JobShop2MC.py
View file @
a5260c2f
...
...
@@ -25,10 +25,31 @@ M1.defineRouting(predecessorList=[Q1])
M2
.
defineRouting
(
predecessorList
=
[
Q2
])
M3
.
defineRouting
(
predecessorList
=
[
Q3
])
#define the routes of the Jobs in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
J2Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"4"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"6"
}},
{
"stationIdsList"
:
[
"E"
],}]
J3Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"10"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J1
=
Job
(
'J1'
,
'Job1'
,
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
[[
'Q1'
,
0
],[
'M1'
,
2
],[
'Q2'
,
0
],[
'M2'
,
4
],[
'Q3'
,
0
],[
'M3'
,
6
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
[[
'Q1'
,
0
],[
'M1'
,
10
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'E'
,
0
]]
,
priority
=
0
,
dueDate
=
110
)
J1
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
route
=
J2Route
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
route
=
J3Route
,
priority
=
0
,
dueDate
=
110
)
G
.
JobList
=
[
J1
,
J2
,
J3
]
#a list to hold all the jobs
G
.
maxSimTime
=
1440.0
#set G.maxSimTime 1440.0 minutes (1 day)
...
...
dream/simulation/Examples/JobShop2Priority.py
View file @
a5260c2f
...
...
@@ -25,10 +25,31 @@ M1.defineRouting(predecessorList=[Q1])
M2
.
defineRouting
(
predecessorList
=
[
Q2
])
M3
.
defineRouting
(
predecessorList
=
[
Q3
])
#define the routes of the Jobs in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
J2Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"4"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"6"
}},
{
"stationIdsList"
:
[
"E"
],}]
J3Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"10"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J1
=
Job
(
'J1'
,
'Job1'
,
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
[[
'Q1'
,
0
],[
'M1'
,
2
],[
'Q2'
,
0
],[
'M2'
,
4
],[
'Q3'
,
0
],[
'M3'
,
6
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
[[
'Q1'
,
0
],[
'M1'
,
10
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'E'
,
0
]]
,
priority
=
0
,
dueDate
=
110
)
J1
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
route
=
J2Route
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
route
=
J3Route
,
priority
=
0
,
dueDate
=
110
)
G
.
JobList
=
[
J1
,
J2
,
J3
]
#a list to hold all the jobs
G
.
maxSimTime
=
1440.0
#set G.maxSimTime 1440.0 minutes (1 day)
...
...
dream/simulation/Examples/JobShop2RPC.py
View file @
a5260c2f
...
...
@@ -7,7 +7,7 @@ from simulation.Globals import G
import
simulation.Globals
as
Globals
#define the objects of the model
Q1
=
QueueJobShop
(
'Q1'
,
'Queue1'
,
capacity
=
infinity
,
schedulingRule
=
"
RPC
"
)
Q1
=
QueueJobShop
(
'Q1'
,
'Queue1'
,
capacity
=
infinity
,
schedulingRule
=
"
LPT
"
)
Q2
=
QueueJobShop
(
'Q2'
,
'Queue2'
,
capacity
=
infinity
)
Q3
=
QueueJobShop
(
'Q3'
,
'Queue3'
,
capacity
=
infinity
)
M1
=
MachineJobShop
(
'M1'
,
'Machine1'
)
...
...
@@ -25,10 +25,31 @@ M1.defineRouting(predecessorList=[Q1])
M2
.
defineRouting
(
predecessorList
=
[
Q2
])
M3
.
defineRouting
(
predecessorList
=
[
Q3
])
#define the routes of the Jobs in the system
J1Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"E"
],}]
J2Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}},
{
"stationIdsList"
:
[
"Q2"
]},
{
"stationIdsList"
:
[
"M2"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"4"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"6"
}},
{
"stationIdsList"
:
[
"E"
],}]
J3Route
=
[{
"stationIdsList"
:
[
"Q1"
]},
{
"stationIdsList"
:
[
"M1"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"10"
}},
{
"stationIdsList"
:
[
"Q3"
]},
{
"stationIdsList"
:
[
"M3"
],
"processingTime"
:{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}},
{
"stationIdsList"
:
[
"E"
],}]
#define the Jobs
J1
=
Job
(
'J1'
,
'Job1'
,
[[
'Q1'
,
0
],[
'M1'
,
1
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'Q2'
,
0
],[
'M2'
,
2
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
[[
'Q1'
,
0
],[
'M1'
,
2
],[
'Q2'
,
0
],[
'M2'
,
4
],[
'Q3'
,
0
],[
'M3'
,
6
],[
'E'
,
0
]]
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
[[
'Q1'
,
0
],[
'M1'
,
10
],[
'Q3'
,
0
],[
'M3'
,
3
],[
'E'
,
0
]]
,
priority
=
0
,
dueDate
=
110
)
J1
=
Job
(
'J1'
,
'Job1'
,
route
=
J1Route
,
priority
=
1
,
dueDate
=
100
)
J2
=
Job
(
'J2'
,
'Job2'
,
route
=
J2Route
,
priority
=
1
,
dueDate
=
90
)
J3
=
Job
(
'J3'
,
'Job3'
,
route
=
J3Route
,
priority
=
0
,
dueDate
=
110
)
G
.
JobList
=
[
J1
,
J2
,
J3
]
#a list to hold all the jobs
G
.
maxSimTime
=
1440.0
#set G.maxSimTime 1440.0 minutes (1 day)
...
...
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