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
ae851e09
Commit
ae851e09
authored
Jun 05, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'normalizeLastAssignment'
parents
6fd5856b
bd746b47
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
44 deletions
+24
-44
dream/plugins/Batches/BatchesACO.py
dream/plugins/Batches/BatchesACO.py
+12
-4
dream/simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
...simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
+0
-4
dream/simulation/Examples/GUI_models/BatchFullModel.json
dream/simulation/Examples/GUI_models/BatchFullModel.json
+0
-6
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACO.json
...ation/Examples/GUI_models/BatchFullModelOperatorsACO.json
+0
-10
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACOBreaks.json
...Examples/GUI_models/BatchFullModelOperatorsACOBreaks.json
+0
-10
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACOTriangular.json
...ples/GUI_models/BatchFullModelOperatorsACOTriangular.json
+0
-10
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+12
-0
No files found.
dream/plugins/Batches/BatchesACO.py
View file @
ae851e09
...
@@ -35,19 +35,27 @@ class BatchesACO(ACO):
...
@@ -35,19 +35,27 @@ class BatchesACO(ACO):
# of options collated into a dictionary for ease of referencing in ManPy
# of options collated into a dictionary for ease of referencing in ManPy
def
createCollatedScenarios
(
self
,
data
):
def
createCollatedScenarios
(
self
,
data
):
collated
=
dict
()
collated
=
dict
()
# fill sub-line deactivated (default to zero)
collated
[
"4"
]
=
[
0.0
]
weightData
=
data
[
'input'
].
get
(
'ACO_weights_spreadsheet'
,
None
)
weightData
=
data
[
'input'
].
get
(
'ACO_weights_spreadsheet'
,
None
)
for
i
in
range
(
1
,
7
):
for
i
in
range
(
1
,
6
):
# to deactivate fill sub-line the index of 4 is surpassed
if
i
<
4
:
index
=
str
(
i
)
else
:
index
=
str
(
i
+
1
)
minValue
=
weightData
[
1
][
i
]
minValue
=
weightData
[
1
][
i
]
maxValue
=
weightData
[
2
][
i
]
maxValue
=
weightData
[
2
][
i
]
stepValue
=
weightData
[
3
][
i
]
stepValue
=
weightData
[
3
][
i
]
staticValue
=
weightData
[
4
][
i
]
staticValue
=
weightData
[
4
][
i
]
if
staticValue
:
if
staticValue
:
collated
[
str
(
i
)
]
=
[
float
(
staticValue
)]
collated
[
index
]
=
[
float
(
staticValue
)]
else
:
else
:
collated
[
str
(
i
)
]
=
[]
collated
[
index
]
=
[]
value
=
float
(
minValue
)
value
=
float
(
minValue
)
while
1
:
while
1
:
collated
[
str
(
i
)
].
append
(
round
(
float
(
value
),
2
))
collated
[
index
].
append
(
round
(
float
(
value
),
2
))
value
+=
float
(
stepValue
)
value
+=
float
(
stepValue
)
if
value
>
float
(
maxValue
):
if
value
>
float
(
maxValue
):
break
break
...
...
dream/simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
View file @
ae851e09
...
@@ -247,10 +247,6 @@
...
@@ -247,10 +247,6 @@
"name"
:
"Min assignment variations"
,
"name"
:
"Min assignment variations"
,
"type"
:
"string"
"type"
:
"string"
},
},
{
"name"
:
"Fill sub-line"
,
"type"
:
"string"
},
{
{
"name"
:
"Machines with furthest last assignment time"
,
"name"
:
"Machines with furthest last assignment time"
,
"type"
:
"string"
"type"
:
"string"
...
...
dream/simulation/Examples/GUI_models/BatchFullModel.json
View file @
ae851e09
...
@@ -112,10 +112,6 @@
...
@@ -112,10 +112,6 @@
"name"
:
"Min assignment variations"
,
"name"
:
"Min assignment variations"
,
"type"
:
"string"
"type"
:
"string"
},
},
{
"name"
:
"Fill sub-line"
,
"type"
:
"string"
},
{
{
"name"
:
"Machines with furthest last assignment time"
,
"name"
:
"Machines with furthest last assignment time"
,
"type"
:
"string"
"type"
:
"string"
...
@@ -2104,7 +2100,6 @@
...
@@ -2104,7 +2100,6 @@
"Assignment to machines with higher WIPB"
,
"Assignment to machines with higher WIPB"
,
"Uniform assignment across stations"
,
"Uniform assignment across stations"
,
"Min assignment variations"
,
"Min assignment variations"
,
"Fill sub-line"
,
"Machines with furthest last assignment time"
,
"Machines with furthest last assignment time"
,
"Max number of assigned PB"
"Max number of assigned PB"
],
],
...
@@ -2114,7 +2109,6 @@
...
@@ -2114,7 +2109,6 @@
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
null
]
]
],
],
...
...
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACO.json
View file @
ae851e09
...
@@ -112,10 +112,6 @@
...
@@ -112,10 +112,6 @@
"name"
:
"Min assignment variations"
,
"name"
:
"Min assignment variations"
,
"type"
:
"string"
"type"
:
"string"
},
},
{
"name"
:
"Fill sub-line"
,
"type"
:
"string"
},
{
{
"name"
:
"Machines with furthest last assignment time"
,
"name"
:
"Machines with furthest last assignment time"
,
"type"
:
"string"
"type"
:
"string"
...
@@ -2140,7 +2136,6 @@
...
@@ -2140,7 +2136,6 @@
"Assignment to machines with higher WIP"
,
"Assignment to machines with higher WIP"
,
"Uniform assignment across stations"
,
"Uniform assignment across stations"
,
"Min assignment variations"
,
"Min assignment variations"
,
"Fill sub-line"
,
"Machines with furthest last assignment time"
,
"Machines with furthest last assignment time"
,
"Max number of assigned PB"
"Max number of assigned PB"
],
],
...
@@ -2149,7 +2144,6 @@
...
@@ -2149,7 +2144,6 @@
1.5
,
1.5
,
0.5
,
0.5
,
0
,
0
,
1
,
0.5
,
0.5
,
0.5
0.5
],
],
...
@@ -2158,7 +2152,6 @@
...
@@ -2158,7 +2152,6 @@
2.5
,
2.5
,
1.5
,
1.5
,
1
,
1
,
2
,
1.5
,
1.5
,
1.5
1.5
],
],
...
@@ -2168,7 +2161,6 @@
...
@@ -2168,7 +2161,6 @@
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
0.1
],
],
[
[
...
@@ -2176,7 +2168,6 @@
...
@@ -2176,7 +2168,6 @@
"1.6"
,
"1.6"
,
"1.3"
,
"1.3"
,
"0"
,
"0"
,
"1.4"
,
"0.6"
,
"0.6"
,
"0.7"
"0.7"
],
],
...
@@ -2186,7 +2177,6 @@
...
@@ -2186,7 +2177,6 @@
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
null
]
]
],
],
...
...
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACOBreaks.json
View file @
ae851e09
...
@@ -112,10 +112,6 @@
...
@@ -112,10 +112,6 @@
"name"
:
"Min assignment variations"
,
"name"
:
"Min assignment variations"
,
"type"
:
"string"
"type"
:
"string"
},
},
{
"name"
:
"Fill sub-line"
,
"type"
:
"string"
},
{
{
"name"
:
"Machines with furthest last assignment time"
,
"name"
:
"Machines with furthest last assignment time"
,
"type"
:
"string"
"type"
:
"string"
...
@@ -2140,7 +2136,6 @@
...
@@ -2140,7 +2136,6 @@
"Assignment to machines with higher WIP"
,
"Assignment to machines with higher WIP"
,
"Uniform assignment across stations"
,
"Uniform assignment across stations"
,
"Min assignment variations"
,
"Min assignment variations"
,
"Fill sub-line"
,
"Machines with furthest last assignment time"
,
"Machines with furthest last assignment time"
,
"Max number of assigned PB"
"Max number of assigned PB"
],
],
...
@@ -2149,7 +2144,6 @@
...
@@ -2149,7 +2144,6 @@
1.5
,
1.5
,
0.5
,
0.5
,
0
,
0
,
1
,
0.5
,
0.5
,
0.5
0.5
],
],
...
@@ -2158,7 +2152,6 @@
...
@@ -2158,7 +2152,6 @@
2.5
,
2.5
,
1.5
,
1.5
,
1
,
1
,
2
,
1.5
,
1.5
,
1.5
1.5
],
],
...
@@ -2168,7 +2161,6 @@
...
@@ -2168,7 +2161,6 @@
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
0.1
],
],
[
[
...
@@ -2176,7 +2168,6 @@
...
@@ -2176,7 +2168,6 @@
"2.1"
,
"2.1"
,
"1.4"
,
"1.4"
,
"0.0"
,
"0.0"
,
"1.3"
,
"1.0"
,
"1.0"
,
"1.2"
"1.2"
],
],
...
@@ -2186,7 +2177,6 @@
...
@@ -2186,7 +2177,6 @@
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
null
]
]
],
],
...
...
dream/simulation/Examples/GUI_models/BatchFullModelOperatorsACOTriangular.json
View file @
ae851e09
...
@@ -112,10 +112,6 @@
...
@@ -112,10 +112,6 @@
"name"
:
"Min assignment variations"
,
"name"
:
"Min assignment variations"
,
"type"
:
"string"
"type"
:
"string"
},
},
{
"name"
:
"Fill sub-line"
,
"type"
:
"string"
},
{
{
"name"
:
"Machines with furthest last assignment time"
,
"name"
:
"Machines with furthest last assignment time"
,
"type"
:
"string"
"type"
:
"string"
...
@@ -2117,7 +2113,6 @@
...
@@ -2117,7 +2113,6 @@
"Assignment to machines with higher WIP"
,
"Assignment to machines with higher WIP"
,
"Uniform assignment across stations"
,
"Uniform assignment across stations"
,
"Min assignment variations"
,
"Min assignment variations"
,
"Fill sub-line"
,
"Machines with furthest last assignment time"
,
"Machines with furthest last assignment time"
,
"Max number of assigned PB"
"Max number of assigned PB"
],
],
...
@@ -2126,7 +2121,6 @@
...
@@ -2126,7 +2121,6 @@
1.5
,
1.5
,
0.5
,
0.5
,
0
,
0
,
1
,
0.5
,
0.5
,
0.5
0.5
],
],
...
@@ -2135,7 +2129,6 @@
...
@@ -2135,7 +2129,6 @@
2.5
,
2.5
,
1.5
,
1.5
,
1
,
1
,
2
,
1.5
,
1.5
,
1.5
1.5
],
],
...
@@ -2145,7 +2138,6 @@
...
@@ -2145,7 +2138,6 @@
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
,
0.1
0.1
],
],
[
[
...
@@ -2153,7 +2145,6 @@
...
@@ -2153,7 +2145,6 @@
"1.6"
,
"1.6"
,
"1.3"
,
"1.3"
,
"0"
,
"0"
,
"1.4"
,
"0.6"
,
"0.6"
,
"0.7"
"0.7"
],
],
...
@@ -2163,7 +2154,6 @@
...
@@ -2163,7 +2154,6 @@
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
null
]
]
],
],
...
...
dream/simulation/SkilledOperatorRouter.py
View file @
ae851e09
...
@@ -144,12 +144,24 @@ class SkilledRouter(Router):
...
@@ -144,12 +144,24 @@ class SkilledRouter(Router):
# # stations of the line and their corresponding WIP
# # stations of the line and their corresponding WIP
# TODO: the WIP of the stations must be normalised to the max WIP possible on that station
# TODO: the WIP of the stations must be normalised to the max WIP possible on that station
#===================================================================
#===================================================================
# identify the last time that there was an assignment
maxLastAssignment
=
0
for
record
in
self
.
solutionList
:
if
record
:
maxLastAssignment
=
record
[
"time"
]
self
.
availableStationsDict
=
{}
self
.
availableStationsDict
=
{}
for
station
in
self
.
availableStations
:
for
station
in
self
.
availableStations
:
lastAssignmentTime
=
0
lastAssignmentTime
=
0
for
record
in
self
.
solutionList
:
for
record
in
self
.
solutionList
:
if
station
.
id
in
record
[
"allocation"
].
values
():
if
station
.
id
in
record
[
"allocation"
].
values
():
lastAssignmentTime
=
record
[
"time"
]
lastAssignmentTime
=
record
[
"time"
]
# normalise the lastAssignmentTime based on the maxLastAssignment.
if
maxLastAssignment
:
lastAssignmentTime
=
1.0
-
float
(
lastAssignmentTime
/
float
(
maxLastAssignment
))
# it there is definition of 'technology' to group machines add this
# it there is definition of 'technology' to group machines add this
if
station
.
technology
:
if
station
.
technology
:
self
.
availableStationsDict
[
str
(
station
.
id
)]
=
{
'stationID'
:
station
.
technology
,
'machineID'
:
station
.
id
,
self
.
availableStationsDict
[
str
(
station
.
id
)]
=
{
'stationID'
:
station
.
technology
,
'machineID'
:
station
.
id
,
...
...
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