From caa9e3850cfecf7937c26b71d34368423e9647d1 Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Wed, 14 Aug 2024 13:17:53 +0200 Subject: [PATCH] IMO, after scheduling, the outgoingElements must contain the shipment. --- .../resourceImplementations/FirstReloadLSPSchedulingTest.java | 4 ++-- .../MultipleShipmentsFirstReloadLSPSchedulingTest.java | 4 ++-- .../MultipleShipmentsSecondReloadLSPSchedulingTest.java | 4 ++-- .../SecondReloadLSPSchedulingTest.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/matsim/freight/logistics/resourceImplementations/FirstReloadLSPSchedulingTest.java b/src/test/java/org/matsim/freight/logistics/resourceImplementations/FirstReloadLSPSchedulingTest.java index 907bf933..72a707de 100644 --- a/src/test/java/org/matsim/freight/logistics/resourceImplementations/FirstReloadLSPSchedulingTest.java +++ b/src/test/java/org/matsim/freight/logistics/resourceImplementations/FirstReloadLSPSchedulingTest.java @@ -270,8 +270,8 @@ public void testFirstReloadLSPScheduling() { } } assertTrue(handledByTranshipmentHub); - //This asserts that the shipments waiting for handling have been handled and the queues have been cleared - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); } diff --git a/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsFirstReloadLSPSchedulingTest.java b/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsFirstReloadLSPSchedulingTest.java index 28fc6df2..d0836995 100644 --- a/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsFirstReloadLSPSchedulingTest.java +++ b/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsFirstReloadLSPSchedulingTest.java @@ -269,8 +269,8 @@ public void testFirstReloadLSPScheduling() { } } assertTrue(handledByTranshipmentHub); - //This asserts that the shipments waiting for handling have been handled and the queues have been cleared - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); } diff --git a/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsSecondReloadLSPSchedulingTest.java b/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsSecondReloadLSPSchedulingTest.java index 0d0fa0c0..2571fadb 100644 --- a/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsSecondReloadLSPSchedulingTest.java +++ b/src/test/java/org/matsim/freight/logistics/resourceImplementations/MultipleShipmentsSecondReloadLSPSchedulingTest.java @@ -379,7 +379,7 @@ public void testSecondReloadLSPScheduling() { } assertTrue(handledByTranshipmentHub); - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); } @@ -406,7 +406,7 @@ public void testSecondReloadLSPScheduling() { } assertTrue(handledByTranshipmentHub); - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); } diff --git a/src/test/java/org/matsim/freight/logistics/resourceImplementations/SecondReloadLSPSchedulingTest.java b/src/test/java/org/matsim/freight/logistics/resourceImplementations/SecondReloadLSPSchedulingTest.java index 3fc5b72d..1b865281 100644 --- a/src/test/java/org/matsim/freight/logistics/resourceImplementations/SecondReloadLSPSchedulingTest.java +++ b/src/test/java/org/matsim/freight/logistics/resourceImplementations/SecondReloadLSPSchedulingTest.java @@ -379,7 +379,7 @@ public void testSecondReloadLSPScheduling() { } assertTrue(handledByTranshipmentHub); - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); } @@ -406,7 +406,7 @@ public void testSecondReloadLSPScheduling() { } assertTrue(handledByTranshipmentHub); - assertFalse(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); + assertTrue(element.getOutgoingShipments().getLspShipmentsWTime().contains(shipment)); assertFalse(element.getIncomingShipments().getLspShipmentsWTime().contains(shipment)); }