Commit a7f212e5 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in calculation of EDD

parent 6fe52cdd
......@@ -268,8 +268,14 @@ class CapacityStationController(EventGenerator):
# get the EDD
EDD=float('inf')
for entity in entitiesNotAllocated:
if EDD>entity.capacityProject.dueDate:
EDD=entity.capacityProject.dueDate
entityBuffer=entity.currentStation
entityStation=entity.currentStation.next[0]
# consider only projects that can get into station
if self.checkIfProjectCanStartInStation(entity.capacityProject, entityStation) and\
(not self.checkIfProjectNeedsToBeAssembled(entity.capacityProject, entityBuffer))\
and self.checkIfThereIsEnoughSpace(entity, entityBuffer, availableSpace):
if EDD>entity.capacityProject.dueDate:
EDD=entity.capacityProject.dueDate
# put the entities in the corresponding list according to their due date
for entity in entitiesNotAllocated:
if entity.capacityProject.dueDate-EDD<=self.dueDateThreshold:
......
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