From 3a48daf620dc1121708a99290bfa27fd7dd73183 Mon Sep 17 00:00:00 2001 From: Marvin Kastner Date: Sat, 9 Sep 2023 23:38:16 +0200 Subject: [PATCH] Fix failing test --- conflowgen/previews/quay_side_throughput_preview.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conflowgen/previews/quay_side_throughput_preview.py b/conflowgen/previews/quay_side_throughput_preview.py index 543a557c..4ced6d09 100644 --- a/conflowgen/previews/quay_side_throughput_preview.py +++ b/conflowgen/previews/quay_side_throughput_preview.py @@ -66,14 +66,16 @@ def get_quay_side_throughput(self) -> InboundAndOutboundContainerVolume: teu_factor = ContainerLengthDistributionRepository().get_teu_factor() + epsilon = 0.1 + result = InboundAndOutboundContainerVolume( inbound=ContainerVolume( teu=quayside_inbound_container_volume_in_teu, - containers=int(quayside_inbound_container_volume_in_teu / teu_factor) + containers=int((quayside_inbound_container_volume_in_teu + epsilon)// teu_factor) ), outbound=ContainerVolume( teu=quayside_outbound_container_volume_in_teu, - containers=int(quayside_outbound_container_volume_in_teu / teu_factor) + containers=int((quayside_outbound_container_volume_in_teu + epsilon)/ teu_factor) ) )