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
a57ddd23
Commit
a57ddd23
authored
Apr 24, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change in DemandPlanning so that it uses the same globals as the other scripts
parent
14a4753f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
40 deletions
+36
-40
dream/simulation/GUI/DemandPlanning.py
dream/simulation/GUI/DemandPlanning.py
+36
-40
No files found.
dream/simulation/GUI/DemandPlanning.py
View file @
a57ddd23
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
'''
'''
Created on 17 Apr 2014
Created on 17 Apr 2014
@author: George
@author:
Anna,
George
'''
'''
'''
'''
test script to convert the static excels to JSON. It does not communicate with GUI yet
test script to convert the static excels to JSON. It does not communicate with GUI yet
...
@@ -28,50 +28,44 @@ test script to convert the static excels to JSON. It does not communicate with G
...
@@ -28,50 +28,44 @@ test script to convert the static excels to JSON. It does not communicate with G
import
xlwt
import
xlwt
import
xlrd
import
xlrd
import
json
import
json
from
dream
.
simulation
.
Globals
import
G
'''
def
createGlobals
():
Created on 5 Sep 2013
G
.
TargetPPOS
=
0
G
.
TargetPPOSqty
=
0
@author: Anna
G
.
TargetPPOSweek
=
0
'''
G
.
ReplicationNo
=
0
G
.
replication
=
0
class
G
:
G
.
PPOSlist
=
{}
TargetPPOS
=
0
G
.
Capacity
=
[]
TargetPPOSqty
=
0
G
.
route
=
{}
TargetPPOSweek
=
0
G
.
maxEarliness
=
0
# max number of weeks for earliness
ReplicationNo
=
0
G
.
maxLateness
=
0
# max number of weeks for lateness
replication
=
0
G
.
planningHorizon
=
0
# for future demand purposes
PPOSlist
=
{}
G
.
demandFile
=
None
Capacity
=
[]
G
.
currentCapacity
=
None
route
=
{}
G
.
reCapacity
=
[]
maxEarliness
=
0
# max number of weeks for earliness
G
.
PPOSprofile
=
[]
# initial disaggregation for PPOS
maxLateness
=
0
# max number of weeks for lateness
G
.
FutureProfile
=
[]
# initial disaggregation for future demand
planningHorizon
=
0
# for future demand purposes
G
.
AllocationFuture
=
[]
demandFile
=
None
G
.
FutureLateness
=
[]
currentCapacity
=
None
G
.
FutureEarliness
=
[]
reCapacity
=
[]
G
.
AllocationPPOS
=
[]
PPOSprofile
=
[]
# initial disaggregation for PPOS
G
.
PPOSLateness
=
[]
FutureProfile
=
[]
# initial disaggregation for future demand
G
.
PPOSEarliness
=
[]
AllocationFuture
=
[]
G
.
minPackingSize
=
0
FutureLateness
=
[]
G
.
Buffer
=
[]
FutureEarliness
=
[]
G
.
ExcessPPOSBuffer
=
[]
AllocationPPOS
=
[]
G
.
ExcessPPOSminBuffer
=
[]
PPOSLateness
=
[]
G
.
ExcessFutureBuffer
=
[]
PPOSEarliness
=
[]
G
.
ExcessFutureMinBuffer
=
[]
minPackingSize
=
0
G
.
DistributionType
=
None
Buffer
=
[]
G
.
CapacityDict
=
{}
ExcessPPOSBuffer
=
[]
G
.
RouteDict
=
{}
ExcessPPOSminBuffer
=
[]
ExcessFutureBuffer
=
[]
ExcessFutureMinBuffer
=
[]
DistributionType
=
None
CapacityDict
=
{}
RouteDict
=
{}
# filterItem = 0
# filterItem = 0
# filterWeek = 0
# filterWeek = 0
#===================================
#===================================
# import simulation input data
# import simulation input data
#===================================
#===================================
...
@@ -121,6 +115,8 @@ def readGeneralInput():
...
@@ -121,6 +115,8 @@ def readGeneralInput():
G
.
RouteDict
[
id
][
'route'
][
sh
.
cell
(
2
,
j
+
3
).
value
]
=
routeValues
[
j
]
G
.
RouteDict
[
id
][
'route'
][
sh
.
cell
(
2
,
j
+
3
).
value
]
=
routeValues
[
j
]
def
main
():
def
main
():
# set up global variables
createGlobals
()
# read from inputs spreadsheet
# read from inputs spreadsheet
readGeneralInput
()
readGeneralInput
()
# open json file
# open json 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