Commit 2657ed18 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction for better calculation of what is to be processed

parent 72c1fba6
......@@ -222,11 +222,14 @@ class CapacityStationController(EventGenerator):
allCapacityConsumed=False
# if there is enough capacity for all the entities set them that they all should move
if totalRequestedCapacity<totalAvailableCapacity:
if totalRequestedCapacity<=totalAvailableCapacity:
for entity in entitiesWithinThreshold:
if self.checkIfProjectCanStartInStation(entity.capacityProject, station) and\
(not self.checkIfProjectNeedsToBeAssembled(entity.capacityProject, buffer)):
entity.shouldMove=True
# check if all the capacity is consumed to update the flag
if totalRequestedCapacity==totalAvailableCapacity:
allCapacityConsumed=True
# else calculate the capacity for every entity and create the entities
else:
......
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