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
93b606e8
Commit
93b606e8
authored
Mar 02, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port to new version of demand planned
parent
375387dc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
dream/simulation/applications/DemandPlanning/AllocManagement_Hybrid.py
...ion/applications/DemandPlanning/AllocManagement_Hybrid.py
+7
-0
dream/simulation/applications/DemandPlanning/Globals.py
dream/simulation/applications/DemandPlanning/Globals.py
+3
-1
dream/simulation/applications/DemandPlanning/ImportInput.py
dream/simulation/applications/DemandPlanning/ImportInput.py
+6
-3
No files found.
dream/simulation/applications/DemandPlanning/AllocManagement_Hybrid.py
View file @
93b606e8
...
@@ -77,6 +77,9 @@ def AllocManagement_Hybrid2():
...
@@ -77,6 +77,9 @@ def AllocManagement_Hybrid2():
if
week
in
G
.
sortedOrders
[
'order'
][
priority
]:
if
week
in
G
.
sortedOrders
[
'order'
][
priority
]:
print
'order week'
,
week
print
'order week'
,
week
if
G
.
ACO
:
if
G
.
ACO
:
if
G
.
ACOdefault
:
G
.
popSize
=
int
(
0.75
*
len
(
G
.
sortedOrders
[
'order'
][
priority
][
week
])
-
0.75
*
len
(
G
.
sortedOrders
[
'order'
][
priority
][
week
])
%
2
)
G
.
noGen
=
20
*
G
.
popSize
ACOresults
=
Allocation_ACO
(
week
,
G
.
sortedOrders
[
'order'
][
priority
][
week
],
'order'
,
ACOresults
)
ACOresults
=
Allocation_ACO
(
week
,
G
.
sortedOrders
[
'order'
][
priority
][
week
],
'order'
,
ACOresults
)
else
:
else
:
AllocationRoutine2
(
week
,
G
.
sortedOrders
[
'order'
][
priority
][
week
],
'order'
)
AllocationRoutine2
(
week
,
G
.
sortedOrders
[
'order'
][
priority
][
week
],
'order'
)
...
@@ -99,6 +102,10 @@ def AllocManagement_Hybrid2():
...
@@ -99,6 +102,10 @@ def AllocManagement_Hybrid2():
# if GA is required perform order sequence optimisation combined with internal LP optimisation
# if GA is required perform order sequence optimisation combined with internal LP optimisation
if
G
.
GA
:
if
G
.
GA
:
if
G
.
GAdefault
:
G
.
popSizeGA
=
int
(
0.75
*
len
(
G
.
sortedOrders
[
'forecast'
][
priority
][
week
])
-
0.75
*
len
(
G
.
sortedOrders
[
'forecast'
][
priority
][
week
])
%
2
)
G
.
noGenGA
=
20
*
G
.
popSizeGA
GAresults
=
Allocation_GA
(
week
,
itemList
,
'forecast'
,
GAresults
)
GAresults
=
Allocation_GA
(
week
,
itemList
,
'forecast'
,
GAresults
)
# if GA is not require perform allocation with internal LP optimisation
# if GA is not require perform allocation with internal LP optimisation
...
...
dream/simulation/applications/DemandPlanning/Globals.py
View file @
93b606e8
...
@@ -46,13 +46,14 @@ class G:
...
@@ -46,13 +46,14 @@ class G:
Earliness
=
{}
Earliness
=
{}
Lateness
=
{}
Lateness
=
{}
Excess
=
{}
Excess
=
{}
weightFactor
=
[
10.0
,
1.0
,
0
,
2
]
weightFactor
=
[
10.0
,
1.0
,
0
,
2
,
0.5
]
Utilisation
=
{}
Utilisation
=
{}
# ACO parameters
# ACO parameters
ACO
=
1
ACO
=
1
noGen
=
5
noGen
=
5
popSize
=
10
popSize
=
10
ACOdefault
=
0
# GA parameters
# GA parameters
GA
=
0
# suggests whether application of GA to forecast diseggragation is required
GA
=
0
# suggests whether application of GA to forecast diseggragation is required
...
@@ -62,6 +63,7 @@ class G:
...
@@ -62,6 +63,7 @@ class G:
probMutation
=
0.1
probMutation
=
0.1
elitistSelection
=
1
elitistSelection
=
1
terminationGA
=
4
terminationGA
=
4
GAdefault
=
0
# utilisation calculation
# utilisation calculation
minDeltaUt
=
0
minDeltaUt
=
0
...
...
dream/simulation/applications/DemandPlanning/ImportInput.py
View file @
93b606e8
...
@@ -57,6 +57,8 @@ def ImportInput(input, algorithmAttributes):
...
@@ -57,6 +57,8 @@ def ImportInput(input, algorithmAttributes):
# ACO parameters
# ACO parameters
G
.
ACO
=
algorithmAttributes
.
get
(
'ACO'
,
None
)
G
.
ACO
=
algorithmAttributes
.
get
(
'ACO'
,
None
)
G
.
popSize
=
algorithmAttributes
.
get
(
'ACOpopulationSize'
,
None
)
G
.
popSize
=
algorithmAttributes
.
get
(
'ACOpopulationSize'
,
None
)
if
(
not
G
.
popSize
)
and
G
.
ACO
:
G
.
ACOdefault
=
1
G
.
noGen
=
algorithmAttributes
.
get
(
'ACOnumberOfGenerations'
,
None
)
G
.
noGen
=
algorithmAttributes
.
get
(
'ACOnumberOfGenerations'
,
None
)
# optimisation weights for forecast IP method
# optimisation weights for forecast IP method
...
@@ -64,12 +66,13 @@ def ImportInput(input, algorithmAttributes):
...
@@ -64,12 +66,13 @@ def ImportInput(input, algorithmAttributes):
G
.
weightFactor
[
1
]
=
algorithmAttributes
.
get
(
'minUtilisation'
,
None
)
G
.
weightFactor
[
1
]
=
algorithmAttributes
.
get
(
'minUtilisation'
,
None
)
G
.
weightFactor
[
2
]
=
algorithmAttributes
.
get
(
'minDeltaTargetUtilisation'
,
None
)
G
.
weightFactor
[
2
]
=
algorithmAttributes
.
get
(
'minDeltaTargetUtilisation'
,
None
)
G
.
weightFactor
[
3
]
=
algorithmAttributes
.
get
(
'minTargetUtilisation'
,
None
)
G
.
weightFactor
[
3
]
=
algorithmAttributes
.
get
(
'minTargetUtilisation'
,
None
)
G
.
weightFactor
[
4
]
=
algorithmAttributes
.
get
(
'MAProportionality'
,
None
)
# GA parameters
# GA parameters
G
.
GA
=
algorithmAttributes
.
get
(
'GA'
,
None
)
G
.
GA
=
algorithmAttributes
.
get
(
'GA'
,
None
)
G
.
popSizeGA
=
algorithmAttributes
.
get
(
'GApopulationSize'
,
None
)
G
.
popSizeGA
=
algorithmAttributes
.
get
(
'GApopulationSize'
,
None
)
if
(
not
G
.
popSizeGA
)
and
G
.
GA
:
G
.
GAdefault
=
1
G
.
noGenGA
=
algorithmAttributes
.
get
(
'GAnumberOfGenerations'
,
None
)
G
.
noGenGA
=
algorithmAttributes
.
get
(
'GAnumberOfGenerations'
,
None
)
G
.
probXover
=
algorithmAttributes
.
get
(
'XOver'
,
None
)
G
.
probXover
=
algorithmAttributes
.
get
(
'XOver'
,
None
)
G
.
probMutation
=
algorithmAttributes
.
get
(
'mutationProbability'
,
None
)
G
.
probMutation
=
algorithmAttributes
.
get
(
'mutationProbability'
,
None
)
...
...
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