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
250171ea
Commit
250171ea
authored
Jun 13, 2014
by
panos
Committed by
Jérome Perrin
Jun 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Severals bugs fixed in the ProductionLine example
parent
babdbd38
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/JSON_Output.py
...eExtraction/KEtool_examples/ProductionLine/JSON_Output.py
+1
-1
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/JSON_example.json
...traction/KEtool_examples/ProductionLine/JSON_example.json
+3
-3
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/ProdLine_example.py
...action/KEtool_examples/ProductionLine/ProdLine_example.py
+12
-0
No files found.
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/JSON_Output.py
View file @
250171ea
...
...
@@ -98,7 +98,7 @@ def JSON_example(list1,list2):
jsonFile
=
open
(
'JSON_exampleOutput.json'
,
"w"
)
jsonFile
.
write
(
json
.
dumps
(
data
,
indent
=
True
))
jsonFile
.
close
()
return
json
.
dumps
(
data
,
indent
=
True
)
...
...
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/JSON_example.json
View file @
250171ea
...
...
@@ -43,10 +43,10 @@
"S1"
:
{
"name"
:
"Source"
,
"top"
:
0.9545454545454546
,
"entity"
:
"Batch"
,
"entity"
:
"
Dream.
Batch"
,
"interarrivalTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0.5"
"mean"
:
0.5
},
"batchNumberOfUnits"
:
100
,
"_class"
:
"Dream.BatchSource"
,
...
...
@@ -82,7 +82,7 @@
"QStart"
:
{
"top"
:
0.7727272727272727
,
"_class"
:
"Dream.Queue"
,
"capacity"
:
"
-
1"
,
"capacity"
:
"1"
,
"name"
:
"StartQueue"
,
"left"
:
0.6968085106382979
},
...
...
dream/KnowledgeExtraction/KEtool_examples/ProductionLine/ProdLine_example.py
View file @
250171ea
...
...
@@ -31,6 +31,9 @@ from ExcelOutput import Output
from
ReplaceMissingValues
import
HandleMissingValues
from
ImportExceldata
import
Import_Excel
import
xlrd
import
json
#import ManPy main JSON script
import
dream.simulation.LineGenerationJSON
as
ManPyMain
#================= Main script of KE tool =====================================#
#Read from the given directory the Excel document with the input data
...
...
@@ -115,3 +118,12 @@ D.PrintStatisticalMeasures(P2_Proc, "StatisticalMeasuresResults_P2Proc.xls")
CMSD_example
(
dictProc
,
dictScrap
)
#Print the CMSD document, calling the CMSD_example method with arguments the dictProc and dictScrap dictionaries
JSON_example
(
dictProc
,
dictScrap
)
#Print the JSON file, calling the JSON_example method
#calls ManPy main script with the input
simulationOutput
=
ManPyMain
.
main
(
input_data
=
str
((
JSON_example
(
dictProc
,
dictScrap
))))
# 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