Commit 6cb3b1d2 authored by Georgios Dagkakis's avatar Georgios Dagkakis

corrections in CapacityStationsPlugins

parent a33cf331
......@@ -15,7 +15,8 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
def preprocess(self, data):
strptime = datetime.datetime.strptime
projectData=data['input'].get('projects_spreadsheet', None)
data['input']['BOM']={} # Put the projects in BOM. Discuss this!
data['input']['BOM']={}
data['input']['BOM']['productionOrders']=[]
node=data['graph']['node']
now = strptime(data['general']['currentDate'], '%Y/%m/%d')
if projectData:
......@@ -52,13 +53,16 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
earliestStart=strptime(earliestStart, '%Y/%m/%d')
earliestStartDict[stationId]=(earliestStart-now).days
# define the order in BOM
data['input']['BOM'][projectId]={
data['input']['BOM']['productionOrders'].append({
'orderDate':orderDate,
'dueDate':dueDate,
'assemblySpaceRequirement':assemblySpaceRequirement,
'capacityRequirementDict':capacityRequirementDict,
'earliestStartDict':earliestStartDict
}
'earliestStartDict':earliestStartDict,
'id':projectId,
'name':projectId,
'_class':"dream.simulation.applications.CapacityStations.CapacityProject.CapacityProject"
})
return data
\ No newline at end of file
......@@ -48,7 +48,7 @@ class CapacityStationWIPSpreadsheet(plugin.InputPreparationPlugin):
buffer=self.getBuffer(data, stationId)
data['graph']['node'][buffer]['wip'].append({
"_class": "dream.simulation.applications.CapacityStations.CapacityEntity.CapacityEntity",
"requiredCapacity": requiredCapacity,
"requiredCapacity": float(requiredCapacity),
"capacityProjectId": projectId,
"name": projectId+'_'+stationId+'_'+str(requiredCapacity)
})
......
......@@ -51,6 +51,17 @@ class CreateCapacityStations(plugin.InputPreparationPlugin):
"data": {},
"_class": "Dream.Edge"
}
# add also a CapacityStationController
# XXX some of the attributes should be inputted by the user
data['graph']['node']['CSC']={
"dueDateThreshold": 14,
"name": "CSC",
"prioritizeIfCanFinish": 1,
"interval": "1",
"start": "0",
"interruptions": {},
"_class": "dream.simulation.applications.CapacityStations.CapacityStationController.CapacityStationController"
}
return data
# gets the data and the stationId
......
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