Commit dcbb90a6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in the calculation of requirement in a station efter assembly

parent 3acf5514
...@@ -195,6 +195,12 @@ class CapacityStationController(EventGenerator): ...@@ -195,6 +195,12 @@ class CapacityStationController(EventGenerator):
entityCapacity=entity.requiredCapacity entityCapacity=entity.requiredCapacity
previousRequirement=float(project.capacityRequirementDict[previousStation.id]) previousRequirement=float(project.capacityRequirementDict[previousStation.id])
nextRequirement=float(project.capacityRequirementDict[nextStation.id]) nextRequirement=float(project.capacityRequirementDict[nextStation.id])
# if the previous station was assembly then in the next the full project arrives
# so requires whatever the project requires
if previousBuffer.requireFullProject:
nextStationCapacityRequirement=nextRequirement
# else calculate proportionally
else:
proportion=nextRequirement/previousRequirement proportion=nextRequirement/previousRequirement
nextStationCapacityRequirement=proportion*entityCapacity nextStationCapacityRequirement=proportion*entityCapacity
entityToCreateName=entity.capacityProjectId+'_'+nextStation.objName+'_'+str(nextStationCapacityRequirement) entityToCreateName=entity.capacityProjectId+'_'+nextStation.objName+'_'+str(nextStationCapacityRequirement)
......
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