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): ...@@ -98,7 +98,7 @@ def JSON_example(list1,list2):
jsonFile = open('JSON_exampleOutput.json',"w") jsonFile = open('JSON_exampleOutput.json',"w")
jsonFile.write(json.dumps(data, indent=True)) jsonFile.write(json.dumps(data, indent=True))
jsonFile.close() jsonFile.close()
return json.dumps(data, indent=True)
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
"S1": { "S1": {
"name": "Source", "name": "Source",
"top": 0.9545454545454546, "top": 0.9545454545454546,
"entity": "Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"batchNumberOfUnits": 100, "batchNumberOfUnits": 100,
"_class": "Dream.BatchSource", "_class": "Dream.BatchSource",
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
"QStart": { "QStart": {
"top": 0.7727272727272727, "top": 0.7727272727272727,
"_class": "Dream.Queue", "_class": "Dream.Queue",
"capacity": "-1", "capacity": "1",
"name": "StartQueue", "name": "StartQueue",
"left": 0.6968085106382979 "left": 0.6968085106382979
}, },
......
...@@ -31,6 +31,9 @@ from ExcelOutput import Output ...@@ -31,6 +31,9 @@ from ExcelOutput import Output
from ReplaceMissingValues import HandleMissingValues from ReplaceMissingValues import HandleMissingValues
from ImportExceldata import Import_Excel from ImportExceldata import Import_Excel
import xlrd import xlrd
import json
#import ManPy main JSON script
import dream.simulation.LineGenerationJSON as ManPyMain
#================= Main script of KE tool =====================================# #================= Main script of KE tool =====================================#
#Read from the given directory the Excel document with the input data #Read from the given directory the Excel document with the input data
...@@ -115,3 +118,12 @@ D.PrintStatisticalMeasures(P2_Proc, "StatisticalMeasuresResults_P2Proc.xls") ...@@ -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 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 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