Commit 250171ea authored by panos's avatar panos Committed by Jérome Perrin

Severals bugs fixed in the ProductionLine example

parent babdbd38
......@@ -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)
......
......@@ -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
},
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment