Commit ba032769 authored by Georgios Dagkakis's avatar Georgios Dagkakis

reading of earliest start made more flexible

parent 4d9d99b5
...@@ -19,6 +19,15 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin): ...@@ -19,6 +19,15 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
data['input']['BOM']['productionOrders']=[] data['input']['BOM']['productionOrders']=[]
node=data['graph']['node'] node=data['graph']['node']
now = strptime(data['general']['currentDate'], '%Y/%m/%d') now = strptime(data['general']['currentDate'], '%Y/%m/%d')
# find the column where the earliest start is given
i=0
for element in projectData[0]:
if element=='Earliest Start Date':
earliestStartColumn=i
break
i+=1
if projectData: if projectData:
alreadyConsideredProjects=[] alreadyConsideredProjects=[]
for row in range(1, len(projectData)): for row in range(1, len(projectData)):
...@@ -46,11 +55,12 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin): ...@@ -46,11 +55,12 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
break break
numberOfOperations+=1 numberOfOperations+=1
i+=1 i+=1
# for every operation get capacityRequirementDict and earliestStartDict # for every operation get capacityRequirementDict and earliestStartDict
for stationRecord in range(numberOfOperations): for stationRecord in range(numberOfOperations):
stationId=projectData[row+stationRecord][4] stationId=projectData[row+stationRecord][4]
requiredCapacity=projectData[row+stationRecord][5] requiredCapacity=projectData[row+stationRecord][5]
earliestStart=projectData[row+stationRecord][6] earliestStart=projectData[row+stationRecord][earliestStartColumn]
capacityRequirementDict[stationId]=float(requiredCapacity) capacityRequirementDict[stationId]=float(requiredCapacity)
if earliestStart: if earliestStart:
earliestStart=strptime(earliestStart, '%Y/%m/%d') earliestStart=strptime(earliestStart, '%Y/%m/%d')
......
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