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/main/java/org/matsim/freight/logistics/resourceImplementations/TransshipmentHubScheduler.java b/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/TransshipmentHubScheduler.java
index e4d151903e9..6c6081c81bf 100644
--- a/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/TransshipmentHubScheduler.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/logistics/resourceImplementations/TransshipmentHubScheduler.java
@@ -29,10 +29,10 @@
import org.matsim.freight.logistics.LSPResourceScheduler;
import org.matsim.freight.logistics.LogisticChainElement;
import org.matsim.freight.logistics.resourceImplementations.ResourceImplementationUtils.TranshipmentHubSchedulerBuilder;
+import org.matsim.freight.logistics.shipment.LspShipment;
import org.matsim.freight.logistics.shipment.LspShipmentPlan;
import org.matsim.freight.logistics.shipment.LspShipmentPlanElement;
import org.matsim.freight.logistics.shipment.LspShipmentUtils;
-import org.matsim.freight.logistics.shipment.LspShipment;
/*package-private*/ class TransshipmentHubScheduler extends LSPResourceScheduler {
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 bf1cb7be9a6..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
@@ -20,6 +20,10 @@
package org.matsim.freight.carriers;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -36,12 +40,6 @@
import org.matsim.testcases.utils.EventsCollector;
import org.matsim.vehicles.Vehicle;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-
/**
* @author Kai Martins-Turner (kturner)
* @author Niclas Richter (nixlaos)
@@ -195,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/CarrierModuleTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierModuleTest.java
index 49dc173dd05..e80f24075be 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierModuleTest.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierModuleTest.java
@@ -33,11 +33,9 @@
import org.matsim.core.controler.Controler;
import org.matsim.core.controler.OutputDirectoryHierarchy;
import org.matsim.core.scenario.ScenarioUtils;
-import org.matsim.freight.carriers.CarriersUtils;
-import org.matsim.freight.carriers.FreightCarriersConfigGroup;
-import org.matsim.freight.carriers.controler.CarrierModule;
-import org.matsim.freight.carriers.controler.CarrierScoringFunctionFactory;
-import org.matsim.freight.carriers.controler.CarrierStrategyManager;
+import org.matsim.freight.carriers.controller.CarrierModule;
+import org.matsim.freight.carriers.controller.CarrierScoringFunctionFactory;
+import org.matsim.freight.carriers.controller.CarrierStrategyManager;
import org.matsim.freight.carriers.mobsim.DistanceScoringFunctionFactoryForTests;
import org.matsim.freight.carriers.mobsim.StrategyManagerFactoryForTests;
import org.matsim.testcases.MatsimTestUtils;
@@ -69,10 +67,10 @@ public void setUp(){
config.plans().setInputFile( testUtils.getClassInputDirectory() + "plans100.xml" );
config.controller().setOverwriteFileSetting(OutputDirectoryHierarchy.OverwriteFileSetting.overwriteExistingFiles);
config.controller().setWritePlansInterval(1);
- config.controller().setCreateGraphs(false);
+ config.controller().setCreateGraphsInterval(0);
freightCarriersConfigGroup = ConfigUtils.addOrGetModule( config, FreightCarriersConfigGroup.class ) ;
freightCarriersConfigGroup.setCarriersFile( testUtils.getClassInputDirectory() + "carrierPlansEquils.xml");
- freightCarriersConfigGroup.setCarriersVehicleTypesFile( testUtils.getClassInputDirectory() + "vehicleTypes.xml");
+ freightCarriersConfigGroup.setCarriersVehicleTypesFile( testUtils.getPackageInputDirectory() + "vehicleTypes_v2.xml");
Scenario scenario = ScenarioUtils.loadScenario( config );
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanReaderV1Test.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanReaderV1Test.java
index 38749fbabdf..8092ccfd02d 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanReaderV1Test.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanReaderV1Test.java
@@ -26,7 +26,6 @@
import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
import org.matsim.core.population.routes.NetworkRoute;
-import org.matsim.freight.carriers.*;
import org.matsim.freight.carriers.Tour.Leg;
import org.matsim.testcases.MatsimTestUtils;
import org.matsim.vehicles.VehicleType;
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanXmlReaderV2Test.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanXmlReaderV2Test.java
index 0deffa73889..07b0a547f3e 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanXmlReaderV2Test.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/CarrierPlanXmlReaderV2Test.java
@@ -21,8 +21,12 @@
package org.matsim.freight.carriers;
-import org.junit.jupiter.api.BeforeEach;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
@@ -32,16 +36,10 @@
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.gbl.Gbl;
import org.matsim.core.scenario.ScenarioUtils;
-import org.matsim.freight.carriers.*;
import org.matsim.freight.carriers.CarrierCapabilities.FleetSize;
import org.matsim.testcases.MatsimTestUtils;
import org.matsim.vehicles.Vehicle;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.*;
-
public class CarrierPlanXmlReaderV2Test {
@RegisterExtension
@@ -192,7 +190,7 @@ void test_readStream() {
* Test for the distance constraint. 4 different setups are used to control the
* correct working of the constraint
*
@@ -113,13 +112,13 @@ 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));
- Assertions.assertEquals(vehicleType_SmallV1.getId(), ((Vehicle) carrierV1.getSelectedPlan().getScheduledTours().iterator().next()
- .getVehicle()).getType().getId());
+ Assertions.assertEquals(vehicleType_SmallV1.getId(), carrierV1.getSelectedPlan().getScheduledTours().iterator().next()
+ .getVehicle().getType().getId());
double maxDistance_vehicleType_LargeV1 = VehicleUtils.getEnergyCapacity(vehicleType_LargeV1.getEngineInformation())
/ VehicleUtils.getEnergyConsumptionKWhPerMeter(vehicleType_LargeV1.getEngineInformation());
double maxDistance_vehicleType_SmallV1 = VehicleUtils.getEnergyCapacity(vehicleType_SmallV1.getEngineInformation())
@@ -144,12 +143,12 @@ 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");
}
/**
- * Option 2: Tour is not possible with the vehicle with the small battery. Thats
- * why one vehicle with a large battery is used.
+ * Option 2: Tour is not possible with the vehicle with the small battery.
+ * That's why one vehicle with a large battery is used.
*
*/
@Test
@@ -190,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));
@@ -221,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");
}
@@ -267,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));
@@ -301,17 +300,17 @@ 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.
- * Therefore one diesel vehicle must be used and one vehicle with a small
+ * 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.
*
*/
@@ -386,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");
}
@@ -453,8 +452,6 @@ private static Carrier addThreeServicesToCarrier(Carrier carrier) {
/**
* Creates the vehicle at the depot, ads this vehicle to the carriers and sets
* the capabilities. Sets TimeWindow for the carriers.
- *
- * @param
*/
private static void createCarriers(Carriers carriers, FleetSize fleetSize, Carrier singleCarrier,
CarrierVehicleTypes vehicleTypes) {
@@ -474,8 +471,6 @@ private static void createCarriers(Carriers carriers, FleetSize fleetSize, Carri
/**
* Method for creating a new carrierVehicle
*
- * @param
- *
* @return new carrierVehicle at the depot
*/
static CarrierVehicle createGarbageTruck(String vehicleName, double earliestStartingTime,
@@ -488,9 +483,6 @@ static CarrierVehicle createGarbageTruck(String vehicleName, double earliestStar
/**
* Defines and sets the Capabilities of the Carrier, including the vehicleTypes
* for the carriers
- *
- * @param
- *
*/
private static void defineCarriers(Carriers carriers, FleetSize fleetSize, Carrier singleCarrier,
List
* Test for the distance constraint. 4 different setups are used to control the
* correct working of the constraint for services
- *
+ *
* 2 additional setups are defined when using shipments instead of service.
* Shipments allow reloading of good during the tour.
*
@@ -123,10 +122,10 @@ 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(), ((Vehicle) carrierV1.getSelectedPlan().getScheduledTours().iterator().next()
- .getVehicle()).getType().getId());
+ Assertions.assertEquals(vehicleType_SmallV1.getId(), carrierV1.getSelectedPlan().getScheduledTours().iterator().next()
+ .getVehicle().getType().getId());
double maxDistance_vehicleType_LargeV1 = VehicleUtils.getEnergyCapacity(vehicleType_LargeV1.getEngineInformation())
/ VehicleUtils.getEnergyConsumptionKWhPerMeter(vehicleType_LargeV1.getEngineInformation());
double maxDistance_vehicleType_SmallV1 = VehicleUtils.getEnergyCapacity(vehicleType_SmallV1.getEngineInformation())
@@ -151,12 +150,12 @@ 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");
}
/**
- * Option 2: Tour is not possible with the vehicle with the small battery. Thats
- * why one vehicle with a large battery is used.
+ * Option 2: Tour is not possible with the vehicle with the small battery.
+ * That's why one vehicle with a large battery is used.
*
*/
@Test
@@ -206,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());
@@ -234,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");
}
@@ -292,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());
@@ -323,17 +322,17 @@ 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 service outside the range of both BEV types.
- * Therefore one diesel vehicle must be used and one vehicle with a small
+ * Therefore, one diesel vehicle must be used and one vehicle with a small
* battery.
*
*/
@@ -372,7 +371,7 @@ final void CarrierWithAdditionalDieselVehicleTest_Version4() throws ExecutionExc
VehicleType vehicleType_Diesel = VehicleUtils.createVehicleType(Id.create("DieselVehicle", VehicleType.class));
vehicleType_Diesel.getCostInformation().setCostsPerMeter(0.00055).setCostsPerSecond(0.008).setFixedCost(400.);
VehicleUtils.setHbefaTechnology(vehicleType_Diesel.getEngineInformation(), "diesel");
- VehicleUtils.setFuelConsumption(vehicleType_Diesel, 0.0001625);
+ VehicleUtils.setFuelConsumptionLitersPerMeter(vehicleType_Diesel.getEngineInformation(), 0.0001625);
vehicleType_Diesel.setDescription("Carrier_Version4");
vehicleType_Diesel.getCapacity().setOther(40.);
@@ -391,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());
@@ -421,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");
}
@@ -436,7 +435,7 @@ else if (thisTypeId.equals("DieselVehicle"))
* This test uses shipments instead of service .
* As a consequence the vehicles can return to the depot, load more goods and run another subtour.
* Distance is set to a value that, due to distance restrictions, two tours are necessary.
- *
+ *
* This option (5) is designed similar to option 2
*
*/
@@ -479,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());
@@ -506,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");
}
/**
@@ -516,7 +515,7 @@ final void CarrierWithShipmentsMidSizeBatteryTest_Version5() throws ExecutionExc
* This test uses shipments instead of service .
* As a consequence the vehicles can return to the depot, load more goods and run another subtour.
* Distance is set to a value that one tour can be run with loading once.
- *
+ *
* This option (6) is designed similar to option 5
*
*/
@@ -560,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());
@@ -587,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");
}
/**
@@ -664,8 +663,6 @@ private static Carrier addThreeServicesToCarrier(Carrier carrier) {
/**
* Creates the vehicle at the depot, ads this vehicle to the carriers and sets
* the capabilities. Sets TimeWindow for the carriers.
- *
- * @param
*/
private static void createCarriers(Carriers carriers, FleetSize fleetSize, Carrier singleCarrier,
CarrierVehicleTypes vehicleTypes) {
@@ -684,9 +681,6 @@ private static void createCarriers(Carriers carriers, FleetSize fleetSize, Carri
/**
* Method for creating a new carrierVehicle
- *
- * @param
- *
* @return new carrierVehicle at the depot
*/
static CarrierVehicle createCarrierVehicle(String vehicleName, double earliestStartingTime,
@@ -699,9 +693,6 @@ static CarrierVehicle createCarrierVehicle(String vehicleName, double earliestSt
/**
* Defines and sets the Capabilities of the Carrier, including the vehicleTypes
* for the carriers
- *
- * @param
- *
*/
private static void defineCarriers(Carriers carriers, FleetSize fleetSize, Carrier singleCarrier,
List
- * Benenson et al defined 3 phases of parking search
+ * Benenson et al. defined 3 phases of parking search
* OBSERVING: observation of parking situation while driving towards destination
* SEARCH_WHILE_APPROACH: estimating the amount of free parking lots on the way to destination
* and if applicable parking before arriving
* SEARCH_FOR_NEXT: taking the next free parking space if it isn't too far away from destination
*/
enum ParkingMode {
- DRIVING, OBSERVING, SEARCH_WHILE_APPROACH, SEARCH_FOR_NEXT
+ DRIVING, OBSERVING, SEARCH_WHILE_APPROACH, SEARCH_FOR_NEXT
}
-public class BenensonDynLeg extends ParkingDynLeg{
+public class BenensonDynLeg extends ParkingDynLeg {
private static final Logger logger = LogManager.getLogger(BenensonDynLeg.class);
private static final boolean logForDebug = false;
private double totalObservedParkingSpaces = 0.0;
private double observedFreeParkingSpaces = 0.0;
- private double firstDestinationLinkEnterTime = 0;
- private ParkingMode legStage = ParkingMode.DRIVING;
+ private double firstDestinationLinkEnterTime = 0;
+ private ParkingMode legStage = ParkingMode.DRIVING;
public BenensonDynLeg(String mode, NetworkRoute route, ParkingSearchLogic logic,
- ParkingSearchManager parkingManager, Id