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
7f4afb3c
Commit
7f4afb3c
authored
Feb 25, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demand planning to keep the results for utilization graph
parent
19ecf7d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
dream/plugins/PostProcessDemandPlanning.py
dream/plugins/PostProcessDemandPlanning.py
+4
-0
dream/simulation/applications/DemandPlanning/Globals.py
dream/simulation/applications/DemandPlanning/Globals.py
+1
-0
dream/simulation/applications/DemandPlanning/outputResults.py
...m/simulation/applications/DemandPlanning/outputResults.py
+11
-1
No files found.
dream/plugins/PostProcessDemandPlanning.py
View file @
7f4afb3c
...
...
@@ -14,4 +14,8 @@ class PostProcessDemandPlanning(plugin.OutputPreparationPlugin):
'mime_type'
:
'application/vnd.ms-excel'
,
'data'
:
G
.
reportResults
.
xlsx
.
encode
(
'base64'
)
}
import
json
utilisationString
=
json
.
dumps
(
G
.
Utilisation
,
indent
=
5
)
outputJSONFile
=
open
(
'Utilisation.json'
,
mode
=
'w'
)
outputJSONFile
.
write
(
utilisationString
)
return
data
dream/simulation/applications/DemandPlanning/Globals.py
View file @
7f4afb3c
...
...
@@ -47,6 +47,7 @@ class G:
Lateness
=
{}
Excess
=
{}
weightFactor
=
[
10.0
,
1.0
,
0
,
2
]
Utilisation
=
{}
# ACO parameters
ACO
=
1
...
...
dream/simulation/applications/DemandPlanning/outputResults.py
View file @
7f4afb3c
...
...
@@ -40,7 +40,17 @@ def outputResults():
G
.
CapacityResults
.
append
([
bottleneck
,
'Capa Pegging Resource Capacity (UoM)'
,]
+
initialCap
)
G
.
CapacityResults
.
append
([
''
,
'Capa Pegging Resource Total Load (UoM)'
,]
+
[
G
.
Capacity
[
bottleneck
][
week
][
'OriginalCapacity'
]
-
G
.
CurrentCapacityDict
[
bottleneck
][
week
]
for
week
in
G
.
WeekList
])
G
.
CapacityResults
.
append
([
''
,
'Capa Pegging Resource Total Util (Percent)'
,]
+
[
float
(
G
.
Capacity
[
bottleneck
][
week
][
'OriginalCapacity'
]
-
G
.
CurrentCapacityDict
[
bottleneck
][
week
])
/
G
.
Capacity
[
bottleneck
][
week
][
'OriginalCapacity'
]
*
100
for
week
in
G
.
WeekList
])
# utilisation results
for
bottleneck
in
G
.
Bottlenecks
:
G
.
Utilisation
[
bottleneck
]
=
{}
for
week
in
G
.
WeekList
:
G
.
Utilisation
[
bottleneck
][
week
]
=
{}
G
.
Utilisation
[
bottleneck
][
week
][
'averageUtilization'
]
=
float
(
G
.
Capacity
[
bottleneck
][
week
][
'OriginalCapacity'
]
-
G
.
CurrentCapacityDict
[
bottleneck
][
week
])
/
G
.
Capacity
[
bottleneck
][
week
][
'OriginalCapacity'
]
G
.
Utilisation
[
bottleneck
][
week
][
'minUtilization'
]
=
G
.
Capacity
[
bottleneck
][
week
][
'minUtilisation'
]
G
.
Utilisation
[
bottleneck
][
week
][
'maxUtilization'
]
=
G
.
Capacity
[
bottleneck
][
week
][
'targetUtilisation'
]
# report allocation results
head
=
[
'PPOS'
,
'Demand_Items_Product_DCBNO - SP'
,
'Demand_Items_Product_DCBNO - MA'
,
'Demand_Type - Group'
,
'Priority'
,
'Values'
]
+
G
.
WeekList
G
.
allocationResults
.
headers
=
head
...
...
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