diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierJob.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierJob.java index 3654fbff36a..1dc1cd32f8d 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierJob.java +++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierJob.java @@ -10,7 +10,7 @@ * In the next steps it will be extended, as follows * 1) existing common methods of {@link CarrierShipment} and {@link * CarrierService} where moved up here - * 2) some similiar, but differently named methods of {@link + * 2) some similar, but differently named methods of {@link * CarrierShipment} and {@link CarrierService} were renamed to the same name and moved up here * ... * future) It maybe gets generalized in way, that we only have one job definition with 1 or 2 diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java index 4e53c559222..6302c0df803 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java +++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java @@ -226,7 +226,7 @@ void writeTravelTimeAndDistancePerVehicle(String analysisOutputDirectory, Scenar void writeTravelTimeAndDistancePerVehicleType(String analysisOutputDirectory, Scenario scenario) throws IOException { log.info("Writing out Time & Distance & Costs ... perVehicleType"); - //----- All VehicleTypes in CarriervehicleTypes container. Used so that even unused vehTypes appear in the output + //----- All VehicleTypes in CarrierVehicleTypes container. Used so that even unused vehTypes appear in the output TreeMap, VehicleType> vehicleTypesMap = new TreeMap<>(CarriersUtils.getCarrierVehicleTypes(scenario).getVehicleTypes()); //For the case that there are additional vehicle types found in the events. for (VehicleType vehicleType : vehicleId2VehicleType.values()) { diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/FreightLogisticsConfigGroup.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/FreightLogisticsConfigGroup.java index bab230379ba..ca222f462ab 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/FreightLogisticsConfigGroup.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/FreightLogisticsConfigGroup.java @@ -62,7 +62,7 @@ public void setLspsFile(String lspsFile) { //--- - // Commenting this out, because in a frist step I think it is better/ more streight forward to have the VRP logic in the carriers as an attribute. + // Commenting this out, because in a frist step I think it is better/ more straight forward to have the VRP logic in the carriers as an attribute. // please see {@link CarrierSchedulerUtils#setVrpLogic(carrier, VRPLogic)} and {@link CarrierSchedulerUtils#getVrpLogic(carrier)} //--- diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/InitialShipmentAssigner.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/InitialShipmentAssigner.java index eb6ff6287e7..9d856aaa6cb 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/InitialShipmentAssigner.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/InitialShipmentAssigner.java @@ -25,12 +25,12 @@ /** * Takes an {@link LspShipment} and normally assigns it to something that belongs to an {@link LSP}. *
- * After changes in fall 2023 (see master thesis of nrichter), the assingment is + * After changes in fall 2023 (see master thesis of nrichter), the assignment is * there to be done one time initially. *
* If there are several {@link LogisticChain}s in a {@link LSPPlan}, the {@link LSP} has to assign each {@link * LspShipment} to the suitable {@link LogisticChain}. For this purpose, each {@link LSPPlan} - * (or only the LSP? - kmt'jan'24), contains a pluggable strategy + * (or only the LSP? - kmt jan'24), contains a pluggable strategy * that is contained in classes implementing the interface {@link InitialShipmentAssigner}.
*
* During iterations, it can happen that the {@link LspShipment} should be moved to another diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/LSPUtils.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/LSPUtils.java index e40c44e95b6..4f0ae7a718d 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/LSPUtils.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/LSPUtils.java @@ -50,7 +50,7 @@ public static boolean isPlanTheSelectedPlan(LSPPlan lspPlan) { return lspPlan.getLSP().getSelectedPlan() == lspPlan; } - public static LogisticChainScheduler createForwardLogisiticChainScheduler() { + public static LogisticChainScheduler createForwardLogisticChainScheduler() { return new ForwardLogisticChainSchedulerImpl(); } diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/analysis/LspScoreStatsControlerListener.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/analysis/LspScoreStatsControlerListener.java index 3a868d449d3..438c34feaa2 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/analysis/LspScoreStatsControlerListener.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/analysis/LspScoreStatsControlerListener.java @@ -188,7 +188,7 @@ private void writePng() { } @Override - public void notifyShutdown(final ShutdownEvent controlerShudownEvent) { + public void notifyShutdown(final ShutdownEvent controlerShutdownEvent) { try { this.out.close(); for (ScoreHist data : this.perLsp.values()) { diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/examples/initialPlans/ExampleSchedulingOfTransportChainHubsVsDirect.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/examples/initialPlans/ExampleSchedulingOfTransportChainHubsVsDirect.java index e13c4624a15..59c36fde881 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/examples/initialPlans/ExampleSchedulingOfTransportChainHubsVsDirect.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/examples/initialPlans/ExampleSchedulingOfTransportChainHubsVsDirect.java @@ -428,7 +428,7 @@ private static LSP createInitialLSP(Scenario scenario, SolutionType solutionType log.error( "This is totally untested. I can neither say if it will work nor if it will do anything useful - kmt feb22"); - // TODO: Habe das vorziehen vor das switch statement rückgängig gemacht, weil es sideeffekte + // TODO: Habe das vorziehen vor das switch statement rückgängig gemacht, weil es sideeffects // hatte -> Die dürften hier auch sein!!!! (KMT may22) // Die createLSPPlan_reloading(..) Methoden sind nicht unabhängig voneinander. // Das liegt wohl am statischen und das dann dort wieder Verknüpfungen gesetzt werden --> diff --git a/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/SimpleForwardLogisticChainScheduler.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/SimpleForwardLogisticChainScheduler.java index f046b80c846..59307392ff6 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/SimpleForwardLogisticChainScheduler.java +++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/SimpleForwardLogisticChainScheduler.java @@ -33,7 +33,7 @@ * LogisticChainElement}. * *

2.) all {@link LSPResource}s that were handed over to the SimpleForwardSolutionScheduler - * exogenously, are now scheduled sequentially in an order that was also specified exogenously. This + * exogenous, are now scheduled sequentially in an order that was also specified exogenously. This * order ensures that each {@link LogisticChain} is traversed from the first to the last {@link * LogisticChainElement}. During this procedure, the concerned {@link LspShipment}s are taken from * the collection of incoming shipments, handled by the {@link LSPResource} in charge and then added diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierEventsReadersTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierEventsReadersTest.java index 2b1c2ead062..933961095cb 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierEventsReadersTest.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierEventsReadersTest.java @@ -193,7 +193,7 @@ void testReader() { handledEvents.addAll(eventHandlerServices.handledEvents); handledEvents.addAll(eventHandlerShipments.handledEvents); - //Please note: This test is sensitive to the order of events as they are added in carrierEvents (input) and the resukts of the handler... + //Please note: This test is sensitive to the order of events as they are added in carrierEvents (input) and the results of the handler... Assertions.assertArrayEquals(carrierEvents.toArray(), handledEvents.toArray()); } diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarriersUtilsTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarriersUtilsTest.java index b1525aa604c..fe0428621e0 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarriersUtilsTest.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarriersUtilsTest.java @@ -111,7 +111,7 @@ void testAddAndGetShipmentToCarrier() { @Test void testGetSetJspritIteration(){ Carrier carrier = new CarrierImpl(Id.create("carrier", Carrier.class)); - //jspirtIterations is not set. should return Integer.Min_Value (null is not possible because returning (int) + //jspritIterations is not set. should return Integer.Min_Value (null is not possible because returning (int) Assertions.assertEquals(Integer.MIN_VALUE, CarriersUtils.getJspritIterations(carrier) ); CarriersUtils.setJspritIterations(carrier, 125); diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/controller/EquilWithCarrierWithoutPersonsIT.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/controller/EquilWithCarrierWithoutPersonsIT.java index d106530ef27..1df5a1a5b22 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/controller/EquilWithCarrierWithoutPersonsIT.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/controller/EquilWithCarrierWithoutPersonsIT.java @@ -203,7 +203,7 @@ public void install() { } @Test - void testEventFilessAreEqual(){ + void testEventFilesAreEqual(){ setUp(); controler.addOverridingModule(new CarrierModule()); controler.addOverridingModule(new AbstractModule() { diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintFromVehiclesFileTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintFromVehiclesFileTest.java index b23a9863069..43557b37a2a 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintFromVehiclesFileTest.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintFromVehiclesFileTest.java @@ -112,7 +112,7 @@ final void CarrierSmallBatteryTest_Version1() throws ExecutionException, Interru Assertions.assertEquals(1, carrierV1.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); VehicleType vehicleType_SmallV1 = vehicleTypes.getVehicleTypes().get(Id.create("SmallBattery_V1", VehicleType.class)); VehicleType vehicleType_LargeV1 = vehicleTypes.getVehicleTypes().get(Id.create("LargeBattery_V1", VehicleType.class)); @@ -143,7 +143,7 @@ final void CarrierSmallBatteryTest_Version1() throws ExecutionException, Interru } Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } /** @@ -189,7 +189,7 @@ final void CarrierLargeBatteryTest_Version2() throws ExecutionException, Interru Assertions.assertEquals(1, carrierV2.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); VehicleType vehicleType_SmallV2 = vehicleTypes.getVehicleTypes().get(Id.create("SmallBattery_V2", VehicleType.class)); VehicleType vehicleType_LargeV2 = vehicleTypes.getVehicleTypes().get(Id.create("LargeBattery_V2", VehicleType.class)); @@ -220,7 +220,7 @@ final void CarrierLargeBatteryTest_Version2() throws ExecutionException, Interru } Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } @@ -266,7 +266,7 @@ final void Carrier2SmallBatteryTest_Version3() throws ExecutionException, Interr Assertions.assertEquals(2, carrierV3.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); VehicleType vehicleType_SmallV3 = vehicleTypes.getVehicleTypes().get(Id.create("SmallBattery_V3", VehicleType.class)); VehicleType vehicleType_LargeV3 = vehicleTypes.getVehicleTypes().get(Id.create("LargeBattery_V3", VehicleType.class)); @@ -300,16 +300,16 @@ final void Carrier2SmallBatteryTest_Version3() throws ExecutionException, Interr if (distanceTour == 12000) Assertions.assertEquals(12000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else Assertions.assertEquals(20000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } } /** - * Option 4: An additional shipment outside the range of both BEVtypes. + * Option 4: An additional shipment outside the range of both BEV types. * Therefore, one diesel vehicle must be used and one vehicle with a small * battery. * @@ -385,11 +385,11 @@ final void CarrierWithAdditionalDieselVehicleTest_Version4() throws ExecutionExc if (thisTypeId.equals("SmallBattery_V4")) Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else if (thisTypeId.equals("DieselVehicle")) Assertions.assertEquals(36000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else Assertions.fail("Wrong vehicleType used"); } diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintTest.java index 7c4c4a8dbd5..a375cceac46 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintTest.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/DistanceConstraintTest.java @@ -122,7 +122,7 @@ final void CarrierSmallBatteryTest_Version1() throws ExecutionException, Interru Assertions.assertEquals(1, carrierV1.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); Assertions.assertEquals(vehicleType_SmallV1.getId(), carrierV1.getSelectedPlan().getScheduledTours().iterator().next() .getVehicle().getType().getId()); @@ -150,7 +150,7 @@ final void CarrierSmallBatteryTest_Version1() throws ExecutionException, Interru } Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } /** @@ -205,7 +205,7 @@ final void CarrierLargeBatteryTest_Version2() throws ExecutionException, Interru Assertions.assertEquals(1, carrierV2.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); Assertions.assertEquals(vehicleType_LargeV2.getId(), carrierV2.getSelectedPlan().getScheduledTours().iterator().next() .getVehicle().getType().getId()); @@ -233,7 +233,7 @@ final void CarrierLargeBatteryTest_Version2() throws ExecutionException, Interru } Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } @@ -291,7 +291,7 @@ final void Carrier2SmallBatteryTest_Version3() throws ExecutionException, Interr Assertions.assertEquals(2, carrierV3.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); double maxDistance_vehicleType_LargeV3 = VehicleUtils.getEnergyCapacity(vehicleType_LargeV3.getEngineInformation()) / VehicleUtils.getEnergyConsumptionKWhPerMeter(vehicleType_LargeV3.getEngineInformation()); @@ -322,11 +322,11 @@ final void Carrier2SmallBatteryTest_Version3() throws ExecutionException, Interr if (distanceTour == 12000) Assertions.assertEquals(12000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else Assertions.assertEquals(20000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); } } @@ -390,7 +390,7 @@ final void CarrierWithAdditionalDieselVehicleTest_Version4() throws ExecutionExc Assertions.assertEquals(2, carrierV4.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); double maxDistance_vehicleType_Large4 = VehicleUtils.getEnergyCapacity(vehicleType_LargeV4.getEngineInformation()) / VehicleUtils.getEnergyConsumptionKWhPerMeter(vehicleType_LargeV4.getEngineInformation()); @@ -420,11 +420,11 @@ final void CarrierWithAdditionalDieselVehicleTest_Version4() throws ExecutionExc if (thisTypeId.equals("SmallBattery_V4")) Assertions.assertEquals(24000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else if (thisTypeId.equals("DieselVehicle")) Assertions.assertEquals(36000, distanceTour, MatsimTestUtils.EPSILON, - "The schedulded tour has a non expected distance"); + "The scheduled tour has a non expected distance"); else Assertions.fail("Wrong vehicleType used"); } @@ -478,7 +478,7 @@ final void CarrierWithShipmentsMidSizeBatteryTest_Version5() throws ExecutionExc //We need two tours, due to reloading both shipments must be transported one after the other Assertions.assertEquals(2, carrierV5.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); Assertions.assertEquals(vehicleType_MidSizeV5.getId(), carrierV5.getSelectedPlan().getScheduledTours().iterator().next() .getVehicle().getType().getId()); @@ -505,9 +505,9 @@ final void CarrierWithShipmentsMidSizeBatteryTest_Version5() throws ExecutionExc Assertions.assertEquals(2, distancesOfTours.size(), "There must be two entry for tour distances"); //One tour has distance of 12000m - Assertions.assertTrue(distancesOfTours.contains(12000.0), "The schedulded tour has a non expected distance"); + Assertions.assertTrue(distancesOfTours.contains(12000.0), "The scheduled tour has a non expected distance"); //The other tour has distance of 20000m - Assertions.assertTrue(distancesOfTours.contains(20000.0), "The schedulded tour has a non expected distance"); + Assertions.assertTrue(distancesOfTours.contains(20000.0), "The scheduled tour has a non expected distance"); } /** @@ -559,7 +559,7 @@ final void CarrierWithShipmentsLargeBatteryTest_Version6() throws ExecutionExcep //We need two tours, due to reloading both shipments must be transported one after the other Assertions.assertEquals(1, carrierV5.getSelectedPlan().getScheduledTours().size(), - "Not the correct amout of scheduled tours"); + "Not the correct amount of scheduled tours"); Assertions.assertEquals(vehicleType_LargeV5.getId(), carrierV5.getSelectedPlan().getScheduledTours().iterator().next() .getVehicle().getType().getId()); @@ -586,7 +586,7 @@ final void CarrierWithShipmentsLargeBatteryTest_Version6() throws ExecutionExcep Assertions.assertEquals(1, distancesOfTours.size(), "There must be one entry for tour distances"); //This tour has distance of 24000m - Assertions.assertTrue(distancesOfTours.contains(24000.0), "The schedulded tour has a non expected distance"); + Assertions.assertTrue(distancesOfTours.contains(24000.0), "The scheduled tour has a non expected distance"); } /** diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java index 04a424cf5cd..d7127bc80bf 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java @@ -69,7 +69,7 @@ public class CarrierControllerUtilsIT{ public void setUp() { //Create carrier with services and shipments - Carriers carriersWithServicesAndShpiments = new Carriers(); + Carriers carriersWithServicesAndShipments = new Carriers(); carrierWServices = CarriersUtils.createCarrier(CARRIER_SERVICES_ID ); CarrierService service1 = createMatsimService("Service1", "i(3,9)", 2); CarriersUtils.addService(carrierWServices, service1); @@ -110,8 +110,8 @@ public void setUp() { carrierWShipments.setCarrierCapabilities(ccBuilder.build()); // Add both carriers - carriersWithServicesAndShpiments.addCarrier(carrierWServices); - carriersWithServicesAndShpiments.addCarrier(carrierWShipments); + carriersWithServicesAndShipments.addCarrier(carrierWServices); + carriersWithServicesAndShipments.addCarrier(carrierWShipments); //load Network and build netbasedCosts for jsprit Network network = NetworkUtils.createNetwork(); @@ -120,7 +120,7 @@ public void setUp() { final NetworkBasedTransportCosts netBasedCosts = netBuilder.build() ; netBuilder.setTimeSliceWidth(1800) ; // !!!!, otherwise it will not do anything. - for (Carrier carrier : carriersWithServicesAndShpiments.getCarriers().values()) { + for (Carrier carrier : carriersWithServicesAndShipments.getCarriers().values()) { //Build VRP VehicleRoutingProblem.Builder vrpBuilder = MatsimJspritFactory.createRoutingProblemBuilder(carrier, network); vrpBuilder.setRoutingCost(netBasedCosts) ; @@ -143,7 +143,7 @@ public void setUp() { //Convert to jsprit VRP Carriers carriersWithShipmentsOnly = CarriersUtils.createShipmentVRPCarrierFromServiceVRPSolution( - carriersWithServicesAndShpiments ); + carriersWithServicesAndShipments ); for (Carrier carrier : carriersWithShipmentsOnly.getCarriers().values()) { //Build VRP diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java index fd3338da366..1896021e805 100644 --- a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java +++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java @@ -82,7 +82,7 @@ public class CarrierControllerUtilsTest{ public void setUp() { //Create carrier with services and shipments - Carriers carriersWithServicesAndShpiments = new Carriers(); + Carriers carriersWithServicesAndShipments = new Carriers(); carrierWServices = CarriersUtils.createCarrier(CARRIER_SERVICES_ID ); CarrierService service1 = createMatsimService("Service1", "i(3,9)", 2); CarriersUtils.addService(carrierWServices, service1); @@ -121,8 +121,8 @@ public void setUp() { carrierWShipments.setCarrierCapabilities(ccBuilder.build()); // Add both carriers - carriersWithServicesAndShpiments.addCarrier(carrierWServices); - carriersWithServicesAndShpiments.addCarrier(carrierWShipments); + carriersWithServicesAndShipments.addCarrier(carrierWServices); + carriersWithServicesAndShipments.addCarrier(carrierWShipments); //load Network and build netbasedCosts for jsprit Network network = NetworkUtils.createNetwork(); @@ -152,7 +152,7 @@ public void setUp() { */ //Convert to jsprit VRP - Carriers carriersWithShipmentsOnly = CarriersUtils.createShipmentVRPCarrierFromServiceVRPSolution(carriersWithServicesAndShpiments); + Carriers carriersWithShipmentsOnly = CarriersUtils.createShipmentVRPCarrierFromServiceVRPSolution(carriersWithServicesAndShipments); carrierWShipmentsOnlyFromCarrierWServices = carriersWithShipmentsOnly.getCarriers().get(CARRIER_SERVICES_ID); //with converted Service carrierWShipmentsOnlyFromCarrierWShipments = carriersWithShipmentsOnly.getCarriers().get(CARRIER_SHIPMENTS_ID); //with copied Shipments } @@ -160,7 +160,7 @@ public void setUp() { //Should only have Services @Test - void numberOfInitalServicesIsCorrect() { + void numberOfInitialServicesIsCorrect() { Assertions.assertEquals(2, carrierWServices.getServices().size()); int demandServices = 0; @@ -236,7 +236,7 @@ void fleetAvailableAfterConvertingIsCorrect() { } @Test - void copiingOfShipmentsIsDoneCorrectly() { + void copyingOfShipmentsIsDoneCorrectly() { boolean foundShipment1 = false; boolean foundShipment2 = false; CarrierShipment carrierShipment1 = CarriersUtils.getShipment(carrierWShipmentsOnlyFromCarrierWShipments, Id.create("shipment1", CarrierShipment.class)); @@ -269,19 +269,19 @@ void copiingOfShipmentsIsDoneCorrectly() { Assertions.assertEquals(0.0, carrierShipment2.getPickupTimeWindow().getStart(), 0); Assertions.assertEquals(7200.0, carrierShipment2.getPickupTimeWindow().getEnd(), 0); } - Assertions.assertTrue(foundShipment1, "Not found Shipment1 after copiing"); - Assertions.assertTrue(foundShipment2, "Not found Shipment2 after copiing"); + Assertions.assertTrue(foundShipment1, "Not found Shipment1 after copying"); + Assertions.assertTrue(foundShipment2, "Not found Shipment2 after copying"); } @Test void convertionOfServicesIsDoneCorrectly() { - boolean foundSercice1 = false; + boolean foundService1 = false; boolean foundService2 = false; CarrierShipment carrierShipment1 = CarriersUtils.getShipment(carrierWShipmentsOnlyFromCarrierWServices, Id.create("Service1", CarrierShipment.class)); assert carrierShipment1 != null; if (carrierShipment1.getId() == Id.create("Service1", CarrierShipment.class)) { - foundSercice1 = true; + foundService1 = true; Assertions.assertEquals(Id.createLinkId("i(6,0)"), carrierShipment1.getFrom()); Assertions.assertEquals(Id.createLinkId("i(3,9)"), carrierShipment1.getTo()); Assertions.assertEquals(2, carrierShipment1.getSize()); @@ -306,7 +306,7 @@ void convertionOfServicesIsDoneCorrectly() { Assertions.assertEquals(0.0, carrierShipment2.getPickupTimeWindow().getStart(), 0); Assertions.assertEquals(36001.0, carrierShipment2.getPickupTimeWindow().getEnd(), 0); } - Assertions.assertTrue(foundSercice1, "Not found converted Service1 after converting"); + Assertions.assertTrue(foundService1, "Not found converted Service1 after converting"); Assertions.assertTrue(foundService2, "Not found converted Service2 after converting"); } @@ -454,10 +454,10 @@ void testRunJsprit_NoOfJspritIterationsMissing() { } /** - * Don't crash even if there is no algortihm file specified. + * Don't crash even if there is no algorithm file specified. */ @Test - void testRunJsprit_NoAlgortihmFileGiven(){ + void testRunJsprit_NoAlgorithmFileGiven(){ Config config = prepareConfig(); config.controller().setOutputDirectory(utils.getOutputDirectory()); Scenario scenario = ScenarioUtils.loadScenario(config); @@ -476,7 +476,7 @@ private Config prepareConfig(){ Config config = ConfigUtils.loadConfig(IOUtils.extendUrl(scenarioUrl, "config.xml" ) ); config.controller().setLastIteration(0); config.plans().setActivityDurationInterpretation(PlansConfigGroup.ActivityDurationInterpretation.tryEndTimeThenDuration ); - //freight configstuff + //freight config stuff FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule(config, FreightCarriersConfigGroup.class); freightCarriersConfigGroup.setCarriersFile(IOUtils.extendUrl(scenarioUrl, "singleCarrierFiveActivitiesWithoutRoutes.xml" ).toString() ); freightCarriersConfigGroup.setCarriersVehicleTypesFile(IOUtils.extendUrl(scenarioUrl, "vehicleTypes.xml" ).toString() );