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
55468748
Commit
55468748
authored
Jan 15, 2014
by
Ioannis Papagiannopoulos
Committed by
Jérome Perrin
Jan 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Topology38 added - introduces multiple station options for the steps of the route-Job
parent
9bf2a5a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
527 additions
and
4 deletions
+527
-4
dream/simulation/JSONInputs/Topology38.json
dream/simulation/JSONInputs/Topology38.json
+214
-0
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+3
-2
dream/simulation/QueueJobShop.py
dream/simulation/QueueJobShop.py
+3
-2
dream/tests/dump/Topology38.json.result
dream/tests/dump/Topology38.json.result
+307
-0
No files found.
dream/simulation/JSONInputs/Topology38.json
0 → 100644
View file @
55468748
{
"_class"
:
"Dream.Simulation"
,
"edges"
:
{},
"general"
:
{
"_class"
:
"Dream.Configuration"
,
"numberOfReplications"
:
"1"
,
"maxSimTime"
:
"-1"
,
"trace"
:
"Yes"
,
"confidenceLevel"
:
"0.95"
},
"nodes"
:
{
"M1"
:
{
"_class"
:
"Dream.MachineJobShop"
,
"name"
:
"Machine1"
},
"M2"
:
{
"_class"
:
"Dream.MachineJobShop"
,
"name"
:
"Machine2"
},
"M3"
:
{
"_class"
:
"Dream.MachineJobShop"
,
"name"
:
"Machine3"
},
"M4"
:
{
"_class"
:
"Dream.MachineJobShop"
,
"name"
:
"Machine4"
},
"M5"
:
{
"_class"
:
"Dream.MachineJobShop"
,
"name"
:
"Machine5"
},
"Q1"
:
{
"_class"
:
"Dream.QueueJobShop"
,
"name"
:
"Queue1"
,
"isDummy"
:
"0"
,
"capacity"
:
"1000"
,
"wip"
:
[
{
"id"
:
"J1"
,
"_class"
:
"Dream.Job"
,
"name"
:
"Job1"
,
"route"
:
[
{
"stepNumber"
:
"0"
,
"stationIdsList"
:
[
"Q1"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"1"
,
"stationIdsList"
:
[
"M1"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}
},
{
"stepNumber"
:
"2"
,
"stationIdsList"
:
[
"Q3"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"3"
,
"stationIdsList"
:
[
"M3"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}
},
{
"stepNumber"
:
"4"
,
"stationIdsList"
:
[
"Q2"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"5"
,
"stationIdsList"
:
[
"M2"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
}
},
{
"stepNumber"
:
"6"
,
"stationIdsList"
:
[
"E1"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
}
]
}
]
},
"Q2"
:
{
"_class"
:
"Dream.QueueJobShop"
,
"id"
:
"Q2"
,
"name"
:
"Queue2"
,
"isDummy"
:
"0"
,
"capacity"
:
"1000"
,
"wip"
:
[
{
"id"
:
"J2"
,
"_class"
:
"Dream.Job"
,
"name"
:
"Job2"
,
"route"
:
[
{
"stepNumber"
:
"0"
,
"stationIdsList"
:
[
"Q2"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"1"
,
"stationIdsList"
:
[
"M2"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
}
},
{
"stepNumber"
:
"2"
,
"stationIdsList"
:
[
"Q3"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"3"
,
"stationIdsList"
:
[
"M3"
,
"M4"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
}
},
{
"stepNumber"
:
"4"
,
"stationIdsList"
:
[
"Q2"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
},
{
"stepNumber"
:
"5"
,
"stationIdsList"
:
[
"M2"
,
"M5"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"7"
}
},
{
"stepNumber"
:
"6"
,
"stationIdsList"
:
[
"E1"
],
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0"
}
}
]
}
]
},
"Q3"
:
{
"_class"
:
"Dream.QueueJobShop"
,
"name"
:
"Queue3"
,
"isDummy"
:
"0"
,
"capacity"
:
"1000"
},
"E1"
:
{
"_class"
:
"Dream.ExitJobShop"
,
"name"
:
"Exit"
}
}
}
\ No newline at end of file
dream/simulation/MachineJobShop.py
View file @
55468748
...
@@ -62,7 +62,7 @@ class MachineJobShop(Machine):
...
@@ -62,7 +62,7 @@ class MachineJobShop(Machine):
self
.
next
=
nextObjects
self
.
next
=
nextObjects
# self.next=Globals.findObjectById(activeEntity.remainingRoute[1].get('stationIdsList',[]))
# self.next=Globals.findObjectById(activeEntity.remainingRoute[1].get('stationIdsList',[]))
# self.receiver=Globals.findObjectById(activeEntity.remainingRoute[1][0]) #read the next station
# self.receiver=Globals.findObjectById(activeEntity.remainingRoute[1][0]) #read the next station
activeEntity
.
remainingRoute
.
pop
(
0
)
#remove data from the remaining route of the entity
removedStep
=
activeEntity
.
remainingRoute
.
pop
(
0
)
#remove data from the remaining route of the entity
return
activeEntity
return
activeEntity
# =======================================================================
# =======================================================================
...
@@ -82,7 +82,7 @@ class MachineJobShop(Machine):
...
@@ -82,7 +82,7 @@ class MachineJobShop(Machine):
if
len
(
callerObject
.
getActiveObjectQueue
())
>
0
:
if
len
(
callerObject
.
getActiveObjectQueue
())
>
0
:
activeEntity
=
callerObject
.
getActiveObjectQueue
()[
0
]
activeEntity
=
callerObject
.
getActiveObjectQueue
()[
0
]
# if the machine's Id is in the list of the entity's next stations
# if the machine's Id is in the list of the entity's next stations
if
self
.
id
in
activeEntity
.
remainingRoute
[
1
].
get
(
'stationIdsList'
,[]):
if
self
.
id
in
activeEntity
.
remainingRoute
[
0
].
get
(
'stationIdsList'
,[]):
# if activeEntity.remainingRoute[0][0]==self.id:
# if activeEntity.remainingRoute[0][0]==self.id:
return
len
(
self
.
getActiveObjectQueue
())
<
self
.
capacity
#return according to the state of the Queue
return
len
(
self
.
getActiveObjectQueue
())
<
self
.
capacity
#return according to the state of the Queue
return
False
return
False
...
@@ -117,6 +117,7 @@ class MachineJobShop(Machine):
...
@@ -117,6 +117,7 @@ class MachineJobShop(Machine):
maxTimeWaiting
=
timeWaiting
maxTimeWaiting
=
timeWaiting
activeObject
.
receiver
=
object
# set the receiver as the longest waiting possible receiver
activeObject
.
receiver
=
object
# set the receiver as the longest waiting possible receiver
# in the next loops, check the other successors in the previous list
# in the next loops, check the other successors in the previous list
#return True if the Machine in the state of disposing and the caller is the receiver
#return True if the Machine in the state of disposing and the caller is the receiver
return
len
(
activeObjectQueue
)
>
0
\
return
len
(
activeObjectQueue
)
>
0
\
...
...
dream/simulation/QueueJobShop.py
View file @
55468748
...
@@ -54,7 +54,7 @@ class QueueJobShop(Queue):
...
@@ -54,7 +54,7 @@ class QueueJobShop(Queue):
if
len
(
callerObject
.
getActiveObjectQueue
())
>
0
:
if
len
(
callerObject
.
getActiveObjectQueue
())
>
0
:
activeEntity
=
callerObject
.
getActiveObjectQueue
()[
0
]
activeEntity
=
callerObject
.
getActiveObjectQueue
()[
0
]
# check if the object in the active entity's route next step
# check if the object in the active entity's route next step
if
self
.
id
in
activeEntity
.
remainingRoute
[
1
].
get
(
'stationIdsList'
,[]):
if
self
.
id
in
activeEntity
.
remainingRoute
[
0
].
get
(
'stationIdsList'
,[]):
# if activeEntity.remainingRoute[0][0]==self.id:
# if activeEntity.remainingRoute[0][0]==self.id:
return
len
(
self
.
getActiveObjectQueue
())
<
self
.
capacity
#return according to the state of the Queue
return
len
(
self
.
getActiveObjectQueue
())
<
self
.
capacity
#return according to the state of the Queue
return
False
return
False
...
@@ -69,6 +69,7 @@ class QueueJobShop(Queue):
...
@@ -69,6 +69,7 @@ class QueueJobShop(Queue):
activeObjectQueue
=
self
.
getActiveObjectQueue
()
activeObjectQueue
=
self
.
getActiveObjectQueue
()
thecaller
=
callerObject
thecaller
=
callerObject
#if we have only one possible receiver just check if the Queue holds one or more entities
#if we have only one possible receiver just check if the Queue holds one or more entities
if
(
len
(
activeObject
.
next
)
==
1
or
callerObject
==
None
):
if
(
len
(
activeObject
.
next
)
==
1
or
callerObject
==
None
):
activeObject
.
receiver
=
activeObject
.
next
[
0
]
activeObject
.
receiver
=
activeObject
.
next
[
0
]
...
@@ -80,7 +81,7 @@ class QueueJobShop(Queue):
...
@@ -80,7 +81,7 @@ class QueueJobShop(Queue):
maxTimeWaiting
=
0
maxTimeWaiting
=
0
# loop through the object in the successor list
# loop through the object in the successor list
for
object
in
activeObject
.
next
:
for
object
in
activeObject
.
next
:
if
(
object
.
canAccept
()):
# if the object can accept
if
(
object
.
canAccept
(
activeObject
)):
# if the object can accept
timeWaiting
=
now
()
-
object
.
timeLastEntityLeft
# compare the time that it has been waiting
timeWaiting
=
now
()
-
object
.
timeLastEntityLeft
# compare the time that it has been waiting
if
(
timeWaiting
>
maxTimeWaiting
or
maxTimeWaiting
==
0
):
# with the others'
if
(
timeWaiting
>
maxTimeWaiting
or
maxTimeWaiting
==
0
):
# with the others'
maxTimeWaiting
=
timeWaiting
maxTimeWaiting
=
timeWaiting
...
...
dream/tests/dump/Topology38.json.result
0 → 100644
View file @
55468748
{
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"throughput": 2,
"takt_time": 5.5,
"lifespan": 8.5
}
},
{
"extraPropertyDict": {
"route": [
{
"stationIdsList": [
"Q1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "0"
},
{
"stationIdsList": [
"M1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"stepNumber": "1"
},
{
"stationIdsList": [
"Q3"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "2"
},
{
"stationIdsList": [
"M3"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "3"
},
"stepNumber": "3"
},
{
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "4"
},
{
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "2"
},
"stepNumber": "5"
},
{
"stationIdsList": [
"E1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "6"
}
],
"name": "Job1"
},
"_class": "Dream.Job",
"id": "J1",
"results": {
"completionTime": 6.0,
"schedule": [
{
"entranceTime": 0,
"stationId": "Q1",
"stepNumber": 0
},
{
"entranceTime": 0,
"stationId": "M1",
"stepNumber": 1
},
{
"entranceTime": 1.0,
"stationId": "Q3",
"stepNumber": 2
},
{
"entranceTime": 1.0,
"stationId": "M3",
"stepNumber": 3
},
{
"entranceTime": 4.0,
"stationId": "Q2",
"stepNumber": 4
},
{
"entranceTime": 4.0,
"stationId": "M2",
"stepNumber": 5
},
{
"entranceTime": 6.0,
"stationId": "E1",
"stepNumber": 6
}
]
}
},
{
"extraPropertyDict": {
"route": [
{
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "0"
},
{
"stationIdsList": [
"M2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "3"
},
"stepNumber": "1"
},
{
"stationIdsList": [
"Q3"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "2"
},
{
"stationIdsList": [
"M3",
"M4"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"stepNumber": "3"
},
{
"stationIdsList": [
"Q2"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "4"
},
{
"stationIdsList": [
"M2",
"M5"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "7"
},
"stepNumber": "5"
},
{
"stationIdsList": [
"E1"
],
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"stepNumber": "6"
}
],
"name": "Job2"
},
"_class": "Dream.Job",
"id": "J2",
"results": {
"completionTime": 11.0,
"schedule": [
{
"entranceTime": 0,
"stationId": "Q2",
"stepNumber": 0
},
{
"entranceTime": 0,
"stationId": "M2",
"stepNumber": 1
},
{
"entranceTime": 3.0,
"stationId": "Q3",
"stepNumber": 2
},
{
"entranceTime": 3.0,
"stationId": "M4",
"stepNumber": 3
},
{
"entranceTime": 4.0,
"stationId": "Q2",
"stepNumber": 4
},
{
"entranceTime": 4.0,
"stationId": "M5",
"stepNumber": 5
},
{
"entranceTime": 11.0,
"stationId": "E1",
"stepNumber": 6
}
]
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 9.090909090909092,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 90.9090909090909
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 45.45454545454545,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 54.54545454545455
}
},
{
"_class": "Dream.Machine",
"id": "M3",
"results": {
"working_ratio": 27.272727272727273,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 72.72727272727273
}
},
{
"_class": "Dream.Machine",
"id": "M4",
"results": {
"working_ratio": 9.090909090909092,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 90.9090909090909
}
},
{
"_class": "Dream.Machine",
"id": "M5",
"results": {
"working_ratio": 63.63636363636363,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 36.36363636363637
}
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
}
\ No newline at end of file
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