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
7a48a008
Commit
7a48a008
authored
Aug 20, 2015
by
panos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bug fixed in the example main script
parent
7ebf3330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
dream/KnowledgeExtraction/KEtool_examples/AssemblyLine/Ass_Line_example.py
...traction/KEtool_examples/AssemblyLine/Ass_Line_example.py
+12
-1
No files found.
dream/KnowledgeExtraction/KEtool_examples/AssemblyLine/Ass_Line_example.py
View file @
7a48a008
...
...
@@ -38,6 +38,9 @@ import xlrd
from
dateutil.parser
import
*
import
datetime
from
time
import
mktime
import
dream.simulation.LineGenerationJSON
as
ManPyMain
# import dream.simulation.LineGenerationCMSD1 as ManPyMain
import
json
#Read from the given directory the Excel document with the input data
workbook
=
xlrd
.
open_workbook
(
'prod_data.xls'
)
...
...
@@ -433,6 +436,14 @@ scrapQuant11=exportCMSD.ScrapQuantity(scrapQuant10, 'P11', dictScrap['PaA'])
scrapQuant11
.
write
(
'CMSD_example_Output.xml'
,
encoding
=
"utf8"
)
data1
=
open
(
'CMSD_example_Output.xml'
,
'r'
)
#Call the JSONOutput object giving as attributes the dictionaries with the processing times distributions and the scrap quantities distributions and the WIP levels in the assembly line
exportJSON
=
JSONOutput
()
exportJSON
.
JSONOutput
(
dictProc
,
dictScrap
,
WIP
)
\ No newline at end of file
data2
=
exportJSON
.
JSONOutput
(
dictProc
,
dictScrap
,
WIP
)
simulationOutput
=
ManPyMain
.
main
(
input_data
=
str
(
data2
))
# simulationOutput=ManPyMain.main(input_data=data1)
# save the simulation output
jsonFile
=
open
(
'ManPyOutput.json'
,
"w"
)
#It opens the JSON file
jsonFile
.
write
(
simulationOutput
)
#It writes the updated data to the JSON file
jsonFile
.
close
()
#It closes the file
\ No newline at end of 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