Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rewertvsp committed Sep 23, 2024
1 parent 5555782 commit 41dfb99
Showing 1 changed file with 14 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -844,14 +844,8 @@ public void createCarriers(Scenario scenario,
/**
* Creates the services for one carrier.
*/
private void createServices(Scenario scenario,
ArrayList<String> noPossibleLinks,
String selectedStopCategory,
String carrierName,
int numberOfJobs,
String[] serviceArea,
Integer serviceTimePerStop,
TimeWindow serviceTimeWindow,
private void createServices(Scenario scenario, ArrayList<String> noPossibleLinks, String selectedStopCategory, String carrierName,
int numberOfJobs, String[] serviceArea, Integer serviceTimePerStop, TimeWindow serviceTimeWindow,
Map<String, Map<Id<Link>, Link>> linksPerZone) {

String stopZone = serviceArea[0];
Expand All @@ -871,17 +865,10 @@ private void createServices(Scenario scenario,
/**
* Creates the carrier and the related vehicles.
*/
private void createNewCarrierAndAddVehicleTypes(Scenario scenario,
Integer purpose,
String startZone,
String selectedStartCategory,
String carrierName,
List<String> vehicleTypes,
int numberOfDepots,
CarrierCapabilities.FleetSize fleetSize,
int fixedNumberOfVehiclePerTypeAndLocation,
List<String> vehicleDepots,
Map<String, Map<Id<Link>, Link>> linksPerZone,
private void createNewCarrierAndAddVehicleTypes(Scenario scenario, Integer purpose, String startZone, String selectedStartCategory,
String carrierName, List<String> vehicleTypes, int numberOfDepots,
CarrierCapabilities.FleetSize fleetSize, int fixedNumberOfVehiclePerTypeAndLocation,
List<String> vehicleDepots, Map<String, Map<Id<Link>, Link>> linksPerZone,
String smallScaleCommercialTrafficType,
EnumeratedDistribution<GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration> tourStartTimeSelector) {

Expand Down Expand Up @@ -962,14 +949,16 @@ private int getVehicleStartTime(TourStartAndDuration t) {
* @param modeORvehType the mode or vehicle type
* @return the service duration
*/
private Integer getServiceTimePerStop(Map<GenerateSmallScaleCommercialTrafficDemand.StopDurationGoodTrafficKey, EnumeratedDistribution<GenerateSmallScaleCommercialTrafficDemand.DurationsBounds>> serviceDurationTimeSelector,
String employeeCategory,
String modeORvehType,
String smallScaleCommercialTrafficType) {
private Integer getServiceTimePerStop(
Map<GenerateSmallScaleCommercialTrafficDemand.StopDurationGoodTrafficKey, EnumeratedDistribution<GenerateSmallScaleCommercialTrafficDemand.DurationsBounds>> serviceDurationTimeSelector,
String employeeCategory, String modeORvehType, String smallScaleCommercialTrafficType, double maxVehicleAvailability) {

GenerateSmallScaleCommercialTrafficDemand.StopDurationGoodTrafficKey key = null;
if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()))
if (smallScaleCommercialTrafficType.equals(
GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()))
key = GenerateSmallScaleCommercialTrafficDemand.makeStopDurationGoodTrafficKey(employeeCategory, null);
else if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
else if (smallScaleCommercialTrafficType.equals(
GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
key = GenerateSmallScaleCommercialTrafficDemand.makeStopDurationGoodTrafficKey(employeeCategory, modeORvehType);
}
GenerateSmallScaleCommercialTrafficDemand.DurationsBounds serviceDurationBounds = serviceDurationTimeSelector.get(key).sample();
Expand Down

0 comments on commit 41dfb99

Please sign in to comment.