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
6145eaf1
Commit
6145eaf1
authored
Sep 09, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DemandPlanning: Use KE for demand profile xlsx
parent
d7fcb763
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
dream/simulation/Examples/DemandProfile.xlsx
dream/simulation/Examples/DemandProfile.xlsx
+0
-0
dream/simulation/FutureDemandCreator.py
dream/simulation/FutureDemandCreator.py
+5
-2
dream/simulation/GUI/DemandPlanning.py
dream/simulation/GUI/DemandPlanning.py
+11
-11
No files found.
dream/simulation/
GUI
/DemandProfile.xlsx
→
dream/simulation/
Examples
/DemandProfile.xlsx
View file @
6145eaf1
File moved
dream/simulation/FutureDemandCreator.py
View file @
6145eaf1
...
@@ -27,6 +27,8 @@ module that creates the future demand and appends it to buffers
...
@@ -27,6 +27,8 @@ module that creates the future demand and appends it to buffers
import
xlrd
import
xlrd
import
json
import
json
import
urllib
from
Globals
import
G
from
Globals
import
G
from
JobMA
import
JobMA
from
JobMA
import
JobMA
...
@@ -53,8 +55,9 @@ class FutureDemandCreator():
...
@@ -53,8 +55,9 @@ class FutureDemandCreator():
# PPOS initial disaggregation profile
# PPOS initial disaggregation profile
G
.
demandFile
=
(
'/home/jerome/src/dream/dream/simulation/GUI/DemandProfile.xlsx'
)
# XXX this issue arbitrary requests
wbin
=
xlrd
.
open_workbook
(
G
.
demandFile
)
demand_data
=
urllib
.
urlopen
(
G
.
demandFile
).
read
()
wbin
=
xlrd
.
open_workbook
(
file_contents
=
demand_data
)
MAData
=
G
.
RouteDict
MAData
=
G
.
RouteDict
for
k
in
range
(
2
):
for
k
in
range
(
2
):
...
...
dream/simulation/GUI/DemandPlanning.py
View file @
6145eaf1
...
@@ -26,7 +26,6 @@ test script to convert the static excels to JSON. It does not communicate with G
...
@@ -26,7 +26,6 @@ test script to convert the static excels to JSON. It does not communicate with G
'''
'''
import
xlwt
import
xlwt
import
xlrd
import
json
import
json
from
dream.simulation.AllocationManagement
import
AllocationManagement
from
dream.simulation.AllocationManagement
import
AllocationManagement
from
dream.simulation.LineGenerationJSON
import
main
as
simulate_line_json
from
dream.simulation.LineGenerationJSON
import
main
as
simulate_line_json
...
@@ -137,8 +136,6 @@ def readGeneralInput(data):
...
@@ -137,8 +136,6 @@ def readGeneralInput(data):
def
writeOutput
():
def
writeOutput
():
wbin
=
xlwt
.
Workbook
()
wbin
=
xlwt
.
Workbook
()
for
k
in
range
(
G
.
ReplicationNo
):
for
k
in
range
(
G
.
ReplicationNo
):
#export info on lateness
#export info on lateness
sheet1
=
wbin
.
add_sheet
(
'Lateness'
+
str
(
k
+
1
))
sheet1
=
wbin
.
add_sheet
(
'Lateness'
+
str
(
k
+
1
))
sheet1
.
write
(
0
,
0
,
'replication'
)
sheet1
.
write
(
0
,
0
,
'replication'
)
...
@@ -180,7 +177,6 @@ def writeOutput():
...
@@ -180,7 +177,6 @@ def writeOutput():
profile
=
G
.
FutureProfile
[
k
]
profile
=
G
.
FutureProfile
[
k
]
alloc
=
G
.
AllocationFuture
[
k
]
alloc
=
G
.
AllocationFuture
[
k
]
sheet
=
wbin
.
add_sheet
(
shName
)
sheet
=
wbin
.
add_sheet
(
shName
)
sheet
.
write_merge
(
0
,
0
,
0
,
4
,
itemName
)
sheet
.
write_merge
(
0
,
0
,
0
,
4
,
itemName
)
sheet
.
write
(
1
,
0
,
'Order ID'
)
sheet
.
write
(
1
,
0
,
'Order ID'
)
...
@@ -345,6 +341,9 @@ class Simulation(DefaultSimulation):
...
@@ -345,6 +341,9 @@ class Simulation(DefaultSimulation):
"_class"
:
"Dream.Property"
,
"_class"
:
"Dream.Property"
,
"_default"
:
10
"_default"
:
10
})
})
prop_list
.
append
(
overloaded_property
(
schema
[
'ke_url'
],
{
'_default'
:
'http://git.erp5.org/gitweb/dream.git/blob_plain/HEAD:/dream/simulation/Examples/DemandProfile.xlsx'
}))
return
conf
return
conf
def
run
(
self
,
data
):
def
run
(
self
,
data
):
...
@@ -389,6 +388,7 @@ class Simulation(DefaultSimulation):
...
@@ -389,6 +388,7 @@ class Simulation(DefaultSimulation):
inputDict
[
'nodes'
][
'AM'
][
'argumentDict'
][
'MAList'
]
=
IG
.
RouteDict
inputDict
[
'nodes'
][
'AM'
][
'argumentDict'
][
'MAList'
]
=
IG
.
RouteDict
G
.
argumentDictString
=
json
.
dumps
(
inputDict
,
indent
=
5
)
G
.
argumentDictString
=
json
.
dumps
(
inputDict
,
indent
=
5
)
G
.
demandFile
=
data
[
'general'
][
'ke_url'
]
out
=
json
.
loads
(
simulate_line_json
(
input_data
=
(
G
.
argumentDictString
)))
out
=
json
.
loads
(
simulate_line_json
(
input_data
=
(
G
.
argumentDictString
)))
...
...
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