diff --git a/conflowgen/flow_generator/allocate_space_for_containers_delivered_by_truck_service.py b/conflowgen/flow_generator/allocate_space_for_containers_delivered_by_truck_service.py index 28bbdba4..65676001 100644 --- a/conflowgen/flow_generator/allocate_space_for_containers_delivered_by_truck_service.py +++ b/conflowgen/flow_generator/allocate_space_for_containers_delivered_by_truck_service.py @@ -42,9 +42,14 @@ def _get_number_containers_to_allocate() -> int: As long as the container length distribution for inbound and outbound containers are the same, using the number of containers should lead to the same amount of containers as if we had taken the TEU capacity which is more complex to calculate. + We do not consider the emergency pick-ups, i.e. the cases when a container was picked up by a truck just because + no truck was available. + These trucks artificially increase the import and export flows in case the container was originally a + transshipment container and without this correction out of the sudden we have two containers in the yard. """ number_containers: int = Container.select().where( - Container.picked_up_by == ModeOfTransport.truck + (Container.picked_up_by == ModeOfTransport.truck) + & ~Container.emergency_pickup ).count() return number_containers