Commit 2ea72087 authored by Georgios Dagkakis's avatar Georgios Dagkakis

change in jsonReader of Frozen Simulation

parent 0e701ab8
...@@ -95,7 +95,10 @@ def importInput(jInput, excelInput, algorithmAttributes): ...@@ -95,7 +95,10 @@ def importInput(jInput, excelInput, algorithmAttributes):
selSol = 0 selSol = 0
if 'reference_solution' in dataJSON['input']: if 'reference_solution' in dataJSON['input']:
selSol = dataJSON['input']['reference_solution'] try:
selSol = int(dataJSON['input']['reference_solution'])
except:
selSol = 0
schedule = dataJSON['result']['result_list'][selSol]['component_schedule'] schedule = dataJSON['result']['result_list'][selSol]['component_schedule']
...@@ -197,7 +200,7 @@ def importInput(jInput, excelInput, algorithmAttributes): ...@@ -197,7 +200,7 @@ def importInput(jInput, excelInput, algorithmAttributes):
'project':current, 'part':WorkPlan.cell_value(i,2)}) #'personnel':str(WorkPlan.cell_value(i,10)), 'sequence':WorkPlan.cell_value(i,9), 'project':current, 'part':WorkPlan.cell_value(i,2)}) #'personnel':str(WorkPlan.cell_value(i,10)), 'sequence':WorkPlan.cell_value(i,9),
seqPrjDone[current].setdefault(WorkPlan.cell_value(i,2),0) seqPrjDone[current].setdefault(WorkPlan.cell_value(i,2),0)
maxODate = max(OrderDates.iteritems(), key=itemgetter(1))[1] maxODate = min(OrderDates.iteritems(), key=itemgetter(1))[1]
#================================== #==================================
# Import shift data from json file # Import shift data from json file
...@@ -307,7 +310,7 @@ def importInput(jInput, excelInput, algorithmAttributes): ...@@ -307,7 +310,7 @@ def importInput(jInput, excelInput, algorithmAttributes):
PMPool.setdefault(sk,[]).append(PMskills[item][0]) PMPool.setdefault(sk,[]).append(PMskills[item][0])
# set start simulation date as maximum betweeen the current date (json) and the order date # set start simulation date as maximum betweeen the current date (json) and the order date
G.xlreftime = max(startSimDate,maxODate,startUserDate) G.xlreftime = max(maxODate,startUserDate) #startSimDate,
shiftRes = {} shiftRes = {}
resAvailability = {} resAvailability = {}
......
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