Commit 6d879bf5 authored by panos's avatar panos

Scripts are modified

parent d5112e95
......@@ -14,6 +14,9 @@ class JobShopKE(plugin.InputPreparationPlugin):
def preprocess(self, data):
from dream.KnowledgeExtraction.PilotCases.JobShop.DataExtraction import DataExtraction
receivedData = DataExtraction("C:\Users\Panos\Documents\DB_Approach\JobShop")
outputJSONString=json.dumps(receivedData, indent=True)
outputJSONFile=open('dataFromSQL.json', mode='w')
outputJSONFile.write(outputJSONString)
data['input']['BOM'] = receivedData
return data
......@@ -51,7 +51,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
self.data = data
orders = data["input"].get("BOM",{}).get("productionOrders",{})
try:
stations = data["input"]["BOM"]['stations']
stations = data["input"]["BOM"]['stations1']
except:
stations = self.getStationNames()
nodes = data["graph"]["node"]
......@@ -66,6 +66,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
step["technology"] = technology
technologyStations = []
for station in stations:
station = station.replace(" ", "").split("-")[0]
for initials in self.getStationInitials(technology):
if station.startswith(initials)\
and data["graph"]["node"][station]["_class"] in self.STATION_CLASS_SET:
......
......@@ -160,7 +160,8 @@ class PluginRegistry(object):
outputJSONString=json.dumps(data, indent=5)
outputJSONFile=open('sentToManPy.json', mode='w')
outputJSONFile.write(outputJSONString)
data = self.execution_plugin.run(data)
for output_preparation in self.output_preparation_list:
......
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