, Attributab
/**
* Sets a {@link CarrierPlan} as selected.
*
- * If selectedPlan in not in plan-collection, it adds it.
+ *
The selected plan should be added to the list of plans before.
*
* @param selectedPlan to be set
*/
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierImpl.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierImpl.java
index 9d8a439af32..8dcc53adc75 100644
--- a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierImpl.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierImpl.java
@@ -82,15 +82,26 @@ public CarrierPlan getSelectedPlan() {
}
/**
- * Selects the selectedPlan.
- *
- * If the plan-collection does not contain the selectedPlan, it is added to that collection.
- *
+ * Adds a new CarrierPlan.
+ * Makes it selected if no other selectedPlan exists.
+ * @param carrierPlan carrierPlan to be added
+ */
+ @Override
+ public boolean addPlan(CarrierPlan carrierPlan) {
+ // Make sure there is a selected carrierPlan if there is at least one carrierPlan
+ if (this.selectedPlan == null) this.selectedPlan = carrierPlan;
+ return this.plans.add(carrierPlan);
+ }
+
+ /**
+ * Set Plan as the selectedPlan.
* @param selectedPlan to be selected
*/
@Override
- public void setSelectedPlan(CarrierPlan selectedPlan) {
- if(!plans.contains(selectedPlan)) plans.add(selectedPlan);
+ public void setSelectedPlan(final CarrierPlan selectedPlan) {
+ if (selectedPlan != null && !plans.contains( selectedPlan )) {
+ throw new IllegalStateException("The plan to be set as selected is neither not null nor stored in the carrier's plans");
+ }
this.selectedPlan = selectedPlan;
}
@@ -109,14 +120,12 @@ public Map, CarrierService> getServices(){
return services;
}
- @Override
- public boolean addPlan(CarrierPlan p) {
- throw new RuntimeException("not implemented") ;
- }
+
@Override
public CarrierPlan createCopyOfSelectedPlanAndMakeSelected() {
CarrierPlan newPlan = CarriersUtils.copyPlan(this.selectedPlan ) ;
+ this.addPlan( newPlan ) ;
this.setSelectedPlan( newPlan ) ;
return newPlan ;
}
@@ -127,7 +136,10 @@ public boolean removePlan(CarrierPlan p) {
}
@Override
- public void clearPlans() { this.plans.clear(); }
+ public void clearPlans() {
+ this.plans.clear();
+ this.selectedPlan = null;
+ }
@Override
public Attributes getAttributes() {
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarriersUtils.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarriersUtils.java
index de88f529862..7c8e7220e3e 100644
--- a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarriersUtils.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarriersUtils.java
@@ -25,6 +25,7 @@
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
import com.graphhopper.jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
+import com.graphhopper.jsprit.core.problem.job.Shipment;
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
import com.graphhopper.jsprit.core.util.Solutions;
import org.apache.logging.log4j.LogManager;
@@ -52,7 +53,7 @@ public class CarriersUtils {
static final String CARRIER_VEHICLE = "carrierVehicle";
@SuppressWarnings("unused")
- private static final Logger log = LogManager.getLogger(CarriersUtils.class);
+ private static final Logger log = LogManager.getLogger(CarriersUtils.class);
/**
* From the outside, rather use {@link CarriersUtils#getCarriers(Scenario)} .
* This string constant will eventually become private.
@@ -64,67 +65,82 @@ public class CarriersUtils {
private static final String ATTR_JSPRIT_SCORE = "jspritScore";
private static final String ATTR_JSPRIT_Time = "jspritComputationTime";
- public static Carrier createCarrier( Id id ){
+ /**
+ * Enum to decide for which carriers a new solution should be created.
+ * This makes only a difference if the carriers already have a plan.
+ */
+ public enum CarrierSelectionForSolution {
+ solveForAllCarriersAndOverrideExistingPlans, //Overwrite all existing plans of the carriers and create new solutions.
+ solveOnlyForCarrierWithoutPlans, //Create new solutions only for carriers with no plans. Existing plans of other carriers are not changed.
+ solveForAllCarriersAndAddPLans // Add new plans to existing plans of carriers. The new plans are set as selected plans.
+ }
+
+ public static Carrier createCarrier(Id id) {
return new CarrierImpl(id);
}
/**
- * Adds an carrierVehicle to the CarrierCapabilities of the Carrier.
- * @param carrier
- * @param carrierVehicle
+ * Adds a carrierVehicle to the CarrierCapabilities of the Carrier.
+ *
+ * @param carrier the carrier
+ * @param carrierVehicle the vehicle to add
*/
- public static void addCarrierVehicle(Carrier carrier, CarrierVehicle carrierVehicle){
+ public static void addCarrierVehicle(Carrier carrier, CarrierVehicle carrierVehicle) {
carrier.getCarrierCapabilities().getCarrierVehicles().put(carrierVehicle.getId(), carrierVehicle);
}
- public static CarrierVehicle getCarrierVehicle(Carrier carrier, Id vehicleId){
+ public static CarrierVehicle getCarrierVehicle(Carrier carrier, Id vehicleId) {
CarrierVehicle veh = carrier.getCarrierCapabilities().getCarrierVehicles().get(vehicleId);
- if(veh != null){
+ if (veh != null) {
return veh;
}
- log.error("Vehicle with Id does not exists", new IllegalStateException("vehicle with id " + vehicleId + " is missing in Carrier: " + carrier.getId()));
+ log.error("Vehicle with Id does not exists",
+ new IllegalStateException("vehicle with id " + vehicleId + " is missing in Carrier: " + carrier.getId()));
return null;
}
/**
* Adds an {@link CarrierService} to the {@link Carrier}.
- * @param carrier
- * @param carrierService
+ *
+ * @param carrier the carrier
+ * @param carrierService the service
*/
- public static void addService(Carrier carrier, CarrierService carrierService){
+ public static void addService(Carrier carrier, CarrierService carrierService) {
carrier.getServices().put(carrierService.getId(), carrierService);
}
- public static CarrierService getService(Carrier carrier, Id serviceId){
+ public static CarrierService getService(Carrier carrier, Id serviceId) {
CarrierService service = carrier.getServices().get(serviceId);
- if(service != null){
+ if (service != null) {
return service;
}
- log.error("Service with Id does not exists", new IllegalStateException("Service with id " + serviceId + " is missing in Carrier: " + carrier.getId()));
+ log.error("Service with Id does not exists",
+ new IllegalStateException("Service with id " + serviceId + " is missing in Carrier: " + carrier.getId()));
return null;
}
/**
* Adds an {@link CarrierShipment} to the {@link Carrier}.
- * @param carrier
- * @param carrierShipment
+ *
+ * @param carrier the carrier
+ * @param carrierShipment the shipment
*/
- public static void addShipment(Carrier carrier, CarrierShipment carrierShipment){
+ public static void addShipment(Carrier carrier, CarrierShipment carrierShipment) {
carrier.getShipments().put(carrierShipment.getId(), carrierShipment);
}
- public static CarrierShipment getShipment(Carrier carrier, Id serviceId){
+ public static CarrierShipment getShipment(Carrier carrier, Id serviceId) {
CarrierShipment shipment = carrier.getShipments().get(serviceId);
- if(shipment != null){
+ if (shipment != null) {
return shipment;
}
- log.error("Shipment with Id does not exists", new IllegalStateException("Shipment with id " + serviceId + " is missing in Carrier: " + carrier.getId()));
+ log.error("Shipment with Id does not exists",
+ new IllegalStateException("Shipment with id " + serviceId + " is missing in Carrier: " + carrier.getId()));
return null;
}
-
- public static CarrierPlan copyPlan( CarrierPlan plan2copy ) {
+ public static CarrierPlan copyPlan(CarrierPlan plan2copy) {
List tours = new ArrayList<>();
for (ScheduledTour sTour : plan2copy.getScheduledTours()) {
double depTime = sTour.getDeparture();
@@ -139,77 +155,110 @@ public static CarrierPlan copyPlan( CarrierPlan plan2copy ) {
}
- private static final String CARRIER_MODE = "carrierMode" ;
- public static String getCarrierMode( Carrier carrier ) {
- String result = (String) carrier.getAttributes().getAttribute( CARRIER_MODE );
- if ( result == null ){
- return TransportMode.car ;
+ private static final String CARRIER_MODE = "carrierMode";
+
+ public static String getCarrierMode(Carrier carrier) {
+ String result = (String) carrier.getAttributes().getAttribute(CARRIER_MODE);
+ if (result == null) {
+ return TransportMode.car;
} else {
- return result ;
+ return result;
}
}
- public static void setCarrierMode( Carrier carrier, String carrierMode ) {
- carrier.getAttributes().putAttribute( CARRIER_MODE, carrierMode ) ;
+
+ public static void setCarrierMode(Carrier carrier, String carrierMode) {
+ carrier.getAttributes().putAttribute(CARRIER_MODE, carrierMode);
}
- private static final String JSPRIT_ITERATIONS="jspritIterations" ;
- public static int getJspritIterations( Carrier carrier ) {
- Integer result = (Integer) carrier.getAttributes().getAttribute( JSPRIT_ITERATIONS );
- if (result == null){
+ private static final String JSPRIT_ITERATIONS = "jspritIterations";
+
+ public static int getJspritIterations(Carrier carrier) {
+ Integer result = (Integer) carrier.getAttributes().getAttribute(JSPRIT_ITERATIONS);
+ if (result == null) {
log.error("Requested attribute jspritIterations does not exists. Will return " + Integer.MIN_VALUE);
return Integer.MIN_VALUE;
} else {
- return result ;
+ return result;
}
}
- public static void setJspritIterations( Carrier carrier, int jspritIterations ) {
- carrier.getAttributes().putAttribute( JSPRIT_ITERATIONS , jspritIterations ) ;
+ public static void setJspritIterations(Carrier carrier, int jspritIterations) {
+ carrier.getAttributes().putAttribute(JSPRIT_ITERATIONS, jspritIterations);
}
-
/**
* Runs jsprit and so solves the VehicleRoutingProblem (VRP) for all {@link Carriers}, doing the following steps:
- * - creating NetbasedCosts based on the network
- * - building and solving the VRP for all carriers using jsprit
- * - take the (best) solution, route and add it as {@link CarrierPlan} to the {@link Carrier}.
+ * - creating NetBasedCosts based on the network
+ * - building and solving the VRP for all carriers using jsprit
+ * - take the (best) solution, route and add it as {@link CarrierPlan} to the {@link Carrier}.
*
*
- * @param scenario
+ * @param scenario the scenario
* @throws ExecutionException, InterruptedException
*/
- public static void runJsprit(Scenario scenario) throws ExecutionException, InterruptedException{
- FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule( scenario.getConfig(), FreightCarriersConfigGroup.class );
+ public static void runJsprit(Scenario scenario) throws ExecutionException, InterruptedException {
+ CarrierSelectionForSolution usedCarriersSolutionType = CarrierSelectionForSolution.solveForAllCarriersAndOverrideExistingPlans;
+ log.warn("Running jsprit for all carriers with default solution type: {}", usedCarriersSolutionType);
+ log.warn("This will overwrite all existing plans of the carriers and create new solutions.");
+ runJsprit(scenario, usedCarriersSolutionType);
+ }
+
+ /**
+ * Runs jsprit and so solves the VehicleRoutingProblem (VRP) for all {@link Carriers}, doing the following steps:
+ * - creating NetBasedCosts based on the network
+ * - building and solving the VRP using jsprit for the carriers based on the selected CarrierSelectionForSolution
+ * - take the (best) solution, route and add it as {@link CarrierPlan} to the {@link Carrier}.
+ *
+ *
+ * @param scenario the scenario
+ * @param carriersSolutionType the type of which carriers should be solved
+ */
+ public static void runJsprit(Scenario scenario, CarrierSelectionForSolution carriersSolutionType) throws ExecutionException, InterruptedException {
+
+ // necessary to create FreightCarriersConfigGroup before submitting to ThreadPoolExecutor
+ ConfigUtils.addOrGetModule(scenario.getConfig(), FreightCarriersConfigGroup.class);
final NetworkBasedTransportCosts netBasedCosts = NetworkBasedTransportCosts.Builder.newInstance(
- scenario.getNetwork(), getCarrierVehicleTypes(scenario).getVehicleTypes().values() ).build() ;
+ scenario.getNetwork(), getCarrierVehicleTypes(scenario).getVehicleTypes().values()).build();
Carriers carriers = getCarriers(scenario);
HashMap, Integer> carrierActivityCounterMap = new HashMap<>();
// Fill carrierActivityCounterMap -> basis for sorting the carriers by number of activities before solving in parallel
+ // This also selects the carriers for which a new solution should be created
for (Carrier carrier : carriers.getCarriers().values()) {
+ switch (carriersSolutionType) {
+ case solveForAllCarriersAndOverrideExistingPlans -> carrier.clearPlans();
+ case solveOnlyForCarrierWithoutPlans -> {
+ if (!carrier.getPlans().isEmpty()) {
+ continue;
+ }
+ }
+ case solveForAllCarriersAndAddPLans -> {carrier.setSelectedPlan(null);} // Keep existing plan(s), but make them not selected.
+ default -> throw new IllegalStateException("Unexpected value: " + carriersSolutionType);
+ }
carrierActivityCounterMap.put(carrier.getId(), carrierActivityCounterMap.getOrDefault(carrier.getId(), 0) + carrier.getServices().size());
- carrierActivityCounterMap.put(carrier.getId(), carrierActivityCounterMap.getOrDefault(carrier.getId(), 0) + 2*carrier.getShipments().size());
+ carrierActivityCounterMap.put(carrier.getId(), carrierActivityCounterMap.getOrDefault(carrier.getId(), 0) + 2 * carrier.getShipments().size());
}
AtomicInteger startedVRPCounter = new AtomicInteger(0);
- int nThreads = Runtime.getRuntime().availableProcessors();
+ int nThreads = Runtime.getRuntime().availableProcessors();
log.info("Starting VRP solving for {} carriers in parallel with {} threads.", carriers.getCarriers().size(), nThreads);
ThreadPoolExecutor executor = new JspritTreadPoolExecutor(new PriorityBlockingQueue<>(), nThreads);
List> futures = new ArrayList<>();
List, Integer>> sorted = carrierActivityCounterMap.entrySet().stream()
- .sorted(Map.Entry.comparingByValue((o1, o2) -> o2 - o1))
- .toList();
+ .sorted(Map.Entry.comparingByValue((o1, o2) -> o2 - o1))
+ .toList();
- for (Map.Entry, Integer> entry : sorted){
- JspritCarrierTask task = new JspritCarrierTask(entry.getValue(), carriers.getCarriers().get(entry.getKey()), scenario, netBasedCosts, startedVRPCounter, carriers.getCarriers().size());
+ for (Map.Entry, Integer> entry : sorted) {
+ JspritCarrierTask task = new JspritCarrierTask(entry.getValue(), carriers.getCarriers().get(entry.getKey()), scenario, netBasedCosts,
+ startedVRPCounter, carriers.getCarriers().size());
log.info("Adding task for carrier {} with priority {}", entry.getKey(), entry.getValue());
- futures.add(executor.submit(task));
+ futures.add(executor.submit(task));
}
for (Future> future : futures) {
@@ -217,6 +266,37 @@ public static void runJsprit(Scenario scenario) throws ExecutionException, Inter
}
}
+ /**
+ * Checks if the selected plan handles all jobs of a carrier.
+ * The check is done only by counting the number of activities in the selected plan and compare them with the number of services or shipments of the carrier.
+ * @param carrier the carrier
+ */
+ public static boolean allJobsHandledBySelectedPlan(Carrier carrier) {
+ if (carrier.getSelectedPlan() == null) {
+ log.warn("Carrier {}: No selected plan available!", carrier.getId());
+ return false;
+ }
+ int planedJobs;
+ int handledJobs;
+ if (!carrier.getServices().isEmpty()) {
+ planedJobs = carrier.getServices().size();
+ handledJobs = carrier.getSelectedPlan().getScheduledTours().stream().mapToInt(
+ tour -> (int) tour.getTour().getTourElements().stream().filter(element -> element instanceof Tour.ServiceActivity).count()).sum();
+ } else {
+ planedJobs = carrier.getShipments().size();
+ handledJobs = carrier.getSelectedPlan().getScheduledTours().stream().mapToInt(
+ tour -> (int) tour.getTour().getTourElements().stream().filter(
+ element -> element instanceof Tour.ShipmentBasedActivity).count()).sum();
+ handledJobs = handledJobs / 2; // Shipment has two activities
+ }
+ if (planedJobs != handledJobs) {
+ log.warn("Carrier {}: {} of {} jobs were not handled!", carrier.getId(), planedJobs - handledJobs, planedJobs);
+ return false;
+ } else {
+ return true;
+ }
+ }
+
/**
* Creates a new {@link Carriers} container only with {@link CarrierShipment}s
* for creating a new VRP. As consequence of the transformation of
@@ -252,11 +332,11 @@ public static Carriers createShipmentVRPCarrierFromServiceVRPSolution(Carriers c
* @deprecated -- please inline. Reason: move syntax closer to how it is done in {@link ConfigUtils}.
*/
@Deprecated
- public static Carriers getOrCreateCarriers(Scenario scenario){
- return addOrGetCarriers( scenario );
+ public static Carriers getOrCreateCarriers(Scenario scenario) {
+ return addOrGetCarriers(scenario);
}
- public static Carriers addOrGetCarriers(Scenario scenario ) {
+ public static Carriers addOrGetCarriers(Scenario scenario) {
// I have separated getOrCreateCarriers and getCarriers, since when the
// controler is started, it is better to fail if the carriers are not found.
// kai, oct'19
@@ -271,9 +351,9 @@ public static Carriers addOrGetCarriers(Scenario scenario ) {
public static Carriers getCarriers(Scenario scenario) {
// I have separated getOrCreateCarriers and getCarriers, since when the controler is started, it is better to fail if the carriers are
// not found. kai, oct'19
- if ( scenario.getScenarioElement( CARRIERS ) == null ) {
- throw new RuntimeException( "cannot retrieve carriers from scenario; typical ways to resolve that problem are to call " +
- "CarrierControlerUtils.getOrCreateCarriers(...) or CarrierControlerUtils.loadCarriersAccordingToFreightConfig(...) early enough\n") ;
+ if (scenario.getScenarioElement(CARRIERS) == null) {
+ throw new RuntimeException("cannot retrieve carriers from scenario; typical ways to resolve that problem are to call " +
+ "CarrierControlerUtils.getOrCreateCarriers(...) or CarrierControlerUtils.loadCarriersAccordingToFreightConfig(...) early enough\n");
}
return (Carriers) scenario.getScenarioElement(CARRIERS);
}
@@ -290,16 +370,18 @@ public static CarrierVehicleTypes getCarrierVehicleTypes(Scenario scenario) {
/**
* Use if carriers and carrierVehicleTypes are set by input file
*
- * @param scenario
+ * @param scenario the scenario
*/
public static void loadCarriersAccordingToFreightConfig(Scenario scenario) {
FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule(scenario.getConfig(), FreightCarriersConfigGroup.class);
CarrierVehicleTypes vehTypes = getCarrierVehicleTypes(scenario);
- new CarrierVehicleTypeReader( vehTypes ).readURL( IOUtils.extendUrl(scenario.getConfig().getContext(), freightCarriersConfigGroup.getCarriersVehicleTypesFile()) );
+ new CarrierVehicleTypeReader(vehTypes).readURL(
+ IOUtils.extendUrl(scenario.getConfig().getContext(), freightCarriersConfigGroup.getCarriersVehicleTypesFile()));
- Carriers carriers = addOrGetCarriers( scenario ); // also registers with scenario
- new CarrierPlanXmlReader( carriers, vehTypes ).readURL( IOUtils.extendUrl(scenario.getConfig().getContext(), freightCarriersConfigGroup.getCarriersFile() ) );
+ Carriers carriers = addOrGetCarriers(scenario); // also registers with scenario
+ new CarrierPlanXmlReader(carriers, vehTypes).readURL(
+ IOUtils.extendUrl(scenario.getConfig().getContext(), freightCarriersConfigGroup.getCarriersFile()));
// new CarrierVehicleTypeLoader( carriers ).loadVehicleTypes( vehTypes );
}
@@ -350,22 +432,22 @@ private static void createShipmentsFromServices(Carrier carrierWS, Carrier carri
for (CarrierService carrierService : carrier.getServices().values()) {
log.debug("Converting CarrierService to CarrierShipment: {}", carrierService.getId());
CarrierShipment carrierShipment = CarrierShipment.Builder
- .newInstance(Id.create(carrierService.getId().toString(), CarrierShipment.class),
- depotServiceIsDeliveredFrom.get(carrierService.getId()), carrierService.getLocationLinkId(),
- carrierService.getCapacityDemand())
- .setDeliveryServiceTime(carrierService.getServiceDuration())
- // .setPickupServiceTime(pickupServiceTime) //Not set yet, because in service we
- // have now time for that. Maybe change it later, kmt sep18
- .setDeliveryTimeWindow(carrierService.getServiceStartTimeWindow())
- // Limited to end of delivery timeWindow (pickup later than the latest delivery is not useful).
- .setPickupTimeWindow(TimeWindow.newInstance(0.0, carrierService.getServiceStartTimeWindow().getEnd()))
- .build();
+ .newInstance(Id.create(carrierService.getId().toString(), CarrierShipment.class),
+ depotServiceIsDeliveredFrom.get(carrierService.getId()), carrierService.getLocationLinkId(),
+ carrierService.getCapacityDemand())
+ .setDeliveryServiceTime(carrierService.getServiceDuration())
+ // .setPickupServiceTime(pickupServiceTime) //Not set yet, because in service we
+ // have now time for that. Maybe change it later, kmt sep18
+ .setDeliveryTimeWindow(carrierService.getServiceStartTimeWindow())
+ // Limited to end of delivery timeWindow (pickup later than the latest delivery is not useful).
+ .setPickupTimeWindow(TimeWindow.newInstance(0.0, carrierService.getServiceStartTimeWindow().getEnd()))
+ .build();
addShipment(carrierWS, carrierShipment);
}
}
/**
- * Adds a skill to the vehicle's {@link org.matsim.vehicles.VehicleType}.
+ * Adds a skill to the vehicle's {@link VehicleType}.
*
* @param vehicleType the vehicle type to change;
* @param skill the skill.
@@ -380,8 +462,8 @@ public static void addSkill(VehicleType vehicleType, String skill) {
* @param type the {@link VehicleType};
* @param skill the free-form type skill.
* @return true
if the skill is in the skill set; or
- * false
if the skill is not in the skill set, or there is
- * no skill set available/set.
+ * false
if the skill is not in the skill set, or there is
+ * no skill set available/set.
*/
public static boolean hasSkill(VehicleType type, String skill) {
return hasSkill(type.getAttributes(), skill);
@@ -411,7 +493,7 @@ public static List getSkills(VehicleType type) {
}
/**
- * Adds a skill to the {@link com.graphhopper.jsprit.core.problem.job.Shipment}.
+ * Adds a skill to the {@link Shipment}.
*
* @param shipment the vehicle type to change;
* @param skill the skill.
@@ -426,8 +508,8 @@ public static void addSkill(CarrierShipment shipment, String skill) {
* @param shipment the {@link CarrierShipment};
* @param skill the free-form type skill.
* @return true
if the skill is in the skill set; or
- * false
if the skill is not in the skill set, or there is
- * no skill set available/set.
+ * false
if the skill is not in the skill set, or there is
+ * no skill set available/set.
*/
public static boolean hasSkill(CarrierShipment shipment, String skill) {
return hasSkill(shipment.getAttributes(), skill);
@@ -472,8 +554,8 @@ public static void addSkill(CarrierService service, String skill) {
* @param service the {@link CarrierService};
* @param skill the free-form type skill.
* @return true
if the skill is in the skill set; or
- * false
if the skill is not in the skill set, or there is
- * no skill set available/set.
+ * false
if the skill is not in the skill set, or there is
+ * no skill set available/set.
*/
public static boolean hasSkill(CarrierService service, String skill) {
return hasSkill(service.getAttributes(), skill);
@@ -527,8 +609,8 @@ private static void addSkill(Attributes attributes, String skill) {
* @param attributes the {@link Attributes} container to check for the skill;
* @param skill the free-form type skill.
* @return true
if the skill is in the skill set; or
- * false
if the skill is not in the skill set, or there is
- * no skill set available/set.
+ * false
if the skill is not in the skill set, or there is
+ * no skill set available/set.
*/
private static boolean hasSkill(Attributes attributes, String skill) {
if (attributes.getAttribute(ATTR_SKILLS) == null) {
@@ -544,7 +626,7 @@ private static boolean hasSkill(Attributes attributes, String skill) {
* @param attributes the {@link Attributes} container that is checked for the
* skill(s) to be converted.
* @return the {@link List} of skills, possibly empty, as parsed from the
- * attribute.
+ * attribute.
*/
private static List convertSkillsAttributeToList(Attributes attributes) {
if (attributes.getAttribute(ATTR_SKILLS) == null) {
@@ -566,23 +648,23 @@ private static void setSkills(Attributes attributes, Set skills) {
}
}
- public static Vehicle getVehicle(Plan plan ) {
- return (Vehicle) plan.getAttributes().getAttribute( CARRIER_VEHICLE );
+ public static Vehicle getVehicle(Plan plan) {
+ return (Vehicle) plan.getAttributes().getAttribute(CARRIER_VEHICLE);
}
- public static void putVehicle(Plan plan, Vehicle vehicle ){
- plan.getAttributes().putAttribute( CARRIER_VEHICLE, vehicle );
+ public static void putVehicle(Plan plan, Vehicle vehicle) {
+ plan.getAttributes().putAttribute(CARRIER_VEHICLE, vehicle);
}
- public static void setJspritScore(CarrierPlan plan, Double jspritScore){
+ public static void setJspritScore(CarrierPlan plan, Double jspritScore) {
plan.getAttributes().putAttribute(ATTR_JSPRIT_SCORE, jspritScore);
}
- public static Double getJspritScore (CarrierPlan plan) {
+ public static Double getJspritScore(CarrierPlan plan) {
return (Double) plan.getAttributes().getAttribute(ATTR_JSPRIT_SCORE);
}
- public static double getJspritComputationTime(Carrier carrier){
+ public static double getJspritComputationTime(Carrier carrier) {
try {
return (double) carrier.getAttributes().getAttribute(ATTR_JSPRIT_Time);
} catch (Exception e) {
@@ -590,15 +672,16 @@ public static double getJspritComputationTime(Carrier carrier){
return Integer.MIN_VALUE;
}
}
- public static void setJspritComputationTime(Carrier carrier, double time){
+
+ public static void setJspritComputationTime(Carrier carrier, double time) {
carrier.getAttributes().putAttribute(ATTR_JSPRIT_Time, time);
}
- public static void writeCarriers(Carriers carriers, String filename ) {
- new CarrierPlanWriter( carriers ).write( filename );
+ public static void writeCarriers(Carriers carriers, String filename) {
+ new CarrierPlanWriter(carriers).write(filename);
}
- static class JspritCarrierTask implements Runnable{
+ static class JspritCarrierTask implements Runnable {
private final int priority;
private final Carrier carrier;
private final Scenario scenario;
@@ -606,7 +689,8 @@ static class JspritCarrierTask implements Runnable{
private final AtomicInteger startedVRPCounter;
private final int taskCount;
- public JspritCarrierTask(int priority, Carrier carrier, Scenario scenario, NetworkBasedTransportCosts netBasedCosts, AtomicInteger startedVRPCounter, int taskCount) {
+ public JspritCarrierTask(int priority, Carrier carrier, Scenario scenario, NetworkBasedTransportCosts netBasedCosts,
+ AtomicInteger startedVRPCounter, int taskCount) {
this.priority = priority;
this.carrier = carrier;
this.scenario = scenario;
@@ -621,7 +705,8 @@ public int getPriority() {
@Override
public void run() {
- FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule( scenario.getConfig(), FreightCarriersConfigGroup.class );
+ FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule(scenario.getConfig(),
+ FreightCarriersConfigGroup.class);
double start = System.currentTimeMillis();
if (!carrier.getServices().isEmpty())
@@ -630,11 +715,13 @@ else if (!carrier.getShipments().isEmpty())
log.info("Start tour planning for {} which has {} shipments", carrier.getId(), carrier.getShipments().size());
startedVRPCounter.incrementAndGet();
- log.info("started VRP solving for carrier number {} out of {} carriers. Thread id: {}. Priority: {}", startedVRPCounter.get(), taskCount, Thread.currentThread().getId(), this.priority);
+ log.info("started VRP solving for carrier number {} out of {} carriers. Thread id: {}. Priority: {}", startedVRPCounter.get(), taskCount,
+ Thread.currentThread().threadId(), this.priority);
VehicleRoutingProblem problem = MatsimJspritFactory.createRoutingProblemBuilder(carrier, scenario.getNetwork())
- .setRoutingCost(netBasedCosts).build();
- VehicleRoutingAlgorithm algorithm = MatsimJspritFactory.loadOrCreateVehicleRoutingAlgorithm(scenario, freightCarriersConfigGroup, netBasedCosts, problem);
+ .setRoutingCost(netBasedCosts).build();
+ VehicleRoutingAlgorithm algorithm = MatsimJspritFactory.loadOrCreateVehicleRoutingAlgorithm(scenario, freightCarriersConfigGroup,
+ netBasedCosts, problem);
algorithm.getAlgorithmListeners().addListener(new StopWatch(), VehicleRoutingAlgorithmListeners.Priority.HIGH);
int jspritIterations = getJspritIterations(carrier);
@@ -661,16 +748,18 @@ else if (!carrier.getShipments().isEmpty())
NetworkRouter.routePlan(newPlan, netBasedCosts);
double timeForPlanningAndRouting = (System.currentTimeMillis() - start) / 1000;
log.info("routing for carrier {} finished. Tour planning plus routing took {} seconds. Thread id: {}", carrier.getId(),
- timeForPlanningAndRouting, Thread.currentThread().getId());
+ timeForPlanningAndRouting, Thread.currentThread().threadId());
- carrier.setSelectedPlan(newPlan);
+ carrier.addPlan(newPlan);
setJspritComputationTime(carrier, timeForPlanningAndRouting);
+ if (!allJobsHandledBySelectedPlan(carrier))
+ log.warn("Not all jobs of carrier {} are handled by the selected plan.", carrier.getId());
}
}
// we need this class because otherwise there is a runtime error in the PriorityBlockingQueue
// https://jvmaware.com/priority-queue-and-threadpool/
- private static class JspritTreadPoolExecutor extends ThreadPoolExecutor{
+ private static class JspritTreadPoolExecutor extends ThreadPoolExecutor {
public JspritTreadPoolExecutor(BlockingQueue workQueue, int nThreads) {
super(nThreads, nThreads, 0, TimeUnit.SECONDS, workQueue);
}
@@ -681,7 +770,7 @@ protected RunnableFuture newTaskFor(Runnable runnable, T value) {
}
}
- private static class CustomFutureTask extends FutureTask implements Comparable>{
+ private static class CustomFutureTask extends FutureTask implements Comparable> {
private final JspritCarrierTask task;
public CustomFutureTask(Runnable task) {
diff --git a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java
similarity index 79%
rename from contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java
rename to contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java
index 7e858ee725d..7de5125e51e 100644
--- a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierLoadAnalysis.java
@@ -25,11 +25,11 @@
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.Scenario;
-import org.matsim.api.core.v01.events.Event;
import org.matsim.freight.carriers.Carriers;
import org.matsim.freight.carriers.events.CarrierShipmentDeliveryStartEvent;
import org.matsim.freight.carriers.events.CarrierShipmentPickupStartEvent;
-import org.matsim.core.events.handler.BasicEventHandler;
+import org.matsim.freight.carriers.events.eventhandler.CarrierShipmentDeliveryStartEventHandler;
+import org.matsim.freight.carriers.events.eventhandler.CarrierShipmentPickupStartEventHandler;
import org.matsim.vehicles.Vehicle;
import org.matsim.vehicles.VehicleType;
import org.matsim.vehicles.VehicleUtils;
@@ -37,6 +37,7 @@
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
+import java.nio.file.Path;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@@ -47,27 +48,21 @@
/**
* @author Kai Martins-Turner (kturner)
*/
-public class CarrierLoadAnalysis implements BasicEventHandler {
+public class CarrierLoadAnalysis implements CarrierShipmentPickupStartEventHandler, CarrierShipmentDeliveryStartEventHandler {
private static final Logger log = LogManager.getLogger(CarrierLoadAnalysis.class);
-
+ private final String delimiter;
Carriers carriers;
private final Map, LinkedList> vehicle2Load = new LinkedHashMap<>();
- public CarrierLoadAnalysis(Carriers carriers) {
+ public CarrierLoadAnalysis(String delimiter, Carriers carriers) {
+ this.delimiter = delimiter;
this.carriers = carriers;
}
- @Override public void handleEvent(Event event) {
- if (event.getEventType().equals(CarrierShipmentPickupStartEvent.EVENT_TYPE)) {
- handlePickup( event);
- } if (event.getEventType().equals(CarrierShipmentDeliveryStartEvent.EVENT_TYPE)) {
- handleDelivery(event);
- }
- }
-
- private void handlePickup(Event event) {
+ @Override
+ public void handleEvent(CarrierShipmentPickupStartEvent event) {
Id vehicleId = Id.createVehicleId(event.getAttributes().get("vehicle"));
Integer demand = Integer.valueOf(event.getAttributes().get(ATTRIBUTE_CAPACITYDEMAND));
@@ -82,8 +77,8 @@ private void handlePickup(Event event) {
vehicle2Load.put(vehicleId, list);
}
-
- private void handleDelivery(Event event) {
+ @Override
+ public void handleEvent(CarrierShipmentDeliveryStartEvent event) {
Id vehicleId = Id.createVehicleId(event.getAttributes().get("vehicle"));
Integer demand = Integer.valueOf(event.getAttributes().get(ATTRIBUTE_CAPACITYDEMAND));
@@ -95,12 +90,15 @@ private void handleDelivery(Event event) {
void writeLoadPerVehicle(String analysisOutputDirectory, Scenario scenario) throws IOException {
log.info("Writing out vehicle load analysis ...");
//Load per vehicle
- String fileName = analysisOutputDirectory + "Load_perVehicle.tsv";
+ String fileName = Path.of(analysisOutputDirectory).resolve("Load_perVehicle.tsv").toString();
BufferedWriter bw1 = new BufferedWriter(new FileWriter(fileName));
//Write headline:
- bw1.write("vehicleId \t capacity \t maxLoad \t load state during tour");
+ bw1.write(String.join(delimiter,"vehicleId",
+ "capacity",
+ "maxLoad",
+ "load state during tour"));
bw1.newLine();
for (Id vehicleId : vehicle2Load.keySet()) {
@@ -112,13 +110,13 @@ void writeLoadPerVehicle(String analysisOutputDirectory, Scenario scenario) thro
final Double capacity = vehicleType.getCapacity().getOther();
bw1.write(vehicleId.toString());
- bw1.write("\t" + capacity);
- bw1.write("\t" + maxLoad);
- bw1.write("\t" + load);
+ bw1.write(delimiter + capacity);
+ bw1.write(delimiter + maxLoad);
+ bw1.write(delimiter + load);
bw1.newLine();
}
bw1.close();
- log.info("Output written to " + fileName);
+ log.info("Output written to {}", fileName);
}
}
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java
new file mode 100644
index 00000000000..aeec93fd605
--- /dev/null
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java
@@ -0,0 +1,157 @@
+/*
+ * *********************************************************************** *
+ * project: org.matsim.*
+ * *********************************************************************** *
+ * *
+ * copyright : (C) by the members listed in the COPYING, *
+ * LICENSE and WARRANTY file. *
+ * email : info at matsim dot org *
+ * *
+ * *********************************************************************** *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * See also COPYING, LICENSE and WARRANTY file *
+ * *
+ * ***********************************************************************
+ *
+ */
+
+package org.matsim.freight.carriers.analysis;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.matsim.api.core.v01.Id;
+import org.matsim.core.utils.misc.Time;
+import org.matsim.freight.carriers.*;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.TreeMap;
+
+/**
+ * Some basic analysis / data collection for {@link Carriers}(files)
+ *
+ * For all carriers it writes out the:
+ * - score of the selected plan
+ * - number of tours (= vehicles) of the selected plan
+ * - number of Services (input)
+ * - number of Services (handled)
+ * - number of shipments (input)
+ * - number of shipments (handled)
+ * - number of not handled jobs
+ * - number of planned demand size
+ * - number of handled demand size
+ * to a tsv-file.
+ *
+ * @author Kai Martins-Turner (kturner), Ricardo Ewert
+ */
+public class CarrierPlanAnalysis {
+
+ private static final Logger log = LogManager.getLogger(CarrierPlanAnalysis.class);
+ public final String delimiter;
+
+ Carriers carriers;
+
+ public CarrierPlanAnalysis(String delimiter, Carriers carriers) {
+ this.delimiter = delimiter;
+ this.carriers = carriers;
+ }
+
+ public void runAnalysisAndWriteStats(String analysisOutputDirectory) throws IOException {
+ log.info("Writing out carrier analysis ...");
+ //Load per vehicle
+ String fileName = Path.of(analysisOutputDirectory).resolve("Carrier_stats.tsv").toString();
+
+ try (BufferedWriter bw1 = new BufferedWriter(new FileWriter(fileName))) {
+
+ //Write headline:
+ bw1.write(String.join(delimiter,
+ "carrierId",
+ "MATSimScoreSelectedPlan",
+ "jSpritScoreSelectedPlan",
+ "nuOfTours",
+ "nuOfShipments(input)",
+ "nuOfShipments(handled)",
+ "nuOfServices(input)",
+ "nuOfServices(handled)",
+ "noOfNotHandledJobs",
+ "nuOfPlanedDemandSize",
+ "nuOfHandledDemandSize",
+ "jspritComputationTime[HH:mm:ss]"
+ ));
+ bw1.newLine();
+
+ final TreeMap, Carrier> sortedCarrierMap = new TreeMap<>(carriers.getCarriers());
+
+ for (Carrier carrier : sortedCarrierMap.values()) {
+
+ int numberOfPlanedShipments = carrier.getShipments().size();
+ int numberOfPlanedServices = carrier.getServices().size();
+ int numberOfHandledPickups = (int) carrier.getSelectedPlan().getScheduledTours().stream().mapToDouble(
+ t -> t.getTour().getTourElements().stream().filter(te -> te instanceof Tour.Pickup).count()).sum();
+ int numberOfHandledDeliveries = (int) carrier.getSelectedPlan().getScheduledTours().stream().mapToDouble(
+ t -> t.getTour().getTourElements().stream().filter(te -> te instanceof Tour.Delivery).count()).sum();
+ int nuOfServiceHandled = (int) carrier.getSelectedPlan().getScheduledTours().stream().mapToDouble(
+ t -> t.getTour().getTourElements().stream().filter(te -> te instanceof Tour.ServiceActivity).count()).sum();
+ int numberOfPlanedDemandSize;
+ int numberOfHandledDemandSize;
+ int notHandledJobs;
+ if (numberOfPlanedShipments > 0) {
+ numberOfPlanedDemandSize = carrier.getShipments().values().stream().mapToInt(CarrierShipment::getSize).sum();
+ numberOfHandledDemandSize = carrier.getSelectedPlan().getScheduledTours().stream().mapToInt(
+ t -> t.getTour().getTourElements().stream().filter(te -> te instanceof Tour.Pickup).mapToInt(
+ te -> (((Tour.Pickup) te).getShipment().getSize())).sum()).sum();
+ notHandledJobs = numberOfPlanedShipments - numberOfHandledPickups;
+ } else {
+ numberOfPlanedDemandSize = carrier.getServices().values().stream().mapToInt(CarrierService::getCapacityDemand).sum();
+ numberOfHandledDemandSize = carrier.getSelectedPlan().getScheduledTours().stream().mapToInt(
+ t -> t.getTour().getTourElements().stream().filter(te -> te instanceof Tour.ServiceActivity).mapToInt(
+ te -> ((Tour.ServiceActivity) te).getService().getCapacityDemand()).sum()).sum();
+ notHandledJobs = numberOfPlanedServices - nuOfServiceHandled;
+ }
+
+ if (numberOfPlanedServices != nuOfServiceHandled) {
+ log.warn("Number of services in input and handled are not equal for carrier {}. Jobs Input: {}, Jobs Handled: {}",
+ carrier.getId(), numberOfPlanedServices, nuOfServiceHandled);
+ }
+ if (numberOfPlanedShipments != numberOfHandledPickups) {
+ log.warn("Number of shipments in input and handled are not equal for carrier {}. Jobs Input: {}, Jobs Handled: {}",
+ carrier.getId(), numberOfPlanedShipments, numberOfHandledPickups);
+ }
+ if (numberOfHandledDeliveries != numberOfHandledPickups) {
+ log.warn(
+ "Number of handled pickups and deliveries are not equal for carrier {}. Pickups: {}, Deliveries: {}. This should not happen!!",
+ carrier.getId(), numberOfHandledPickups, numberOfHandledDeliveries);
+ }
+ bw1.write(carrier.getId().toString());
+ bw1.write(delimiter + carrier.getSelectedPlan().getScore());
+ bw1.write(delimiter + carrier.getSelectedPlan().getJspritScore());
+ bw1.write(delimiter + carrier.getSelectedPlan().getScheduledTours().size());
+ bw1.write(delimiter + numberOfPlanedShipments);
+ bw1.write(delimiter + numberOfHandledPickups);
+ bw1.write(delimiter + numberOfPlanedServices);
+ bw1.write(delimiter + nuOfServiceHandled);
+ bw1.write(delimiter + notHandledJobs);
+ bw1.write(delimiter + numberOfPlanedDemandSize);
+ bw1.write(delimiter + numberOfHandledDemandSize);
+ if (CarriersUtils.getJspritComputationTime(carrier) != Integer.MIN_VALUE)
+ bw1.write(delimiter + Time.writeTime(CarriersUtils.getJspritComputationTime(carrier), Time.TIMEFORMAT_HHMMSS));
+ else
+ bw1.write(delimiter + "null");
+
+ bw1.newLine();
+ }
+
+ bw1.close();
+ log.info("Output written to {}", fileName);
+ } catch (IOException e) {
+ log.error("Error writing output to file: {}", fileName);
+ throw e;
+ }
+ }
+}
diff --git a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java
similarity index 70%
rename from contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java
rename to contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java
index 3037716368c..c62863465d5 100644
--- a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/FreightTimeAndDistanceAnalysisEventsHandler.java
@@ -25,17 +25,21 @@
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.Scenario;
-import org.matsim.api.core.v01.events.Event;
import org.matsim.api.core.v01.events.LinkEnterEvent;
import org.matsim.api.core.v01.events.LinkLeaveEvent;
import org.matsim.api.core.v01.events.VehicleEntersTrafficEvent;
import org.matsim.api.core.v01.events.VehicleLeavesTrafficEvent;
+import org.matsim.api.core.v01.events.handler.LinkEnterEventHandler;
+import org.matsim.api.core.v01.events.handler.LinkLeaveEventHandler;
+import org.matsim.api.core.v01.events.handler.VehicleEntersTrafficEventHandler;
+import org.matsim.api.core.v01.events.handler.VehicleLeavesTrafficEventHandler;
import org.matsim.freight.carriers.Carrier;
import org.matsim.freight.carriers.CarriersUtils;
import org.matsim.freight.carriers.Tour;
import org.matsim.freight.carriers.events.CarrierTourEndEvent;
import org.matsim.freight.carriers.events.CarrierTourStartEvent;
-import org.matsim.core.events.handler.BasicEventHandler;
+import org.matsim.freight.carriers.events.eventhandler.CarrierTourEndEventHandler;
+import org.matsim.freight.carriers.events.eventhandler.CarrierTourStartEventHandler;
import org.matsim.vehicles.Vehicle;
import org.matsim.vehicles.VehicleType;
import org.matsim.vehicles.VehicleUtils;
@@ -43,6 +47,7 @@
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
+import java.nio.file.Path;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;
@@ -50,9 +55,10 @@
/**
* @author Kai Martins-Turner (kturner)
*/
-public class FreightTimeAndDistanceAnalysisEventsHandler implements BasicEventHandler {
+public class FreightTimeAndDistanceAnalysisEventsHandler implements CarrierTourStartEventHandler, CarrierTourEndEventHandler, LinkEnterEventHandler, LinkLeaveEventHandler, VehicleEntersTrafficEventHandler, VehicleLeavesTrafficEventHandler {
private final static Logger log = LogManager.getLogger(FreightTimeAndDistanceAnalysisEventsHandler.class);
+ private final String delimiter;
private final Scenario scenario;
private final Map, Double> vehicleId2TourDuration = new LinkedHashMap<>();
@@ -74,21 +80,24 @@ public class FreightTimeAndDistanceAnalysisEventsHandler implements BasicEventHa
private final Map, Double> vehicleEnteredLinkTime = new LinkedHashMap<>();
- public FreightTimeAndDistanceAnalysisEventsHandler(Scenario scenario) {
+ public FreightTimeAndDistanceAnalysisEventsHandler(String delimiter, Scenario scenario) {
+ this.delimiter = delimiter;
this.scenario = scenario;
}
- private void handleEvent(CarrierTourStartEvent event) {
+ @Override
+ public void handleEvent(CarrierTourStartEvent event) {
// Save time of freight tour start
final String key = event.getCarrierId().toString() + "_" + event.getTourId().toString();
tourStartTime.put(key, event.getTime());
}
//Fix costs for vehicle usage
- private void handleEvent(CarrierTourEndEvent event) {
+ @Override
+ public void handleEvent(CarrierTourEndEvent event) {
final String key = event.getCarrierId().toString() + "_" + event.getTourId().toString();
double tourDuration = event.getTime() - tourStartTime.get(key);
- vehicleId2TourDuration.put(event.getVehicleId(), tourDuration);
+ vehicleId2TourDuration.put(event.getVehicleId(), tourDuration); //TODO, check if this may overwrite old data and if this is intended to do so
VehicleType vehType = VehicleUtils.findVehicle(event.getVehicleId(), scenario).getType();
vehicleTypeId2SumOfTourDuration.merge(vehType.getId(), tourDuration, Double::sum);
@@ -99,7 +108,13 @@ private void handleEvent(CarrierTourEndEvent event) {
vehicleId2VehicleType.putIfAbsent(event.getVehicleId(), vehType);
}
- private void handleEvent(LinkEnterEvent event) {
+ @Override
+ public void handleEvent(VehicleEntersTrafficEvent event){
+ vehicleEnteredLinkTime.put(event.getVehicleId(), event.getTime());
+ }
+
+ @Override
+ public void handleEvent(LinkEnterEvent event) {
final double distance = scenario.getNetwork().getLinks().get(event.getLinkId()).getLength();
vehicleId2TourLength.merge(event.getVehicleId(), distance, Double::sum);
vehicleEnteredLinkTime.put(event.getVehicleId(), event.getTime()); //Safe time when entering the link.
@@ -109,7 +124,8 @@ private void handleEvent(LinkEnterEvent event) {
}
//If the vehicle leaves a link at the end, the travelTime is calculated and stored.
- private void handleEvent(LinkLeaveEvent event){
+ @Override
+ public void handleEvent(LinkLeaveEvent event){
final Id vehicleId = event.getVehicleId();
if (vehicleEnteredLinkTime.containsKey(vehicleId)){
double tt = event.getTime() - vehicleEnteredLinkTime.get(vehicleId);
@@ -123,7 +139,8 @@ private void handleEvent(LinkLeaveEvent event){
}
//If the vehicle leaves a link because it reached its destination, the travelTime is calculated and stored.
- private void handleEvent(VehicleLeavesTrafficEvent event){
+ @Override
+ public void handleEvent(VehicleLeavesTrafficEvent event){
final Id vehicleId = event.getVehicleId();
if (vehicleEnteredLinkTime.containsKey(vehicleId)){
double tt = event.getTime() - vehicleEnteredLinkTime.get(vehicleId);
@@ -136,39 +153,31 @@ private void handleEvent(VehicleLeavesTrafficEvent event){
}
}
- private void handleEvent(VehicleEntersTrafficEvent event){
- vehicleEnteredLinkTime.put(event.getVehicleId(), event.getTime());
- }
-
- @Override public void handleEvent(Event event) {
- if (event instanceof CarrierTourStartEvent carrierTourStartEvent) {
- handleEvent(carrierTourStartEvent);
- } else if (event instanceof CarrierTourEndEvent carrierTourEndEvent) {
- handleEvent(carrierTourEndEvent);
- } else if (event instanceof LinkEnterEvent linkEnterEvent) {
- handleEvent(linkEnterEvent);
- } else if (event instanceof LinkLeaveEvent linkLeaveEvent) {
- handleEvent(linkLeaveEvent);
- } else if (event instanceof VehicleLeavesTrafficEvent vehicleLeavesTrafficEvent) {
- handleEvent(vehicleLeavesTrafficEvent);
- } else if (event instanceof VehicleEntersTrafficEvent vehicleEntersTrafficEvent) {
- handleEvent(vehicleEntersTrafficEvent);
- }
- }
-
void writeTravelTimeAndDistancePerVehicle(String analysisOutputDirectory, Scenario scenario) throws IOException {
log.info("Writing out Time & Distance & Costs ... perVehicle");
//Travel time and distance per vehicle
- String fileName = analysisOutputDirectory + "TimeDistance_perVehicle.tsv";
+ String fileName = Path.of(analysisOutputDirectory).resolve("TimeDistance_perVehicle.tsv").toString();
BufferedWriter bw1 = new BufferedWriter(new FileWriter(fileName));
//Write headline:
- bw1.write("vehicleId \t carrierId \t vehicleTypeId \t tourId \t "
- + "tourDuration[s] \t tourDuration[h] \t"
- + "travelDistance[m] \t travelDistance[km] \t " +
- "travelTime[s] \t travelTime[h] \t" +
- "costPerSecond[EUR/s] \t costPerMeter[EUR/m] \t fixedCosts[EUR] \t varCostsTime[EUR] \t varCostsDist[EUR] \t totalCosts[EUR]");
+ bw1.write(String.join(delimiter,
+ "vehicleId",
+ "carrierId",
+ "vehicleTypeId",
+ "tourId",
+ "tourDuration[s]",
+ "tourDuration[h]",
+ "travelDistance[m]",
+ "travelDistance[km]",
+ "travelTime[s]",
+ "travelTime[h]",
+ "costPerSecond[EUR/s]",
+ "costPerMeter[EUR/m]",
+ "fixedCosts[EUR]",
+ "varCostsTime[EUR]",
+ "varCostsDist[EUR]",
+ "totalCosts[EUR]"));
bw1.newLine();
for (Id vehicleId : vehicleId2VehicleType.keySet()) {
@@ -188,34 +197,33 @@ void writeTravelTimeAndDistancePerVehicle(String analysisOutputDirectory, Scenar
final double totalVehCosts = fixedCost + varCostsTime + varCostsDist;
bw1.write(vehicleId.toString());
- bw1.write("\t" + vehicleId2CarrierId.get(vehicleId));
- bw1.write("\t" + vehicleType.getId().toString());
- bw1.write("\t" + vehicleId2TourId.get(vehicleId));
+ bw1.write(delimiter + vehicleId2CarrierId.get(vehicleId));
+ bw1.write(delimiter + vehicleType.getId().toString());
+ bw1.write(delimiter + vehicleId2TourId.get(vehicleId));
- bw1.write("\t" + durationInSeconds);
- bw1.write("\t" + durationInSeconds /3600);
+ bw1.write(delimiter + durationInSeconds);
+ bw1.write(delimiter + durationInSeconds /3600);
- bw1.write("\t" + distanceInMeters);
- bw1.write("\t" + distanceInMeters/1000);
+ bw1.write(delimiter + distanceInMeters);
+ bw1.write(delimiter + distanceInMeters/1000);
- bw1.write("\t" + travelTimeInSeconds);
- bw1.write("\t" + travelTimeInSeconds /3600);
+ bw1.write(delimiter + travelTimeInSeconds);
+ bw1.write(delimiter + travelTimeInSeconds /3600);
- bw1.write("\t" + costsPerSecond);
- bw1.write("\t" + costsPerMeter);
- bw1.write("\t" + fixedCost);
- bw1.write("\t" + varCostsTime);
- bw1.write("\t" + varCostsDist);
- bw1.write("\t" + totalVehCosts);
+ bw1.write(delimiter + costsPerSecond);
+ bw1.write(delimiter + costsPerMeter);
+ bw1.write(delimiter + fixedCost);
+ bw1.write(delimiter + varCostsTime);
+ bw1.write(delimiter + varCostsDist);
+ bw1.write(delimiter + totalVehCosts);
bw1.newLine();
}
bw1.close();
- log.info("Output written to " + fileName);
+ log.info("Output written to {}", fileName);
}
-
void writeTravelTimeAndDistancePerVehicleType(String analysisOutputDirectory, Scenario scenario) throws IOException {
log.info("Writing out Time & Distance & Costs ... perVehicleType");
@@ -226,16 +234,26 @@ void writeTravelTimeAndDistancePerVehicleType(String analysisOutputDirectory, Sc
vehicleTypesMap.putIfAbsent(vehicleType.getId(), vehicleType);
}
- String fileName = analysisOutputDirectory + "TimeDistance_perVehicleType.tsv";
+ String fileName = Path.of(analysisOutputDirectory).resolve("TimeDistance_perVehicleType.tsv").toString();
BufferedWriter bw1 = new BufferedWriter(new FileWriter(fileName));
//Write headline:
- bw1.write("vehicleTypeId \t nuOfVehicles \t " +
- "SumOfTourDuration[s] \t SumOfTourDuration[h] \t" +
- "SumOfTravelDistances[m] \t SumOfTravelDistances[km] \t " +
- "SumOfTravelTime[s] \t SumOfTravelTime[h] \t" +
- "costPerSecond[EUR/s] \t costPerMeter[EUR/m] \t fixedCosts[EUR/veh] \t" +
- "varCostsTime[EUR] \t varCostsDist[EUR] \t fixedCosts[EUR] \t totalCosts[EUR]");
+ bw1.write(String.join(delimiter,
+ "vehicleTypeId",
+ "nuOfVehicles",
+ "SumOfTourDuration[s]",
+ "SumOfTourDuration[h]",
+ "SumOfTravelDistances[m]",
+ "SumOfTravelDistances[km]",
+ "SumOfTravelTime[s]",
+ "SumOfTravelTime[h]",
+ "costPerSecond[EUR/s]",
+ "costPerMeter[EUR/m]",
+ "fixedCosts[EUR/veh]",
+ "varCostsTime[EUR]",
+ "varCostsDist[EUR]",
+ "fixedCosts[EUR]",
+ "totalCosts[EUR]"));
bw1.newLine();
for (VehicleType vehicleType : vehicleTypesMap.values()) {
@@ -255,25 +273,25 @@ void writeTravelTimeAndDistancePerVehicleType(String analysisOutputDirectory, Sc
bw1.write(vehicleType.getId().toString());
- bw1.write("\t" + nuOfVehicles);
- bw1.write("\t" + sumOfTourDurationInSeconds);
- bw1.write("\t" + sumOfTourDurationInSeconds / 3600);
- bw1.write("\t" + sumOfDistanceInMeters);
- bw1.write("\t" + sumOfDistanceInMeters / 1000);
- bw1.write("\t" + sumOfTravelTimeInSeconds);
- bw1.write("\t" + sumOfTravelTimeInSeconds / 3600);
- bw1.write("\t" + costRatePerSecond);
- bw1.write("\t" + costRatePerMeter);
- bw1.write("\t" + fixedCostPerVeh);
- bw1.write("\t" + sumOfVarCostsTime);
- bw1.write("\t" + sumOfVarCostsDistance);
- bw1.write("\t" + sumOfFixCosts);
- bw1.write("\t" + (sumOfFixCosts + sumOfVarCostsTime + sumOfVarCostsDistance));
+ bw1.write(delimiter + nuOfVehicles);
+ bw1.write(delimiter + sumOfTourDurationInSeconds);
+ bw1.write(delimiter + sumOfTourDurationInSeconds / 3600);
+ bw1.write(delimiter + sumOfDistanceInMeters);
+ bw1.write(delimiter + sumOfDistanceInMeters / 1000);
+ bw1.write(delimiter + sumOfTravelTimeInSeconds);
+ bw1.write(delimiter + sumOfTravelTimeInSeconds / 3600);
+ bw1.write(delimiter + costRatePerSecond);
+ bw1.write(delimiter + costRatePerMeter);
+ bw1.write(delimiter + fixedCostPerVeh);
+ bw1.write(delimiter + sumOfVarCostsTime);
+ bw1.write(delimiter + sumOfVarCostsDistance);
+ bw1.write(delimiter + sumOfFixCosts);
+ bw1.write(delimiter + (sumOfFixCosts + sumOfVarCostsTime + sumOfVarCostsDistance));
bw1.newLine();
}
bw1.close();
- log.info("Output written to " + fileName);
+ log.info("Output written to {}", fileName);
}
}
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java
new file mode 100644
index 00000000000..751e96a2f45
--- /dev/null
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java
@@ -0,0 +1,189 @@
+/*
+ * *********************************************************************** *
+ * project: org.matsim.*
+ * *********************************************************************** *
+ * *
+ * copyright : (C) by the members listed in the COPYING, *
+ * LICENSE and WARRANTY file. *
+ * email : info at matsim dot org *
+ * *
+ * *********************************************************************** *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * See also COPYING, LICENSE and WARRANTY file *
+ * *
+ * ***********************************************************************
+ *
+ */
+
+package org.matsim.freight.carriers.analysis;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.matsim.api.core.v01.Scenario;
+import org.matsim.core.api.experimental.events.EventsManager;
+import org.matsim.core.config.Config;
+import org.matsim.core.config.ConfigUtils;
+import org.matsim.core.events.EventsUtils;
+import org.matsim.core.events.MatsimEventsReader;
+import org.matsim.core.scenario.ScenarioUtils;
+import org.matsim.freight.carriers.Carrier;
+import org.matsim.freight.carriers.Carriers;
+import org.matsim.freight.carriers.CarriersUtils;
+import org.matsim.freight.carriers.FreightCarriersConfigGroup;
+import org.matsim.freight.carriers.events.CarrierEventsReaders;
+
+import java.io.File;
+import java.io.IOException;
+
+//import static org.matsim.application.ApplicationUtils.globFile;
+
+
+/**
+ * A first approach for some analysis based on the freight events introduced in 2022/23.
+ * This class comes from teaching SimGV in the winter term 2022/23.
+ *
+ * This class should get extended and prepared as a standardized analysis for freight output.
+ * This should also get aligned with the current development in Simwrapper.
+ * Todo: Add some tests.
+ *
+ * @author kturner (Kai Martins-Turner)
+ */
+public class RunFreightAnalysisEventBased {
+
+ private static final Logger log = LogManager.getLogger(RunFreightAnalysisEventBased.class);
+
+ //Where is your simulation output, that should be analysed?
+ private String EVENTS_PATH = null;
+ private final String ANALYSIS_OUTPUT_PATH;
+ private Scenario scenario = null;
+ private Carriers carriers = null;
+ private final String delimiter = "\t";
+
+ //TODO discuss renaming without EventBased. If this becomes the standard carrier output
+ /**
+ * This constructor automatically searches for the necessary output file in a simulation run output.
+ *
+ * @param simOutputPath The output directory of the simulation run
+ * @param analysisOutputPath The directory where the result of the analysis should go to
+ * @param globalCrs The CRS of the simulation
+ */
+ public RunFreightAnalysisEventBased(String simOutputPath, String analysisOutputPath, String globalCrs) {
+
+ this.ANALYSIS_OUTPUT_PATH = analysisOutputPath;
+// this.EVENTS_PATH = globFile(simOutputPath, "*output_events.*");
+// Path vehiclesPath = globFile(simOutputPath, "*output_allVehicles.*");
+// Path networkPath = globFile(simOutputPath, "*output_network.*");
+// Path carriersPath = globFile(simOutputPath, "*output_carriers.*");
+// Path carriersVehicleTypesPath = globFile(simOutputPath, "*output_carriersVehicleTypes.*");
+
+// this.EVENTS_PATH = simOutputPath.resolve("*output_events.xml.gz");
+// Path vehiclesPath = simOutputPath.resolve("*output_allVehicles.xml.gz");
+// Path networkPath = simOutputPath.resolve("*output_network.xml.gz");
+// Path carriersPath = simOutputPath.resolve("*output_carriers.xml.gz");
+// Path carriersVehicleTypesPath = simOutputPath.resolve("*output_carriersVehicleTypes.xml.gz");
+//
+// createScenarioForFreightAnalysis(vehiclesPath, networkPath, carriersPath, carriersVehicleTypesPath, globalCrs);
+ }
+
+ /**
+ * Alternative if you want to set the paths to the necessary resources directly.
+ *
+ * @param networkPath Path to the network file
+ * @param vehiclesPath Path to the vehicle file
+ * @param carriersPath Path to the carriers file
+ * @param carriersVehicleTypesPath Path to the carriersVehicleTypes file
+ * @param eventsPath Path to the events file
+ * @param analysisOutputPath Path to the output directory
+ * @param globalCrs The CRS of the simulation
+ */
+ public RunFreightAnalysisEventBased(String networkPath, String vehiclesPath, String carriersPath, String carriersVehicleTypesPath, String eventsPath,
+ String analysisOutputPath, String globalCrs) {
+ this.EVENTS_PATH = eventsPath;
+ this.ANALYSIS_OUTPUT_PATH = analysisOutputPath;
+
+ createScenarioForFreightAnalysis(vehiclesPath, networkPath, carriersPath, carriersVehicleTypesPath, globalCrs);
+ }
+
+ /**
+ * Constructor, if you only want to have the carrier analysis.
+ *
+ * @param carriers The carriers to be analysed
+ * @param analysisOutputPath The directory where the result of the analysis should go to
+ */
+ public RunFreightAnalysisEventBased(Carriers carriers, String analysisOutputPath) {
+ this.carriers = carriers;
+ this.ANALYSIS_OUTPUT_PATH = analysisOutputPath;
+ }
+
+ private void createScenarioForFreightAnalysis(String vehiclesPath, String networkPath, String carriersPath, String carriersVehicleTypesPath,
+ String globalCrs) {
+ Config config = ConfigUtils.createConfig();
+ config.vehicles().setVehiclesFile(vehiclesPath);
+ config.network().setInputFile(networkPath);
+ config.plans().setInputFile(null);
+ config.eventsManager().setNumberOfThreads(null);
+ config.eventsManager().setEstimatedNumberOfEvents(null);
+ config.global().setNumberOfThreads(1);
+ config.global().setCoordinateSystem(globalCrs);
+
+ //freight settings
+ FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule(config, FreightCarriersConfigGroup.class);
+ freightCarriersConfigGroup.setCarriersFile(carriersPath);
+ freightCarriersConfigGroup.setCarriersVehicleTypesFile(carriersVehicleTypesPath.toString());
+
+ scenario = ScenarioUtils.loadScenario(config);
+
+ //load carriers according to freight config
+ CarriersUtils.loadCarriersAccordingToFreightConfig( scenario );
+ this.carriers = CarriersUtils.addOrGetCarriers(scenario);
+ }
+
+ public void runCarriersAnalysis() throws IOException {
+
+ //Where to store the analysis output?
+ File folder = new File(String.valueOf(ANALYSIS_OUTPUT_PATH));
+ folder.mkdirs();
+ if (allCarriersHavePlans(carriers)) {
+ CarrierPlanAnalysis carrierPlanAnalysis = new CarrierPlanAnalysis(delimiter, carriers);
+ carrierPlanAnalysis.runAnalysisAndWriteStats(ANALYSIS_OUTPUT_PATH);
+ }
+ else {
+ log.warn("########## Not all carriers have plans. Skipping CarrierPlanAnalysis."); //TODO perhaps skipp complete analysis
+ }
+ }
+ public void runCompleteAnalysis() throws IOException {
+ runCarriersAnalysis();
+
+ // Prepare eventsManager - start of event based Analysis;
+ EventsManager eventsManager = EventsUtils.createEventsManager();
+
+ FreightTimeAndDistanceAnalysisEventsHandler freightTimeAndDistanceAnalysisEventsHandler = new FreightTimeAndDistanceAnalysisEventsHandler(delimiter, scenario);
+ eventsManager.addHandler(freightTimeAndDistanceAnalysisEventsHandler);
+
+ CarrierLoadAnalysis carrierLoadAnalysis = new CarrierLoadAnalysis(delimiter, CarriersUtils.getCarriers(scenario));
+ eventsManager.addHandler(carrierLoadAnalysis);
+
+ eventsManager.initProcessing();
+ MatsimEventsReader matsimEventsReader = CarrierEventsReaders.createEventsReader(eventsManager);
+
+ matsimEventsReader.readFile(EVENTS_PATH);
+ eventsManager.finishProcessing();
+
+ log.info("Analysis completed.");
+ log.info("Writing output...");
+ freightTimeAndDistanceAnalysisEventsHandler.writeTravelTimeAndDistancePerVehicle(ANALYSIS_OUTPUT_PATH, scenario);
+ freightTimeAndDistanceAnalysisEventsHandler.writeTravelTimeAndDistancePerVehicleType(ANALYSIS_OUTPUT_PATH, scenario);
+ carrierLoadAnalysis.writeLoadPerVehicle(ANALYSIS_OUTPUT_PATH, scenario);
+ }
+
+ private boolean allCarriersHavePlans(Carriers carriers) {
+ for (Carrier carrier : carriers.getCarriers().values())
+ if (carrier.getSelectedPlan() == null) return false;
+
+ return true;
+ }
+}
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/InitialCarrierPlanCreator.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/InitialCarrierPlanCreator.java
index cd2e07405f7..fb2979e4be1 100644
--- a/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/InitialCarrierPlanCreator.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/InitialCarrierPlanCreator.java
@@ -170,7 +170,7 @@ public static void main(String[] args) {
for(Carrier carrier : carriers.getCarriers().values()){
CarrierPlan plan = new InitialCarrierPlanCreator(scenario.getNetwork()).createPlan(carrier);
- carrier.setSelectedPlan(plan);
+ carrier.addPlan(plan);
}
new CarrierPlanWriter(carriers).write("input/usecases/chessboard/freight/carrierPlans_10minTW.xml");
diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/RunPassengerAlongWithCarriers.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/RunPassengerAlongWithCarriers.java
index 9d54c7299e1..40a49ecf40c 100644
--- a/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/RunPassengerAlongWithCarriers.java
+++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/usecases/chessboard/RunPassengerAlongWithCarriers.java
@@ -100,6 +100,7 @@ public void run() {
public Config prepareConfig() {
Config config = ConfigUtils.loadConfig(IOUtils.extendUrl(url, "config.xml"));
config.controller().setOverwriteFileSetting( OutputDirectoryHierarchy.OverwriteFileSetting.overwriteExistingFiles );
+ config.controller().setLastIteration(5);
config.global().setRandomSeed(4177);
config.controller().setOutputDirectory("./output/");
return config;
diff --git a/contribs/vsp/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java
similarity index 50%
rename from contribs/vsp/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java
rename to contribs/freight/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java
index 75986b3e94c..c7fc851bf24 100644
--- a/contribs/vsp/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest.java
@@ -23,20 +23,51 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import org.matsim.core.utils.io.IOUtils;
+import org.matsim.examples.ExamplesUtils;
import org.matsim.testcases.MatsimTestUtils;
import java.io.IOException;
+import java.net.URL;
public class FreightAnalysisEventBasedTest {
@RegisterExtension
private MatsimTestUtils testUtils = new MatsimTestUtils();
+ final static URL SCENARIO_URL = ExamplesUtils.getTestScenarioURL("freight-chessboard-9x9");
@Test
- void runFreightAnalysisEventBasedTest() throws IOException {
+ void runServiceEventTest() throws IOException {
+ // Note: I had to manually change the files for this test to run, as I did not have access to the original input file of the events-file
+ // This results in the carrier-plans not being related to the actual events. This is however no problem for testing the core functionality,
+ // as those are two disjunct analysis outputs, which do not depend on each other. (aleks Sep'24)
+ RunFreightAnalysisEventBased analysisEventBased = new RunFreightAnalysisEventBased(
+ IOUtils.extendUrl(SCENARIO_URL, "grid9x9.xml" ).toString(),
+ testUtils.getInputDirectory() + "in/output_allVehicles.xml",
+ IOUtils.extendUrl(SCENARIO_URL, "singleCarrierFiveActivities.xml" ).toString(),
+ IOUtils.extendUrl(SCENARIO_URL, "vehicleTypes.xml" ).toString(),
+ testUtils.getInputDirectory() + "in/serviceBasedEvents.xml",
+ testUtils.getOutputDirectory(),
+ null);
+ analysisEventBased.runCompleteAnalysis();
- RunFreightAnalysisEventBased analysisEventBased = new RunFreightAnalysisEventBased(testUtils.getClassInputDirectory(), testUtils.getOutputDirectory(),null);
- analysisEventBased.runAnalysis();
+ MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "Carrier_stats.tsv", testUtils.getOutputDirectory() + "Carrier_stats.tsv");
+ MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "Load_perVehicle.tsv", testUtils.getOutputDirectory() + "Load_perVehicle.tsv");
+ MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "TimeDistance_perVehicle.tsv", testUtils.getOutputDirectory() + "TimeDistance_perVehicle.tsv");
+ MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "TimeDistance_perVehicleType.tsv", testUtils.getOutputDirectory() + "TimeDistance_perVehicleType.tsv");
+ }
+
+ @Test
+ void runShipmentEventTest() throws IOException {
+ RunFreightAnalysisEventBased analysisEventBased = new RunFreightAnalysisEventBased(
+ IOUtils.extendUrl(SCENARIO_URL, "grid9x9.xml" ).toString(),
+ testUtils.getInputDirectory() + "in/carrierVehicles.xml",
+ IOUtils.extendUrl(SCENARIO_URL, "singleCarrierFiveActivities_Shipments.xml" ).toString(),
+ IOUtils.extendUrl(SCENARIO_URL, "vehicleTypes.xml" ).toString(),
+ testUtils.getInputDirectory() + "in/shipmentBasedEvents.xml",
+ testUtils.getOutputDirectory(),
+ null);
+ analysisEventBased.runCompleteAnalysis();
MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "Carrier_stats.tsv", testUtils.getOutputDirectory() + "Carrier_stats.tsv");
MatsimTestUtils.assertEqualFilesLineByLine(testUtils.getInputDirectory() + "Load_perVehicle.tsv", testUtils.getOutputDirectory() + "Load_perVehicle.tsv");
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/FixedCostsTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/FixedCostsTest.java
index 13433ede378..7e0e4bbe12e 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/FixedCostsTest.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/FixedCostsTest.java
@@ -176,7 +176,7 @@ public void setUp() {
//Routing bestPlan to Network
CarrierPlan carrierPlan = MatsimJspritFactory.createPlan(carrier, bestSolution) ;
NetworkRouter.routePlan(carrierPlan,netBasedCosts) ;
- carrier.setSelectedPlan(carrierPlan) ;
+ carrier.addPlan(carrierPlan) ;
carriersPlannedAndRouted.addCarrier(carrier);
}
}
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/IntegrationIT.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/IntegrationIT.java
index 9aa5504cdf7..762a2efe08a 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/IntegrationIT.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/IntegrationIT.java
@@ -30,6 +30,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.Scenario;
import org.matsim.api.core.v01.network.Network;
import org.matsim.core.config.Config;
@@ -78,6 +79,54 @@ void testJsprit() throws ExecutionException, InterruptedException {
}
double scoreRunWithOldStructure = generateCarrierPlans(scenario.getNetwork(), CarriersUtils.getCarriers(scenario), CarriersUtils.getCarrierVehicleTypes(scenario));
Assertions.assertEquals(scoreWithRunJsprit, scoreRunWithOldStructure, MatsimTestUtils.EPSILON, "The score of both runs are not the same");
+
+ for (Carrier carrier : CarriersUtils.getCarriers(scenario).getCarriers().values()) {
+ CarriersUtils.setJspritIterations(carrier, 20);
+ }
+ CarriersUtils.runJsprit(scenario, CarriersUtils.CarrierSelectionForSolution.solveForAllCarriersAndAddPLans);
+ for (Carrier carrier : CarriersUtils.getCarriers(scenario).getCarriers().values()) {
+ Assertions.assertEquals(2, carrier.getPlans().size(), "The number of plans is not as expected");
+ // Test method if all jobs are handled
+ Assertions.assertTrue(CarriersUtils.allJobsHandledBySelectedPlan(carrier), "Not all jobs are handled");
+ CarrierService newService = CarrierService.Builder.newInstance(Id.create(
+ "service" + carrier.getServices().size(), CarrierService.class), Id.createLinkId("100603"))
+ .setServiceDuration(10.).setServiceStartTimeWindow(TimeWindow.newInstance(0,86000)).build();
+ carrier.getServices().put(newService.getId(), newService);
+ Assertions.assertFalse(CarriersUtils.allJobsHandledBySelectedPlan(carrier), "All jobs are handled although a new service was added");
+ }
+ }
+
+ @Test
+ void testJspritWithDefaultSolutionOption() throws ExecutionException, InterruptedException {
+ final String networkFilename = utils.getClassInputDirectory() + "/merged-network-simplified.xml.gz";
+ final String vehicleTypeFilename = utils.getClassInputDirectory() + "/vehicleTypes.xml";
+ final String carrierFilename = utils.getClassInputDirectory() + "/carrier.xml";
+
+ Config config = ConfigUtils.createConfig();
+ config.global().setRandomSeed(4177);
+
+ FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule(config, FreightCarriersConfigGroup.class);
+ freightCarriersConfigGroup.setCarriersFile(carrierFilename);
+ freightCarriersConfigGroup.setCarriersVehicleTypesFile(vehicleTypeFilename);
+ freightCarriersConfigGroup.setTravelTimeSliceWidth(24*3600);
+ freightCarriersConfigGroup.setTimeWindowHandling(FreightCarriersConfigGroup.TimeWindowHandling.enforceBeginnings);
+
+ Scenario scenario = ScenarioUtils.createScenario(config);
+ new MatsimNetworkReader(scenario.getNetwork()).readFile(networkFilename);
+
+ CarriersUtils.loadCarriersAccordingToFreightConfig(scenario);
+
+ for (Carrier carrier : CarriersUtils.getCarriers(scenario).getCarriers().values()) {
+ CarriersUtils.setJspritIterations(carrier, 1);
+ }
+
+ CarriersUtils.runJsprit(scenario, CarriersUtils.CarrierSelectionForSolution.solveForAllCarriersAndOverrideExistingPlans);
+ double scoreWithRunJsprit = 0;
+ for (Carrier carrier : CarriersUtils.getCarriers(scenario).getCarriers().values()) {
+ scoreWithRunJsprit = scoreWithRunJsprit + carrier.getSelectedPlan().getJspritScore();
+ }
+ double scoreRunWithOldStructure = generateCarrierPlans(scenario.getNetwork(), CarriersUtils.getCarriers(scenario), CarriersUtils.getCarrierVehicleTypes(scenario));
+ Assertions.assertEquals(scoreWithRunJsprit, scoreRunWithOldStructure, MatsimTestUtils.EPSILON, "The score of both runs are not the same");
}
private static double generateCarrierPlans(Network network, Carriers carriers, CarrierVehicleTypes vehicleTypes) {
@@ -105,7 +154,7 @@ private static double generateCarrierPlans(Network network, Carriers carriers, C
// (maybe not optimal, but since re-routing is a matsim strategy,
// certainly ok as initial solution)
- carrier.setSelectedPlan(newPlan);
+ carrier.addPlan(newPlan);
SolutionPrinter.print(problem, solution, SolutionPrinter.Print.VERBOSE);
score = score + newPlan.getJspritScore();
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/SkillsIT.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/SkillsIT.java
index ad24848b155..8886010e74b 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/SkillsIT.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/jsprit/SkillsIT.java
@@ -93,7 +93,7 @@ private VehicleRoutingProblemSolution generateCarrierPlans(Scenario scenario) {
CarrierPlan newPlan = MatsimJspritFactory.createPlan(carrier, solution);
NetworkRouter.routePlan(newPlan, networkBasedTransportCosts);
- carrier.setSelectedPlan(newPlan);
+ carrier.addPlan(newPlan);
SolutionPrinter.print(problem, solution, SolutionPrinter.Print.VERBOSE);
// new CarrierPlanXmlWriterV3(CarrierControlerUtils.getCarriers(scenario)).write(utils.getOutputDirectory() + "carriers.xml");
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsIT.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java
similarity index 98%
rename from contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsIT.java
rename to contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java
index 4b86789a97a..76738a411a9 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsIT.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsIT.java
@@ -53,7 +53,7 @@
* @author kturner
*
*/
-public class CarrierControlerUtilsIT {
+public class CarrierControllerUtilsIT{
private final Id CARRIER_SERVICES_ID = Id.create("CarrierWServices", Carrier.class);
private final Id CARRIER_SHIPMENTS_ID = Id.create("CarrierWShipments", Carrier.class);
@@ -140,7 +140,7 @@ public void setUp() {
//Routing bestPlan to Network
CarrierPlan carrierPlanServicesAndShipments = MatsimJspritFactory.createPlan(carrier, bestSolution) ;
NetworkRouter.routePlan(carrierPlanServicesAndShipments,netBasedCosts) ;
- carrier.setSelectedPlan(carrierPlanServicesAndShipments) ;
+ carrier.addPlan(carrierPlanServicesAndShipments) ;
}
/*
@@ -168,7 +168,7 @@ public void setUp() {
//Routing bestPlan to Network
CarrierPlan carrierPlanServicesAndShipments = MatsimJspritFactory.createPlan(carrier, bestSolution) ;
NetworkRouter.routePlan(carrierPlanServicesAndShipments,netBasedCosts) ;
- carrier.setSelectedPlan(carrierPlanServicesAndShipments) ;
+ carrier.addPlan(carrierPlanServicesAndShipments) ;
}
carrierWShipmentsOnlyFromCarrierWServices = carriersWithShipmentsOnly.getCarriers().get(CARRIER_SERVICES_ID); //with converted Service
diff --git a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsTest.java b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java
similarity index 99%
rename from contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsTest.java
rename to contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java
index ba52b1cfd00..87ac86ec9b3 100644
--- a/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControlerUtilsTest.java
+++ b/contribs/freight/src/test/java/org/matsim/freight/carriers/utils/CarrierControllerUtilsTest.java
@@ -59,12 +59,12 @@
import java.net.URL;
import java.util.Collection;
-public class CarrierControlerUtilsTest {
+public class CarrierControllerUtilsTest{
@RegisterExtension
private MatsimTestUtils utils = new MatsimTestUtils();
- private static final Logger log = LogManager.getLogger(CarrierControlerUtilsTest.class);
+ private static final Logger log = LogManager.getLogger( CarrierControllerUtilsTest.class );
private final Id CARRIER_SERVICES_ID = Id.create("CarrierWServices", Carrier.class);
private final Id CARRIER_SHIPMENTS_ID = Id.create("CarrierWShipments", Carrier.class);
@@ -149,7 +149,7 @@ public void setUp() {
//Routing bestPlan to Network
CarrierPlan carrierPlanServicesAndShipments = MatsimJspritFactory.createPlan(carrierWServices, bestSolution) ;
NetworkRouter.routePlan(carrierPlanServicesAndShipments,netBasedCosts) ;
- carrierWServices.setSelectedPlan(carrierPlanServicesAndShipments) ;
+ carrierWServices.addPlan(carrierPlanServicesAndShipments) ;
/*
* Now convert it to a only shipment-based VRP.
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Carrier_stats.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Carrier_stats.tsv
new file mode 100644
index 00000000000..8a1b8ff7b0e
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Carrier_stats.tsv
@@ -0,0 +1,2 @@
+carrierId MATSimScoreSelectedPlan jSpritScoreSelectedPlan nuOfTours nuOfShipments(input) nuOfShipments(handled) nuOfServices(input) nuOfServices(handled) noOfNotHandledJobs nuOfPlanedDemandSize nuOfHandledDemandSize jspritComputationTime[HH:mm:ss]
+carrier1 -210.81333333333333 null 1 0 0 7 7 0 7 7 null
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Load_perVehicle.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Load_perVehicle.tsv
new file mode 100644
index 00000000000..67fb0e5f002
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/Load_perVehicle.tsv
@@ -0,0 +1 @@
+vehicleId capacity maxLoad load state during tour
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicle.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicle.tsv
new file mode 100644
index 00000000000..9ed73be9e24
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicle.tsv
@@ -0,0 +1,2 @@
+vehicleId carrierId vehicleTypeId tourId tourDuration[s] tourDuration[h] travelDistance[m] travelDistance[km] travelTime[s] travelTime[h] costPerSecond[EUR/s] costPerMeter[EUR/m] fixedCosts[EUR] varCostsTime[EUR] varCostsDist[EUR] totalCosts[EUR]
+freight_carrier1_veh_carrier_19_heavyVehicle_1 carrier1 heavy unknown 8003.0 2.2230555555555553 44000.0 44.0 5896.0 1.6377777777777778 0.008 7.7E-4 130.0 64.024 33.879999999999995 227.904
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicleType.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicleType.tsv
new file mode 100644
index 00000000000..962761fc7b1
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/TimeDistance_perVehicleType.tsv
@@ -0,0 +1,3 @@
+vehicleTypeId nuOfVehicles SumOfTourDuration[s] SumOfTourDuration[h] SumOfTravelDistances[m] SumOfTravelDistances[km] SumOfTravelTime[s] SumOfTravelTime[h] costPerSecond[EUR/s] costPerMeter[EUR/m] fixedCosts[EUR/veh] varCostsTime[EUR] varCostsDist[EUR] fixedCosts[EUR] totalCosts[EUR]
+heavy 1 8003.0 2.2230555555555553 44000.0 44.0 5896.0 1.6377777777777778 0.008 7.7E-4 130.0 64.024 33.879999999999995 130.0 227.904
+light 0 0.0 0.0 0.0 0.0 0.0 0.0 0.008 4.7E-4 84.0 0.0 0.0 0.0 0.0
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/output_allVehicles.xml b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/output_allVehicles.xml
new file mode 100644
index 00000000000..ee644f0e30f
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/output_allVehicles.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ A heavy truck
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/serviceBasedEvents.xml b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/serviceBasedEvents.xml
new file mode 100644
index 00000000000..8da18029836
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runServiceEventTest/in/serviceBasedEvents.xml
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Carrier_stats.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Carrier_stats.tsv
new file mode 100644
index 00000000000..f08676856fb
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Carrier_stats.tsv
@@ -0,0 +1,2 @@
+carrierId MATSimScoreSelectedPlan jSpritScoreSelectedPlan nuOfTours nuOfShipments(input) nuOfShipments(handled) nuOfServices(input) nuOfServices(handled) noOfNotHandledJobs nuOfPlanedDemandSize nuOfHandledDemandSize jspritComputationTime[HH:mm:ss]
+carrier1 -Infinity -215.4666666666667 1 5 5 0 0 0 26 26 00:00:00
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Load_perVehicle.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Load_perVehicle.tsv
new file mode 100644
index 00000000000..cf7f4992d37
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/Load_perVehicle.tsv
@@ -0,0 +1,2 @@
+vehicleId capacity maxLoad load state during tour
+freight_carrier1_veh_freight_carrier1_veh_heavyVehicle_1_1 50.0 26 [3, 8, 18, 25, 26, 23, 13, 12, 7, 0]
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicle.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicle.tsv
new file mode 100644
index 00000000000..24a90a81255
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicle.tsv
@@ -0,0 +1,2 @@
+vehicleId carrierId vehicleTypeId tourId tourDuration[s] tourDuration[h] travelDistance[m] travelDistance[km] travelTime[s] travelTime[h] costPerSecond[EUR/s] costPerMeter[EUR/m] fixedCosts[EUR] varCostsTime[EUR] varCostsDist[EUR] totalCosts[EUR]
+freight_carrier1_veh_freight_carrier1_veh_heavyVehicle_1_1 carrier1 heavy 1 6870.0 1.9083333333333334 40000.0 40.0 5360.0 1.488888888888889 0.008 7.7E-4 130.0 54.96 30.799999999999997 215.76
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicleType.tsv b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicleType.tsv
new file mode 100644
index 00000000000..f2090c11206
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/TimeDistance_perVehicleType.tsv
@@ -0,0 +1,3 @@
+vehicleTypeId nuOfVehicles SumOfTourDuration[s] SumOfTourDuration[h] SumOfTravelDistances[m] SumOfTravelDistances[km] SumOfTravelTime[s] SumOfTravelTime[h] costPerSecond[EUR/s] costPerMeter[EUR/m] fixedCosts[EUR/veh] varCostsTime[EUR] varCostsDist[EUR] fixedCosts[EUR] totalCosts[EUR]
+heavy 1 6870.0 1.9083333333333334 40000.0 40.0 5360.0 1.488888888888889 0.008 7.7E-4 130.0 54.96 30.799999999999997 130.0 215.76
+light 0 0.0 0.0 0.0 0.0 0.0 0.0 0.008 4.7E-4 84.0 0.0 0.0 0.0 0.0
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/carrierVehicles.xml b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/carrierVehicles.xml
new file mode 100644
index 00000000000..dbb3af477a7
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/carrierVehicles.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ A heavy truck
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/shipmentBasedEvents.xml b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/shipmentBasedEvents.xml
new file mode 100644
index 00000000000..5dd11c5616b
--- /dev/null
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runShipmentEventTest/in/shipmentBasedEvents.xml
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/contribs/freight/test/input/org/matsim/freight/carriers/jsprit/IntegrationIT/carrier.xml b/contribs/freight/test/input/org/matsim/freight/carriers/jsprit/IntegrationIT/carrier.xml
index 3d59578d423..e14845dfaff 100644
--- a/contribs/freight/test/input/org/matsim/freight/carriers/jsprit/IntegrationIT/carrier.xml
+++ b/contribs/freight/test/input/org/matsim/freight/carriers/jsprit/IntegrationIT/carrier.xml
@@ -1,198 +1,209 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contribs/freightreceiver/src/main/java/org/matsim/contrib/freightreceiver/ReceiverTriggersCarrierReplanningListener.java b/contribs/freightreceiver/src/main/java/org/matsim/contrib/freightreceiver/ReceiverTriggersCarrierReplanningListener.java
index 938bef0d1d3..62a2a507aa2 100644
--- a/contribs/freightreceiver/src/main/java/org/matsim/contrib/freightreceiver/ReceiverTriggersCarrierReplanningListener.java
+++ b/contribs/freightreceiver/src/main/java/org/matsim/contrib/freightreceiver/ReceiverTriggersCarrierReplanningListener.java
@@ -115,7 +115,7 @@ public void notifyIterationStarts(IterationStartsEvent event) {
NetworkRouter.routePlan(newPlan, netBasedCosts);
//assign this plan now to the carrier and make it the selected carrier plan
- carrier.setSelectedPlan(newPlan);
+ carrier.addPlan(newPlan);
}
String outputdirectory = sc.getConfig().controller().getOutputDirectory();
diff --git a/contribs/hybridsim/pom.xml b/contribs/hybridsim/pom.xml
index ac7da45f5b5..d8f69b28046 100644
--- a/contribs/hybridsim/pom.xml
+++ b/contribs/hybridsim/pom.xml
@@ -10,7 +10,7 @@
hybridsim
- 4.28.0
+ 4.28.3
1.66.0
@@ -36,7 +36,7 @@
io.opentelemetry
opentelemetry-sdk
- 1.40.0
+ 1.42.1
diff --git a/contribs/multimodal/src/main/java/org/matsim/contrib/multimodal/RunMultimodalExample.java b/contribs/multimodal/src/main/java/org/matsim/contrib/multimodal/RunMultimodalExample.java
index 6f1d5b48b0c..879c3d9dca5 100644
--- a/contribs/multimodal/src/main/java/org/matsim/contrib/multimodal/RunMultimodalExample.java
+++ b/contribs/multimodal/src/main/java/org/matsim/contrib/multimodal/RunMultimodalExample.java
@@ -26,8 +26,6 @@
import org.matsim.core.config.Config;
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.controler.Controler;
-import org.matsim.core.controler.ControlerUtils;
-import org.matsim.core.controler.OutputDirectoryHierarchy;
import org.matsim.core.scenario.ScenarioUtils;
/**
diff --git a/contribs/noise/src/main/java/org/matsim/contrib/noise/Grid.java b/contribs/noise/src/main/java/org/matsim/contrib/noise/Grid.java
index 329744f3da5..6815899be8a 100644
--- a/contribs/noise/src/main/java/org/matsim/contrib/noise/Grid.java
+++ b/contribs/noise/src/main/java/org/matsim/contrib/noise/Grid.java
@@ -18,7 +18,7 @@
* *********************************************************************** */
/**
- *
+ *
*/
package org.matsim.contrib.noise;
@@ -34,6 +34,7 @@
import org.matsim.api.core.v01.population.Activity;
import org.matsim.api.core.v01.population.Person;
import org.matsim.contrib.noise.NoiseConfigGroup;
+import org.matsim.core.population.PopulationUtils;
import org.matsim.core.router.TripStructureUtils;
import org.matsim.core.router.TripStructureUtils.StageActivityHandling;
import org.matsim.core.utils.collections.QuadTree;
@@ -46,50 +47,50 @@
/**
* Computes a grid of receiver points and provides some basic spatial functionality,
- * e.g. the nearest receiver point for the coordinates of each 'considered' activity type.
- *
+ * e.g. the nearest receiver point for the coordinates of each 'considered' activity type.
+ *
* @author lkroeger, ikaddoura
*
*/
final class Grid {
-
+
private static final Logger log = LogManager.getLogger(Grid.class);
private final Scenario scenario;
private final NoiseConfigGroup noiseParams;
-
+
private final Map, List> personId2consideredActivityCoords = new HashMap, List>();
-
+
private final Set consideredActivityCoordsForSpatialFunctionality = new HashSet ();
private final Set consideredActivityCoordsForReceiverPointGrid = new HashSet ();
-
+
private final Set consideredActivitiesForSpatialFunctionality = new HashSet();
private final Set consideredActivitiesForReceiverPointGrid = new HashSet();
-
+
private double xCoordMin = Double.MAX_VALUE;
private double xCoordMax = Double.MIN_VALUE;
private double yCoordMin = Double.MAX_VALUE;
private double yCoordMax = Double.MIN_VALUE;
-
+
private final Map> activityCoord2receiverPointId = new HashMap>();
private Map, NoiseReceiverPoint> receiverPoints;
-
+
public Grid(Scenario scenario) {
- this.scenario = scenario;
+ this.scenario = scenario;
if (this.scenario.getConfig().getModule("noise") == null) {
throw new RuntimeException("Could not find a noise config group. "
+ "Check if the custom module is loaded, e.g. 'ConfigUtils.loadConfig(configFile, new NoiseConfigGroup())'"
+ " Aborting...");
}
-
+
this.noiseParams = (NoiseConfigGroup) this.scenario.getConfig().getModule("noise");
-
+
this.receiverPoints = new HashMap<>();
-
+
String[] consideredActTypesForDamagesArray = noiseParams.getConsideredActivitiesForDamageCalculationArray();
Collections.addAll(this.consideredActivitiesForSpatialFunctionality, consideredActTypesForDamagesArray);
-
+
String[] consideredActTypesForReceiverPointGridArray = noiseParams.getConsideredActivitiesForReceiverPointGridArray();
Collections.addAll(this.consideredActivitiesForReceiverPointGrid, consideredActTypesForReceiverPointGridArray);
@@ -110,7 +111,7 @@ private void initialize() {
log.info("Loading receiver points based on provided point coordinates in " + this.noiseParams.getReceiverPointsCSVFile());
loadGrid();
}
-
+
setActivityCoord2NearestReceiverPointId();
// delete unnecessary information
@@ -127,17 +128,19 @@ private void setActivityCoords () {
List activityCoordinates = personId2consideredActivityCoords.computeIfAbsent(person.getId(), value -> new ArrayList<>());
activityCoordinates.add(activity.getCoord());
-
- consideredActivityCoordsForSpatialFunctionality.add(activity.getCoord());
+
+ //activity.getCoord() might be null, so we need to handle that (by outsourcing that to PopulationUtils)
+ consideredActivityCoordsForSpatialFunctionality.add(PopulationUtils.decideOnCoordForActivity(activity, scenario));
}
-
+
if (this.consideredActivitiesForReceiverPointGrid.contains(activity.getType()) || consideredActivityPrefix(activity.getType(), consideredActivitiesForReceiverPointGrid)) {
- consideredActivityCoordsForReceiverPointGrid.add(activity.getCoord());
+ //activity.getCoord() might be null, so we need to handle that (by outsourcing that to PopulationUtils)
+ consideredActivityCoordsForReceiverPointGrid.add(PopulationUtils.decideOnCoordForActivity(activity, scenario));
}
}
}
}
-
+
private boolean consideredActivityPrefix(String type, Set list) {
for (String consideredActivity : list) {
if (consideredActivity.endsWith("*")) {
@@ -150,9 +153,9 @@ private boolean consideredActivityPrefix(String type, Set list) {
}
private void loadGrid() {
-
+
String gridCSVFile = this.noiseParams.getReceiverPointsCSVFile();
-
+
CoordinateTransformation ct = TransformationFactory.getCoordinateTransformation(this.noiseParams.getReceiverPointsCSVFileCoordinateSystem(), this.scenario.getConfig().global().getCoordinateSystem());
try {
readReceiverPoints(gridCSVFile, ct);
@@ -175,7 +178,7 @@ private void loadGrid() {
yCoordMax = coord.getY();
}
}
-
+
log.info("Total number of receiver points: " + receiverPoints.size());
}
@@ -202,11 +205,11 @@ private void loadGridFromScenario() {
private void createGrid() {
-
+
if (this.noiseParams.getReceiverPointsGridMinX() == 0. && this.noiseParams.getReceiverPointsGridMinY() == 0. && this.noiseParams.getReceiverPointsGridMaxX() == 0. && this.noiseParams.getReceiverPointsGridMaxY() == 0.) {
-
+
log.info("Creating receiver points for the entire area between the minimum and maximium x and y activity coordinates of all activity locations.");
-
+
for (Coord coord : consideredActivityCoordsForReceiverPointGrid) {
if (coord.getX() < xCoordMin) {
xCoordMin = coord.getX();
@@ -221,28 +224,28 @@ private void createGrid() {
yCoordMax = coord.getY();
}
}
-
+
} else {
-
+
xCoordMin = this.noiseParams.getReceiverPointsGridMinX();
xCoordMax = this.noiseParams.getReceiverPointsGridMaxX();
yCoordMin = this.noiseParams.getReceiverPointsGridMinY();
yCoordMax = this.noiseParams.getReceiverPointsGridMaxY();
-
- log.info("Creating receiver points for the area between the coordinates (" + xCoordMin + "/" + yCoordMin + ") and (" + xCoordMax + "/" + yCoordMax + ").");
+
+ log.info("Creating receiver points for the area between the coordinates (" + xCoordMin + "/" + yCoordMin + ") and (" + xCoordMax + "/" + yCoordMax + ").");
}
-
- createReceiverPoints();
+
+ createReceiverPoints();
}
-
+
private void createReceiverPoints() {
Counter counter = new Counter("create receiver point #");
-
+
for (double y = yCoordMax + 100. ; y > yCoordMin - 100. - noiseParams.getReceiverPointGap() ; y = y - noiseParams.getReceiverPointGap()) {
-
+
for (double x = xCoordMin - 100. ; x < xCoordMax + 100. + noiseParams.getReceiverPointGap() ; x = x + noiseParams.getReceiverPointGap()) {
-
+
Id id = Id.create(counter.getCounter(), ReceiverPoint.class);
Coord coord = new Coord(x, y);
NoiseReceiverPoint rp = new NoiseReceiverPoint(id, coord);
@@ -253,7 +256,7 @@ private void createReceiverPoints() {
counter.printCounter();
log.info("Total number of receiver points: " + receiverPoints.size());
}
-
+
private void setActivityCoord2NearestReceiverPointId () {
double gap = noiseParams.getReceiverPointGap();
Counter counter = new Counter("fill quadtree #") ;
@@ -263,10 +266,10 @@ private void setActivityCoord2NearestReceiverPointId () {
counter.incCounter();
}
counter.printCounter();
-
+
counter = new Counter("compute nearest receiver-points #");
for (Coord coord : consideredActivityCoordsForSpatialFunctionality) {
-
+
// TODO maybe add a check here so we consider only the rp in the 9 surrounding cells?
ReceiverPoint rp = qTree.getClosest(coord.getX(), coord.getY());
if(rp != null) {
@@ -274,16 +277,16 @@ private void setActivityCoord2NearestReceiverPointId () {
log.warn("this must not happen");
}
}
-
+
counter.incCounter();
}
counter.printCounter();
}
private void readReceiverPoints(String file, CoordinateTransformation ct) throws IOException {
-
+
Map, Coord> id2Coord = new HashMap<>();
-
+
BufferedReader br = IOUtils.getBufferedReader(file);
String line = null;
try {
@@ -291,12 +294,12 @@ private void readReceiverPoints(String file, CoordinateTransformation ct) throws
} catch (IOException e) {
e.printStackTrace();
}
-
+
String[] headers = line.split(",");
log.info("id: " + headers[0]);
log.info("xCoord: " + headers[1]);
log.info("yCoord: " + headers[2]);
-
+
int lineCounter = 0;
while( (line = br.readLine()) != null) {
@@ -308,13 +311,13 @@ private void readReceiverPoints(String file, CoordinateTransformation ct) throws
String[] columns = line.split(",");
if (line.isEmpty() || line.equals("") || columns.length != headers.length) {
log.warn("Skipping line " + lineCounter + ". Line is empty or the columns are inconsistent with the headers: [" + line.toString() + "]");
-
+
} else {
String id = null;
double x = 0;
double y = 0;
- for (int column = 0; column < columns.length; column++){
+ for (int column = 0; column < columns.length; column++){
if (column == 0) {
id = columns[column];
} else if (column == 1) {
@@ -329,11 +332,11 @@ private void readReceiverPoints(String file, CoordinateTransformation ct) throws
NoiseReceiverPoint rp = new NoiseReceiverPoint(Id.create(id, ReceiverPoint.class), transformedCoord);
receiverPoints.put(rp.getId(), rp);
lineCounter++;
- }
+ }
}
log.info("Done. Number of read lines: " + lineCounter);
}
-
+
public Map, List> getPersonId2listOfConsideredActivityCoords() {
return personId2consideredActivityCoords;
}
diff --git a/contribs/protobuf/pom.xml b/contribs/protobuf/pom.xml
index a08c2d527c8..53542aa2494 100644
--- a/contribs/protobuf/pom.xml
+++ b/contribs/protobuf/pom.xml
@@ -11,7 +11,7 @@
protobuf
- 4.28.0
+ 4.28.3
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/CreateSingleSimWrapperDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/CreateSingleSimWrapperDashboard.java
index fce848736a6..cbffd5a84a6 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/CreateSingleSimWrapperDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/CreateSingleSimWrapperDashboard.java
@@ -97,10 +97,10 @@ public Integer call() throws Exception {
//add dashboard
switch (dashboardType) {
case noise -> {
- sw.addDashboard(new NoiseDashboard());
+ sw.addDashboard(new NoiseDashboard(config.global().getCoordinateSystem()));
}
case emissions -> {
- sw.addDashboard(new EmissionsDashboard());
+ sw.addDashboard(new EmissionsDashboard(config.global().getCoordinateSystem()));
}
case traffic -> {
sw.addDashboard(new TrafficDashboard());
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DashboardUtils.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DashboardUtils.java
new file mode 100644
index 00000000000..600bb0cf298
--- /dev/null
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DashboardUtils.java
@@ -0,0 +1,23 @@
+package org.matsim.simwrapper;
+
+import org.matsim.simwrapper.viz.GridMap;
+
+public class DashboardUtils {
+ static final String DARK_BLUE = "#1175b3";
+ static final String LIGHT_BLUE = "#95c7df";
+ static final String ORANGE = "#f4a986";
+ static final String RED = "#cc0c27";
+ static final String SAND = "#dfb095";
+ static final String YELLOW = "#dfdb95";
+
+ public static void setGridMapStandards(GridMap viz, Data data, String crs) {
+ viz.height = 12.0;
+ viz.cellSize = 100;
+ viz.opacity = 0.1;
+ viz.maxHeight = 15;
+ viz.projection = crs;
+ viz.center = data.context().getCenter();
+ viz.zoom = data.context().mapZoomLevel;
+ viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{DARK_BLUE, LIGHT_BLUE, YELLOW, SAND, ORANGE, RED});
+ }
+}
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DefaultDashboardProvider.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DefaultDashboardProvider.java
index 9a6f00f9520..a01674f4856 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DefaultDashboardProvider.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/DefaultDashboardProvider.java
@@ -31,11 +31,11 @@ public List getDashboards(Config config, SimWrapper simWrapper) {
}
if (ConfigUtils.hasModule(config, EmissionsConfigGroup.class)) {
- result.add(new EmissionsDashboard());
+ result.add(new EmissionsDashboard(config.global().getCoordinateSystem()));
}
if (ConfigUtils.hasModule(config, NoiseConfigGroup.class)) {
- result.add(new NoiseDashboard());
+ result.add(new NoiseDashboard(config.global().getCoordinateSystem()));
}
result.add(new StuckAgentDashboard());
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/EmissionsDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/EmissionsDashboard.java
index a7487fd625b..69471e57815 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/EmissionsDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/EmissionsDashboard.java
@@ -1,14 +1,12 @@
package org.matsim.simwrapper.dashboard;
import org.matsim.application.analysis.emissions.AirPollutionAnalysis;
-import org.matsim.application.analysis.noise.NoiseAnalysis;
import org.matsim.application.prepare.network.CreateAvroNetwork;
-import org.matsim.application.prepare.network.CreateGeoJsonNetwork;
import org.matsim.simwrapper.Dashboard;
+import org.matsim.simwrapper.DashboardUtils;
import org.matsim.simwrapper.Header;
import org.matsim.simwrapper.Layout;
import org.matsim.simwrapper.viz.GridMap;
-import org.matsim.simwrapper.viz.Links;
import org.matsim.simwrapper.viz.MapPlot;
import org.matsim.simwrapper.viz.Table;
@@ -16,27 +14,35 @@
* Shows emission in the scenario.
*/
public class EmissionsDashboard implements Dashboard {
+
+ private final String coordinateSystem;
+
+ /**
+ * Best provide the crs from {@link org.matsim.core.config.groups.GlobalConfigGroup}
+ * @param coordinateSystem
+ */
+ public EmissionsDashboard(String coordinateSystem) {
+ this.coordinateSystem = coordinateSystem;
+ }
+
@Override
public void configure(Header header, Layout layout) {
- header.title = "Emissions";
- header.description = "Shows the emissions footprint and spatial distribution. Shown values are already upscaled from simulated sample size.";
-
+ header.title = "Air Pollution";
+ header.description = "Shows the air pollution footprint and its spatial distribution. Shown values are already upscaled from simulated sample size.";
layout.row("links")
.el(Table.class, (viz, data) -> {
-
- viz.title = "Emissions";
+ viz.title = "Total Emission";
viz.description = "by pollutant";
viz.dataset = data.compute(AirPollutionAnalysis.class, "emissions_total.csv");
viz.enableFilter = false;
viz.showAllRows = true;
-
viz.width = 1d;
})
.el(MapPlot.class, (viz, data) -> {
- viz.title = "Emissions per Link per Meter";
+ viz.title = "Emission per Link per Meter";
viz.description = "Displays the emissions for each link per meter.";
viz.height = 12.;
viz.addDataset("emissions_per_link_per_m", data.compute(AirPollutionAnalysis.class, "emissions_per_link_per_m.csv"));
@@ -57,14 +63,7 @@ public void configure(Header header, Layout layout) {
viz.title = "COâ‚‚ Emissions";
viz.unit = "COâ‚‚ [g]";
viz.description = "per day";
- viz.height = 12.;
- viz.cellSize = 100;
- viz.opacity = 0.2;
- viz.maxHeight = 100;
- viz.projection = "EPSG:25832";
- viz.zoom = data.context().mapZoomLevel;
- viz.center = data.context().getCenter();
- viz.setColorRamp("greenRed", 10, false);
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(AirPollutionAnalysis.class, "emissions_grid_per_day.%s", "avro");
});
@@ -73,15 +72,7 @@ public void configure(Header header, Layout layout) {
viz.title = "COâ‚‚ Emissions";
viz.unit = "COâ‚‚ [g]";
viz.description = "per hour";
- viz.height = 12.;
- viz.cellSize = 100;
- viz.opacity = 0.2;
- viz.maxHeight = 100;
- viz.projection = "EPSG:25832";
- viz.zoom = data.context().mapZoomLevel;
- viz.center = data.context().getCenter();
-
- viz.setColorRamp("greenRed", 10, false);
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(AirPollutionAnalysis.class, "emissions_grid_per_hour.%s", "avro");
});
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/NoiseDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/NoiseDashboard.java
index 48f173a8adb..c345d0da7fe 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/NoiseDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/NoiseDashboard.java
@@ -1,11 +1,8 @@
package org.matsim.simwrapper.dashboard;
import org.matsim.application.analysis.noise.NoiseAnalysis;
-import org.matsim.application.analysis.population.StuckAgentAnalysis;
import org.matsim.application.prepare.network.CreateAvroNetwork;
-import org.matsim.simwrapper.Dashboard;
-import org.matsim.simwrapper.Header;
-import org.matsim.simwrapper.Layout;
+import org.matsim.simwrapper.*;
import org.matsim.simwrapper.viz.ColorScheme;
import org.matsim.simwrapper.viz.GridMap;
import org.matsim.simwrapper.viz.MapPlot;
@@ -19,13 +16,14 @@ public class NoiseDashboard implements Dashboard {
private double minDb = 40;
private double maxDb = 80;
+ private final String coordinateSystem;
+
/**
- * Set the min and max values for the noise map.
+ * Best provide the crs from {@link org.matsim.core.config.groups.GlobalConfigGroup}
+ * @param coordinateSystem for the {@link GridMap}
*/
- public NoiseDashboard withMinMaxDb(double minDb, double maxDb) {
- this.minDb = minDb;
- this.maxDb = maxDb;
- return this;
+ public NoiseDashboard(String coordinateSystem) {
+ this.coordinateSystem = coordinateSystem;
}
@Override
@@ -64,52 +62,30 @@ public void configure(Header header, Layout layout) {
.el(GridMap.class, (viz, data) -> {
viz.title = "Noise Immissions (Grid)";
viz.description = "Total Noise Immissions per day";
- viz.height = 12.0;
- viz.cellSize = 250;
- viz.opacity = 0.1;
- viz.maxHeight = 40;
- viz.center = data.context().getCenter();
- viz.zoom = data.context().mapZoomLevel;
- viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{"#1175b3", "#95c7df", "#dfdb95", "#dfb095", "#f4a986", "#cc0c27"});
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(NoiseAnalysis.class, "immission_per_day.%s", "avro");
})
.el(GridMap.class, (viz, data) -> {
viz.title = "Hourly Noise Immissions (Grid)";
viz.description = "Noise Immissions per hour";
- viz.height = 12.0;
- viz.cellSize = 250;
- viz.opacity = 0.1;
- viz.maxHeight = 40;
- viz.center = data.context().getCenter();
- viz.zoom = data.context().mapZoomLevel;
- viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{"#1175b3", "#95c7df", "#dfdb95", "#dfb095", "#f4a986", "#cc0c27"});
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(NoiseAnalysis.class, "immission_per_hour.%s", "avro");
});
layout.row("damages")
.el(GridMap.class, (viz, data) -> {
viz.title = "Daily Noise Damages (Grid)";
viz.description = "Total Noise Damages per day [€]";
- viz.height = 12.0;
- viz.cellSize = 250;
- viz.opacity = 0.1;
- viz.maxHeight = 40;
- viz.center = data.context().getCenter();
- viz.zoom = data.context().mapZoomLevel;
- viz.setColorRamp(ColorScheme.Oranges);
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(NoiseAnalysis.class, "damages_receiverPoint_per_day.%s", "avro");
})
.el(GridMap.class, (viz, data) -> {
viz.title = "Hourly Noise Damages (Grid)";
viz.description = "Noise Damages per hour [€]";
- viz.height = 12.0;
- viz.cellSize = 250;
- viz.opacity = 0.2;
- viz.maxHeight = 40;
- viz.center = data.context().getCenter();
- viz.zoom = data.context().mapZoomLevel;
-// viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{"#1175b3", "#95c7df", "#dfdb95", "#dfb095", "#f4a986", "#cc0c27"});
- viz.setColorRamp(ColorScheme.Oranges);
+ DashboardUtils.setGridMapStandards(viz, data, this.coordinateSystem);
viz.file = data.computeWithPlaceholder(NoiseAnalysis.class, "damages_receiverPoint_per_hour.%s", "avro");
});
+
+
}
+
}
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/OverviewDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/OverviewDashboard.java
index ef29484258b..0d5f54ca8e9 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/OverviewDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/OverviewDashboard.java
@@ -58,7 +58,7 @@ public void configure(Header header, Layout layout) {
});
layout.row("config").el(XML.class, (viz, data) -> {
- viz.file = data.output("*.output_config.xml");
+ viz.file = data.output("(*.)?output_config.xml");
viz.height = 6d;
viz.width = 2d;
viz.unfoldLevel = 1;
@@ -66,7 +66,7 @@ public void configure(Header header, Layout layout) {
}).el(PieChart.class, (viz, data) -> {
viz.title = "Mode Share";
viz.description = "at final Iteration";
- viz.dataset = data.output("*.modestats.csv");
+ viz.dataset = data.output("(*.)?modestats.csv");
viz.ignoreColumns = List.of("iteration");
viz.useLastRow = true;
});
@@ -75,7 +75,7 @@ public void configure(Header header, Layout layout) {
layout.row("second").el(Line.class, (viz, data) -> {
viz.title = "Score";
- viz.dataset = data.output("*.scorestats.csv");
+ viz.dataset = data.output("(*.)?scorestats.csv");
viz.description = "per Iteration";
viz.x = "iteration";
viz.columns = List.of("avg_executed", "avg_worst", "avg_best");
@@ -88,7 +88,7 @@ public void configure(Header header, Layout layout) {
.el(Area.class, (viz, data) -> {
viz.title = "Mode Share Progression";
viz.description = "per Iteration";
- viz.dataset = data.output("*.modestats.csv");
+ viz.dataset = data.output("(*.)?modestats.csv");
viz.x = "iteration";
viz.xAxisName = "Iteration";
viz.yAxisName = "Share";
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/PublicTransitDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/PublicTransitDashboard.java
index 6903902d098..fc902474591 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/PublicTransitDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/PublicTransitDashboard.java
@@ -5,24 +5,40 @@
import org.matsim.simwrapper.Layout;
import org.matsim.simwrapper.viz.TransitViewer;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* Standard dashboard for public transit.
*/
public class PublicTransitDashboard implements Dashboard {
+ private List customRouteTypes = new ArrayList<>();
+
+ /**
+ * Add custom route types to the transit viewer.
+ */
+ public PublicTransitDashboard withCustomRouteTypes(TransitViewer.CustomRouteType... custom) {
+ customRouteTypes.addAll(List.of(custom));
+ return this;
+ }
+
@Override
public void configure(Header header, Layout layout) {
header.title = "Public Transit";
header.tab = "PT";
- header.triggerPattern = "*output_transitSchedule*xml*";
+ header.triggerPattern = "(*.)?output_transitSchedule*xml*";
layout.row("viewer").el(TransitViewer.class, (viz, data) -> {
viz.title = "Transit Viewer";
viz.height = 12d;
viz.description = "Visualize the transit schedule.";
- viz.network = "*output_network.xml.gz";
- viz.transitSchedule = data.output("*output_transitSchedule.xml.gz");
+ viz.network = "(*.)?output_network.xml.gz";
+ viz.transitSchedule = data.output("(*.)?output_transitSchedule.xml.gz");
+
+ if (!customRouteTypes.isEmpty())
+ viz.customRouteTypes = customRouteTypes;
});
}
}
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/TripDashboard.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/TripDashboard.java
index 7603da2b791..34c5f1ba1c3 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/TripDashboard.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/dashboard/TripDashboard.java
@@ -247,7 +247,7 @@ public void configure(Header header, Layout layout) {
.el(Plotly.class, (viz, data) -> {
viz.title = "Mode usage";
- viz.description = "Share of persons using a main mode at least once per day.";
+ viz.description = "Share of persons using a main mode at least once per day";
viz.width = 2d;
Plotly.DataSet ds = viz.addDataset(data.compute(TripAnalysis.class, "mode_users.csv"));
@@ -267,6 +267,11 @@ public void configure(Header header, Layout layout) {
viz.mergeDatasets = true;
}
+ }).el(Sankey.class, (viz, data) -> {
+ viz.title = "Mode shift";
+ viz.width = 1.5d;
+ viz.description = "by main mode. Compares initial input with output after the last iteration";
+ viz.csv = data.compute(TripAnalysis.class, "mode_shift.csv", args);
});
createDistancePlot(layout, args, tab);
diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/TransitViewer.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/TransitViewer.java
index ff9e8176b60..4f6622d2b11 100644
--- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/TransitViewer.java
+++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/TransitViewer.java
@@ -2,6 +2,8 @@
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
/**
* Transit viewer for pt schedules.
*/
@@ -13,7 +15,55 @@ public class TransitViewer extends Viz {
@JsonProperty(required = true)
public String transitSchedule;
+ public List customRouteTypes;
+
public TransitViewer() {
super("transit");
}
+
+ public CustomRouteType addCustomRouteType(String label, String color, boolean hide) {
+ CustomRouteType crt = new CustomRouteType();
+ crt.label = label;
+ crt.color = color;
+ crt.hide = hide;
+ customRouteTypes.add(crt);
+ return crt;
+ }
+
+ public static class CustomRouteType {
+ public String label;
+ public String color;
+ public Boolean hide;
+ Match match;
+
+ public CustomRouteType addMatchTransportMode(String... transportMode) {
+ if (match == null)
+ match = new Match();
+
+ match.transportMode = transportMode;
+ return this;
+ }
+
+ public CustomRouteType addMatchId(String... id) {
+ if (match == null)
+ match = new Match();
+
+ match.id = id;
+ return this;
+ }
+
+ public CustomRouteType addMatchGtfsRouteType(Integer... gtfsRouteType) {
+ if (match == null)
+ match = new Match();
+
+ match.gtfsRouteType = gtfsRouteType;
+ return this;
+ }
+ }
+
+ private static class Match {
+ Object transportMode;
+ Object id;
+ Object gtfsRouteType;
+ }
}
diff --git a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/DashboardTests.java b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/DashboardTests.java
index 2a248f2e1ea..dca4a209df1 100644
--- a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/DashboardTests.java
+++ b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/DashboardTests.java
@@ -4,15 +4,21 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.application.MATSimApplication;
+import org.matsim.application.options.CsvOptions;
import org.matsim.core.config.Config;
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.controler.Controler;
+import org.matsim.core.utils.io.IOUtils;
import org.matsim.simwrapper.Dashboard;
import org.matsim.simwrapper.SimWrapper;
import org.matsim.simwrapper.SimWrapperConfigGroup;
import org.matsim.simwrapper.TestScenario;
+import org.matsim.simwrapper.viz.TransitViewer;
import org.matsim.testcases.MatsimTestUtils;
+import tech.tablesaw.api.Table;
+import tech.tablesaw.io.csv.CsvReadOptions;
+import java.io.IOException;
import java.nio.file.Path;
import java.util.Set;
@@ -67,9 +73,27 @@ void trip() {
Path out = Path.of(utils.getOutputDirectory(), "analysis", "population");
run(new TripDashboard());
+ Assertions.assertThat(out)
+ .isDirectoryContaining("glob:**trip_stats.csv")
+ .isDirectoryContaining("glob:**mode_share.csv")
+ .isDirectoryContaining("glob:**mode_shift.csv");
+ }
+
+ @Test
+ void tripPersonFilter() throws IOException {
+
+ Path out = Path.of(utils.getOutputDirectory(), "analysis", "population");
+
+ run(new TripDashboard().setAnalysisArgs("--person-filter", "subpopulation=person"));
Assertions.assertThat(out)
.isDirectoryContaining("glob:**trip_stats.csv")
.isDirectoryContaining("glob:**mode_share.csv");
+
+ Table tripStats = Table.read().csv(CsvReadOptions.builder(IOUtils.getBufferedReader(Path.of(utils.getOutputDirectory(), "analysis", "population", "trip_stats.csv").toString()))
+ .sample(false)
+ .separator(CsvOptions.detectDelimiter(Path.of(utils.getOutputDirectory(), "analysis", "population", "mode_share.csv").toString())).build());
+
+ Assertions.assertThat(tripStats.containsColumn("freight")).isFalse();
}
@Test
@@ -134,4 +158,24 @@ void odTrips() {
}
+ @Test
+ void ptCustom() {
+ PublicTransitDashboard pt = new PublicTransitDashboard();
+
+ // bus
+ TransitViewer.CustomRouteType crt = new TransitViewer.CustomRouteType();
+ crt.label = "Bus";
+ crt.color = "#109192";
+ crt.addMatchGtfsRouteType(3);
+
+ // rail
+ TransitViewer.CustomRouteType crtRail = new TransitViewer.CustomRouteType();
+ crtRail.label = "Rail";
+ crtRail.color = "#EC0016";
+ crtRail.addMatchGtfsRouteType(2);
+
+ pt.withCustomRouteTypes(crt, crtRail);
+
+ run(pt);
+ }
}
diff --git a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/EmissionsDashboardTest.java b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/EmissionsDashboardTest.java
index 3eb8a85e3f4..822a7b467a5 100644
--- a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/EmissionsDashboardTest.java
+++ b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/EmissionsDashboardTest.java
@@ -57,7 +57,7 @@ void generate() {
emissionsConfig.setDetailedVsAverageLookupBehavior(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageThenAverageTable);
SimWrapper sw = SimWrapper.create()
- .addDashboard(new EmissionsDashboard());
+ .addDashboard(new EmissionsDashboard(config.global().getCoordinateSystem()));
Controler controler = MATSimApplication.prepare(new TestScenario(sw), config);
diff --git a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/NoiseDashboardTests.java b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/NoiseDashboardTests.java
index fdc846cdff5..a4ce705e001 100644
--- a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/NoiseDashboardTests.java
+++ b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/NoiseDashboardTests.java
@@ -38,7 +38,7 @@ void generate() {
simWrapperConfigGroup.defaultParams().shp = IOUtils.extendUrl(kelheim, "area/area.shp").toString();
- SimWrapper sw = SimWrapper.create(config).addDashboard(new NoiseDashboard());
+ SimWrapper sw = SimWrapper.create(config).addDashboard(new NoiseDashboard(config.global().getCoordinateSystem()));
Controler controler = MATSimApplication.prepare(new TestScenario(sw), config);
controler.run();
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.java
index 38bcf0744be..6652c17b955 100644
--- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.java
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.java
@@ -311,6 +311,7 @@ public void readExistingCarriersFromFolder(Scenario scenario, double sampleScena
else if (!carrier.getShipments().isEmpty())
newCarrier.getShipments().putAll(carrier.getShipments());
if (carrier.getSelectedPlan() != null) {
+ newCarrier.addPlan(carrier.getSelectedPlan());
newCarrier.setSelectedPlan(carrier.getSelectedPlan());
List startAreas = new ArrayList<>();
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultUnhandledServicesSolution.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultUnhandledServicesSolution.java
new file mode 100644
index 00000000000..4928ce2a401
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultUnhandledServicesSolution.java
@@ -0,0 +1,136 @@
+package org.matsim.smallScaleCommercialTrafficGeneration;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.matsim.api.core.v01.Scenario;
+import org.matsim.core.gbl.MatsimRandom;
+import org.matsim.freight.carriers.Carrier;
+import org.matsim.freight.carriers.CarrierService;
+import org.matsim.freight.carriers.CarrierVehicle;
+import org.matsim.freight.carriers.CarriersUtils;
+
+import java.util.*;
+import java.util.concurrent.ExecutionException;
+
+public class DefaultUnhandledServicesSolution implements UnhandledServicesSolution {
+ private static final Logger log = LogManager.getLogger(DefaultUnhandledServicesSolution.class);
+
+ // Generation data
+ Random rnd;
+ private final GenerateSmallScaleCommercialTrafficDemand generator;
+
+ DefaultUnhandledServicesSolution(GenerateSmallScaleCommercialTrafficDemand generator){
+ rnd = MatsimRandom.getRandom();
+ this.generator = generator;
+ }
+
+ public List createListOfCarrierWithUnhandledJobs(Scenario scenario){
+ List carriersWithUnhandledJobs = new LinkedList<>();
+ for (Carrier carrier : CarriersUtils.getCarriers(scenario).getCarriers().values()) {
+ if (!CarriersUtils.allJobsHandledBySelectedPlan(carrier))
+ carriersWithUnhandledJobs.add(carrier);
+ }
+
+ return carriersWithUnhandledJobs;
+ }
+
+ public int getServiceTimePerStop(Carrier carrier, GenerateSmallScaleCommercialTrafficDemand.CarrierAttributes carrierAttributes, int additionalTravelBufferPerIterationInMinutes) {
+ GenerateSmallScaleCommercialTrafficDemand.ServiceDurationPerCategoryKey key = null;
+ if (carrierAttributes.smallScaleCommercialTrafficType().equals(
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()))
+ key = GenerateSmallScaleCommercialTrafficDemand.makeServiceDurationPerCategoryKey(carrierAttributes.selectedStartCategory(), null, carrierAttributes.smallScaleCommercialTrafficType());
+ else if (carrierAttributes.smallScaleCommercialTrafficType().equals(
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
+ key = GenerateSmallScaleCommercialTrafficDemand.makeServiceDurationPerCategoryKey(carrierAttributes.selectedStartCategory(), carrierAttributes.modeORvehType(), carrierAttributes.smallScaleCommercialTrafficType());
+ }
+
+ //possible new Version by Ricardo
+ double maxVehicleAvailability = carrier.getCarrierCapabilities().getCarrierVehicles().values().stream().mapToDouble(vehicle -> vehicle.getLatestEndTime() - vehicle.getEarliestStartTime()).max().orElse(0);
+ int usedTravelTimeBuffer = additionalTravelBufferPerIterationInMinutes * 60; // buffer for the driving time; for unsolved carriers the buffer will be increased over time
+ for (int j = 0; j < 200; j++) {
+ GenerateSmallScaleCommercialTrafficDemand.DurationsBounds serviceDurationBounds = generator.getServiceDurationTimeSelector().get(key).sample();
+
+ for (int i = 0; i < 10; i++) {
+ int serviceDurationLowerBound = serviceDurationBounds.minDuration();
+ int serviceDurationUpperBound = serviceDurationBounds.maxDuration();
+ int possibleValue = rnd.nextInt(serviceDurationLowerBound * 60, serviceDurationUpperBound * 60);
+ // checks if the service duration will not exceed the vehicle availability including the buffer
+ if (possibleValue + usedTravelTimeBuffer <= maxVehicleAvailability)
+ return possibleValue;
+ }
+ if (j > 100){
+ CarrierVehicle carrierVehicleToChange = carrier.getCarrierCapabilities().getCarrierVehicles().values().stream().sorted(Comparator.comparingDouble(vehicle -> vehicle.getLatestEndTime() - vehicle.getEarliestStartTime())).toList().getFirst();
+ log.info("Changing vehicle availability for carrier {}. Old maxVehicleAvailability: {}", carrier.getId(), maxVehicleAvailability);
+ int tourDuration = 0;
+ int vehicleStartTime = 0;
+ int vehicleEndTime = 0;
+ while (tourDuration < maxVehicleAvailability) {
+ GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration t = generator.getTourDistribution().get(carrierAttributes.smallScaleCommercialTrafficType()).sample();
+ vehicleStartTime = t.getVehicleStartTime();
+ tourDuration = t.getVehicleTourDuration();
+ vehicleEndTime = vehicleStartTime + tourDuration;
+ }
+ CarrierVehicle newCarrierVehicle = CarrierVehicle.Builder.newInstance(carrierVehicleToChange.getId(), carrierVehicleToChange.getLinkId(),
+ carrierVehicleToChange.getType()).setEarliestStart(vehicleStartTime).setLatestEnd(vehicleEndTime).build();
+ carrier.getCarrierCapabilities().getCarrierVehicles().remove(carrierVehicleToChange.getId());
+ carrier.getCarrierCapabilities().getCarrierVehicles().put(newCarrierVehicle.getId(), newCarrierVehicle);
+ maxVehicleAvailability = carrier.getCarrierCapabilities().getCarrierVehicles().values().stream().mapToDouble(vehicle -> vehicle.getLatestEndTime() - vehicle.getEarliestStartTime()).max().orElse(0);
+ log.info("New maxVehicleAvailability: {}", maxVehicleAvailability);
+ }
+ }
+
+ throw new RuntimeException("No possible service duration found for employee category '" + carrierAttributes.selectedStartCategory() + "' and mode '"
+ + carrierAttributes.modeORvehType() + "' in traffic type '" + carrierAttributes.smallScaleCommercialTrafficType() + "'");
+ }
+
+ /**
+ * Redraws the service-durations of all {@link CarrierService}s of the given {@link Carrier}.
+ */
+ private void redrawAllServiceDurations(Carrier carrier, GenerateSmallScaleCommercialTrafficDemand.CarrierAttributes carrierAttributes, int additionalTravelBufferPerIterationInMinutes) {
+ for (CarrierService service : carrier.getServices().values()) {
+ double newServiceDuration = getServiceTimePerStop(carrier, carrierAttributes, additionalTravelBufferPerIterationInMinutes);
+ CarrierService redrawnService = CarrierService.Builder.newInstance(service.getId(), service.getLocationLinkId())
+ .setServiceDuration(newServiceDuration).setServiceStartTimeWindow(service.getServiceStartTimeWindow()).build();
+ carrier.getServices().put(redrawnService.getId(), redrawnService);
+ }
+ }
+
+ @Override
+ public void tryToSolveAllCarriersCompletely(Scenario scenario, List nonCompleteSolvedCarriers) {
+ int startNumberOfCarriersWithUnhandledJobs = nonCompleteSolvedCarriers.size();
+ log.info("Starting with carrier-replanning loop.");
+ for (int i = 0; i < generator.getMaxReplanningIterations(); i++) {
+ log.info("carrier-replanning loop iteration: {}", i);
+ int numberOfCarriersWithUnhandledJobs = nonCompleteSolvedCarriers.size();
+ for (Carrier nonCompleteSolvedCarrier : nonCompleteSolvedCarriers) {
+ //Delete old plan of carrier
+ nonCompleteSolvedCarrier.clearPlans();
+ nonCompleteSolvedCarrier.setSelectedPlan(null);
+ GenerateSmallScaleCommercialTrafficDemand.CarrierAttributes carrierAttributes = generator.getCarrierId2carrierAttributes().get(nonCompleteSolvedCarrier.getId());
+
+ // Generate new services. The new service batch should have a smaller sum of serviceDurations than before (or otherwise it will not change anything)
+ redrawAllServiceDurations(nonCompleteSolvedCarrier, carrierAttributes, (i + 1) * generator.getAdditionalTravelBufferPerIterationInMinutes());
+ log.info("Carrier should be changed...");
+ }
+ try {
+ CarriersUtils.runJsprit(scenario, CarriersUtils.CarrierSelectionForSolution.solveOnlyForCarrierWithoutPlans);
+ } catch (ExecutionException | InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+
+
+ nonCompleteSolvedCarriers = createListOfCarrierWithUnhandledJobs(scenario);
+ log.info(
+ "End of carrier-replanning loop iteration: {}. From the {} carriers with unhandled jobs ({} already solved), {} were solved in this iteration with an additionalBuffer of {} minutes.",
+ i, startNumberOfCarriersWithUnhandledJobs, startNumberOfCarriersWithUnhandledJobs - numberOfCarriersWithUnhandledJobs,
+ numberOfCarriersWithUnhandledJobs - nonCompleteSolvedCarriers.size(), (i + 1) * generator.getAdditionalTravelBufferPerIterationInMinutes());
+ if (nonCompleteSolvedCarriers.isEmpty()) break;
+ }
+
+ // Final check
+ if (!nonCompleteSolvedCarriers.isEmpty()) {
+ log.warn("Not all services were handled!");
+ }
+ }
+
+}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultVehicleSelection.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultVehicleSelection.java
new file mode 100644
index 00000000000..c6221d61515
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/DefaultVehicleSelection.java
@@ -0,0 +1,82 @@
+package org.matsim.smallScaleCommercialTrafficGeneration;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DefaultVehicleSelection implements VehicleSelection{
+ @Override
+ public List getAllCategories() {
+ ArrayList categories = new ArrayList<>(7);
+ categories.add("Employee Primary Sector");
+ categories.add("Employee Construction");
+ categories.add("Employee Secondary Sector Rest");
+ categories.add("Employee Retail");
+ categories.add("Employee Traffic/Parcels");
+ categories.add("Employee Tertiary Sector Rest");
+ categories.add("Inhabitants");
+ return categories;
+ }
+
+
+ @Override
+ public OdMatrixEntryInformation getOdMatrixEntryInformation(int purpose, String modeORvehType, String smallScaleCommercialTrafficType) {
+ VehicleSelection.OdMatrixEntryInformation information = new OdMatrixEntryInformation();
+ information.occupancyRate = 0;
+ information.possibleVehicleTypes = null;
+ information.possibleStartCategories = new ArrayList<>();
+ information.possibleStopCategories = new ArrayList<>(getAllCategories());
+
+ if (purpose == 1) {
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ information.possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"};
+ information.occupancyRate = 1.5;
+ }
+ information.possibleStartCategories.add("Employee Secondary Sector Rest");
+ information.possibleStopCategories.clear();
+ information.possibleStopCategories.add("Employee Secondary Sector Rest");
+ } else if (purpose == 2) {
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ information.possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"};
+ information.occupancyRate = 1.6;
+ }
+ information.possibleStartCategories.add("Employee Secondary Sector Rest");
+ } else if (purpose == 3) {
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ information.possibleVehicleTypes = new String[]{"golf1.4", "c_zero"};
+ information.occupancyRate = 1.2;
+ }
+ information.possibleStartCategories.add("Employee Retail");
+ information.possibleStartCategories.add("Employee Tertiary Sector Rest");
+ } else if (purpose == 4) {
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ information.possibleVehicleTypes = new String[]{"golf1.4", "c_zero"};
+ information.occupancyRate = 1.2;
+ }
+ information.possibleStartCategories.add("Employee Traffic/Parcels");
+ } else if (purpose == 5) {
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ information.possibleVehicleTypes = new String[]{"mercedes313", "e_SpaceTourer"};
+ information.occupancyRate = 1.7;
+ }
+ information.possibleStartCategories.add("Employee Construction");
+ } else if (purpose == 6) {
+ information.possibleStartCategories.add("Inhabitants");
+ }
+
+ if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
+ information.occupancyRate = 1.;
+ switch (modeORvehType) {
+ case "vehTyp1" ->
+ information.possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"}; // possible to add more types, see source
+ case "vehTyp2" ->
+ information.possibleVehicleTypes = new String[]{"mercedes313", "e_SpaceTourer"};
+ case "vehTyp3", "vehTyp4" ->
+ information.possibleVehicleTypes = new String[]{"light8t", "light8t_electro"};
+ case "vehTyp5" ->
+ information.possibleVehicleTypes = new String[]{"medium18t", "medium18t_electro", "heavy40t", "heavy40t_electro"};
+ }
+ }
+
+ return information;
+ }
+}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java
index af8fbacf479..553b9abc689 100644
--- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java
@@ -17,6 +17,7 @@
* See also COPYING, LICENSE and WARRANTY file *
* *
* *********************************************************************** */
+
package org.matsim.smallScaleCommercialTrafficGeneration;
import com.google.inject.Inject;
@@ -68,11 +69,11 @@
import org.matsim.core.utils.geometry.CoordinateTransformation;
import org.matsim.facilities.ActivityFacility;
import org.matsim.freight.carriers.*;
-import org.matsim.freight.carriers.CarrierCapabilities.FleetSize;
+import org.matsim.freight.carriers.analysis.RunFreightAnalysisEventBased;
import org.matsim.freight.carriers.controler.*;
import org.matsim.freight.carriers.usecases.chessboard.CarrierTravelDisutilities;
+import org.matsim.smallScaleCommercialTrafficGeneration.data.CommercialTourSpecifications;
import org.matsim.smallScaleCommercialTrafficGeneration.data.DefaultTourSpecificationsByUsingKID2002;
-import org.matsim.smallScaleCommercialTrafficGeneration.data.GetCommercialTourSpecifications;
import org.matsim.vehicles.CostInformation;
import org.matsim.vehicles.Vehicle;
import org.matsim.vehicles.VehicleType;
@@ -94,7 +95,6 @@
*
* @author Ricardo Ewert
*/
-//TODO: use EnumeratedDistribution for distributions with probabilities
@CommandLine.Command(name = "generate-small-scale-commercial-traffic", description = "Generates plans for a small scale commercial traffic model", showDefaultValues = true)
public class GenerateSmallScaleCommercialTrafficDemand implements MATSimAppCommand {
// freight traffic from extern:
@@ -108,7 +108,9 @@ public class GenerateSmallScaleCommercialTrafficDemand implements MATSimAppComma
private static final Logger log = LogManager.getLogger(GenerateSmallScaleCommercialTrafficDemand.class);
private final IntegrateExistingTrafficToSmallScaleCommercial integrateExistingTrafficToSmallScaleCommercial;
- private final GetCommercialTourSpecifications getCommercialTourSpecifications;
+ private final CommercialTourSpecifications commercialTourSpecifications;
+ private final VehicleSelection vehicleSelection;
+ private final UnhandledServicesSolution unhandledServicesSolution;
private enum CreationOption {
useExistingCarrierFileWithSolution, createNewCarrierFile, useExistingCarrierFileWithoutSolution
@@ -136,6 +138,12 @@ public enum SmallScaleCommercialTrafficType {
@CommandLine.Option(names = "--jspritIterations", description = "Set number of jsprit iterations", required = true)
private int jspritIterations;
+ @CommandLine.Option(names = "--additionalTravelBufferPerIterationInMinutes", description = "This buffer/driving time is used for service-route-planning. If set too low, carriers may not serve all their services.", defaultValue = "10")
+ private int additionalTravelBufferPerIterationInMinutes;
+
+ @CommandLine.Option(names = "--maxReplanningIterations", description = "Limit of carrier replanning iterations, where carriers with unhandled services get new plans. If your carrier-plans are still not fully served, increase this limit.", defaultValue = "100")
+ private int maxReplanningIterations;
+
@CommandLine.Option(names = "--creationOption", description = "Set option of mode differentiation: useExistingCarrierFileWithSolution, createNewCarrierFile, useExistingCarrierFileWithoutSolution")
private CreationOption usedCreationOption;
@@ -169,19 +177,32 @@ public enum SmallScaleCommercialTrafficType {
@CommandLine.Option(names = "--pathOutput", description = "Path for the output")
private Path output;
- private Random rnd;
+ private static Random rnd;
private RandomGenerator rng;
private final Map>> facilitiesPerZone = new HashMap<>();
+ private final Map, CarrierAttributes> carrierId2carrierAttributes = new HashMap<>();
+
+ private Map> tourDistribution = null;
+ private Map> serviceDurationTimeSelector = null;
+
+ private TripDistributionMatrix odMatrix;
+ private Map> resultingDataPerZone;
+ private Map, Link>> linksPerZone;
private Index indexZones;
public GenerateSmallScaleCommercialTrafficDemand() {
this.integrateExistingTrafficToSmallScaleCommercial = new DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl();
log.info("Using default {} if existing models are integrated!", DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.class.getSimpleName());
- this.getCommercialTourSpecifications = new DefaultTourSpecificationsByUsingKID2002();
+ this.commercialTourSpecifications = new DefaultTourSpecificationsByUsingKID2002();
log.info("Using default {} for tour specifications!", DefaultTourSpecificationsByUsingKID2002.class.getSimpleName());
+ this.vehicleSelection = new DefaultVehicleSelection();
+ log.info("Using default {} for tour vehicle-selection!", DefaultVehicleSelection.class.getSimpleName());
+ this.unhandledServicesSolution = new DefaultUnhandledServicesSolution(this);
+ log.info("Using default {} for tour unhandled-services-solution!", DefaultUnhandledServicesSolution.class.getSimpleName());
}
- public GenerateSmallScaleCommercialTrafficDemand(IntegrateExistingTrafficToSmallScaleCommercial integrateExistingTrafficToSmallScaleCommercial, GetCommercialTourSpecifications getCommercialTourSpecifications) {
+
+ public GenerateSmallScaleCommercialTrafficDemand(IntegrateExistingTrafficToSmallScaleCommercial integrateExistingTrafficToSmallScaleCommercial, CommercialTourSpecifications getCommercialTourSpecifications, VehicleSelection vehicleSelection, UnhandledServicesSolution unhandledServicesSolution) {
if (integrateExistingTrafficToSmallScaleCommercial == null){
this.integrateExistingTrafficToSmallScaleCommercial = new DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl();
log.info("Using default {} if existing models are integrated!", DefaultIntegrateExistingTrafficToSmallScaleCommercialImpl.class.getSimpleName());
@@ -190,12 +211,26 @@ public GenerateSmallScaleCommercialTrafficDemand(IntegrateExistingTrafficToSmall
log.info("Using {} if existing models are integrated!", integrateExistingTrafficToSmallScaleCommercial.getClass().getSimpleName());
}
if (getCommercialTourSpecifications == null){
- this.getCommercialTourSpecifications = new DefaultTourSpecificationsByUsingKID2002();
+ this.commercialTourSpecifications = new DefaultTourSpecificationsByUsingKID2002();
log.info("Using default {} for tour specifications!", DefaultTourSpecificationsByUsingKID2002.class.getSimpleName());
} else {
- this.getCommercialTourSpecifications = getCommercialTourSpecifications;
+ this.commercialTourSpecifications = getCommercialTourSpecifications;
log.info("Using {} for tour specifications!", getCommercialTourSpecifications.getClass().getSimpleName());
}
+ if (vehicleSelection == null){
+ this.vehicleSelection = new DefaultVehicleSelection();
+ log.info("Using default {} for tour vehicle-selection!", DefaultVehicleSelection.class.getSimpleName());
+ } else {
+ this.vehicleSelection = vehicleSelection;
+ log.info("Using {} for tour vehicle-selection!", vehicleSelection.getClass().getSimpleName());
+ }
+ if (unhandledServicesSolution == null){
+ this.unhandledServicesSolution = new DefaultUnhandledServicesSolution(this);
+ log.info("Using default {} for unhandled-services-solution", DefaultUnhandledServicesSolution.class.getSimpleName());
+ } else {
+ this.unhandledServicesSolution = unhandledServicesSolution;
+ log.info("Using {} for unhandled-services-solution!", unhandledServicesSolution.getClass().getSimpleName());
+ }
}
public static void main(String[] args) {
@@ -243,7 +278,7 @@ public Integer call() throws Exception {
readVehicleTypes.keySet().removeIf(vehicleType -> !usedCarrierVehicleTypes.contains(vehicleType));
if (Objects.requireNonNull(usedCreationOption) == CreationOption.useExistingCarrierFileWithoutSolution) {
- solveSeparatedVRPs(scenario, null);
+ solveSeparatedVRPs(scenario);
}
}
default -> {
@@ -252,20 +287,20 @@ public Integer call() throws Exception {
}
indexZones = SmallScaleCommercialTrafficUtils.getIndexZones(shapeFileZonePath, shapeCRS, shapeFileZoneNameColumn);
- Map> resultingDataPerZone = readDataDistribution(pathToDataDistributionToZones);
+ resultingDataPerZone = readDataDistribution(pathToDataDistributionToZones);
filterFacilitiesForZones(scenario, facilitiesPerZone);
- Map, Link>> linksPerZone = filterLinksForZones(scenario, indexZones, facilitiesPerZone, shapeFileZoneNameColumn);
+ linksPerZone = filterLinksForZones(scenario, indexZones, facilitiesPerZone, shapeFileZoneNameColumn);
switch (usedSmallScaleCommercialTrafficType) {
case commercialPersonTraffic, goodsTraffic ->
- createCarriersAndDemand(output, scenario, resultingDataPerZone, linksPerZone,
+ createCarriersAndDemand(output, scenario,
usedSmallScaleCommercialTrafficType.toString(),
includeExistingModels);
case completeSmallScaleCommercialTraffic -> {
- createCarriersAndDemand(output, scenario, resultingDataPerZone, linksPerZone, "commercialPersonTraffic",
+ createCarriersAndDemand(output, scenario, "commercialPersonTraffic",
includeExistingModels);
includeExistingModels = false; // because already included in the step before
- createCarriersAndDemand(output, scenario, resultingDataPerZone, linksPerZone, "goodsTraffic",
+ createCarriersAndDemand(output, scenario, "goodsTraffic",
includeExistingModels);
}
default -> throw new RuntimeException("No traffic type selected.");
@@ -277,7 +312,7 @@ public Integer call() throws Exception {
new CarrierPlanWriter(CarriersUtils.addOrGetCarriers(scenario))
.write(scenario.getConfig().controller().getOutputDirectory() + "/"
+ scenario.getConfig().controller().getRunId() + ".output_CarrierDemand.xml");
- solveSeparatedVRPs(scenario, linksPerZone);
+ solveSeparatedVRPs(scenario);
}
}
if (config.controller().getRunId() == null)
@@ -298,13 +333,21 @@ public Integer call() throws Exception {
controler.run();
+ //Analysis
+ System.out.println("Starting Analysis for Carriers of small scale commercial traffic.");
+ //TODO perhaps change to complete carrier analysis
+ RunFreightAnalysisEventBased freightAnalysis = new RunFreightAnalysisEventBased(CarriersUtils.addOrGetCarriers(scenario), output.resolve("CarrierAnalysis").toString());
+ freightAnalysis.runCarriersAnalysis();
+ System.out.println("Finishing Analysis of Carrier.");
+
SmallScaleCommercialTrafficUtils.createPlansBasedOnCarrierPlans(controler.getScenario(),
usedSmallScaleCommercialTrafficType.toString(), output, modelName, sampleName, nameOutputPopulation, numberOfPlanVariantsPerAgent);
return 0;
}
- /** Creates a map with the different facility types per building.
+ /**
+ * Creates a map with the different facility types per building.
* @param scenario complete Scenario
* @param facilitiesPerZone Map with facilities per zone
*/
@@ -318,11 +361,13 @@ private void filterFacilitiesForZones(Scenario scenario, Map, Link>> linksPerZone) throws Exception {
-
+ private void solveSeparatedVRPs(Scenario originalScenario) throws Exception {
boolean splitCarrier = true;
boolean splitVRPs = false;
int maxServicesPerCarrier = 100;
@@ -330,6 +375,7 @@ private void solveSeparatedVRPs(Scenario originalScenario, Map, Carrier> solvedCarriers = new HashMap<>();
List> keyList = new ArrayList<>(allCarriers.keySet());
+ Map, List>> carrierId2subCarrierIds = new HashMap<>();
CarriersUtils.getCarriers(originalScenario).getCarriers().values().forEach(carrier -> {
if (CarriersUtils.getJspritIterations(carrier) == 0) {
allCarriers.remove(carrier.getId());
@@ -389,6 +435,9 @@ private void solveSeparatedVRPs(Scenario originalScenario, Map newCarrier.getAttributes()
.putAttribute(attribute, carrier.getAttributes().getAttribute(attribute)));
+ carrierId2subCarrierIds.putIfAbsent(carrier.getId(), new LinkedList<>());
+ carrierId2subCarrierIds.get(carrier.getId()).add(newCarrier.getId());
+
List> vehiclesForNewCarrier = new ArrayList<>(
carrier.getCarrierCapabilities().getCarrierVehicles().keySet());
List> servicesForNewCarrier = new ArrayList<>(
@@ -428,9 +477,20 @@ private void solveSeparatedVRPs(Scenario originalScenario, Map oldCarrierId : carrierId2subCarrierIds.keySet()) {
+ for (Id newCarrierId : carrierId2subCarrierIds.get(oldCarrierId)) {
+ carrierId2carrierAttributes.put(newCarrierId, carrierId2carrierAttributes.get(oldCarrierId));
+ }
+ }
+
log.info("Solving carriers {}-{} of all {} carriers. This are {} VRP to solve.", fromIndex + 1, toIndex, allCarriers.size(),
subCarriers.size());
CarriersUtils.runJsprit(originalScenario);
+ List nonCompleteSolvedCarriers = unhandledServicesSolution.createListOfCarrierWithUnhandledJobs(originalScenario);
+ if (!nonCompleteSolvedCarriers.isEmpty())
+ unhandledServicesSolution.tryToSolveAllCarriersCompletely(originalScenario, nonCompleteSolvedCarriers);
solvedCarriers.putAll(CarriersUtils.getCarriers(originalScenario).getCarriers());
CarriersUtils.getCarriers(originalScenario).getCarriers().clear();
if (!splitVRPs)
@@ -453,10 +513,8 @@ private void solveSeparatedVRPs(Scenario originalScenario, Map> resultingDataPerZone,
- Map, Link>> linksPerZone, String smallScaleCommercialTrafficType,
+ String smallScaleCommercialTrafficType,
boolean includeExistingModels) throws Exception {
-
ArrayList modesORvehTypes;
if (smallScaleCommercialTrafficType.equals("goodsTraffic"))
modesORvehTypes = new ArrayList<>(
@@ -478,16 +536,15 @@ else if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic"))
integrateExistingTrafficToSmallScaleCommercial.reduceDemandBasedOnExistingCarriers(scenario, linksPerZone, smallScaleCommercialTrafficType,
trafficVolumePerTypeAndZone_start, trafficVolumePerTypeAndZone_stop);
}
- final TripDistributionMatrix odMatrix = createTripDistribution(trafficVolumePerTypeAndZone_start,
- trafficVolumePerTypeAndZone_stop, smallScaleCommercialTrafficType, scenario, output, linksPerZone);
- createCarriers(scenario, odMatrix, resultingDataPerZone, smallScaleCommercialTrafficType, linksPerZone);
+ odMatrix = createTripDistribution(trafficVolumePerTypeAndZone_start,
+ trafficVolumePerTypeAndZone_stop, smallScaleCommercialTrafficType, scenario, output);
+ createCarriers(scenario, smallScaleCommercialTrafficType);
}
/**
* Reads and checks config if all necessary parameters are set.
*/
private Config readAndCheckConfig(Path configPath, String modelName, String sampleName, Path output) throws Exception {
-
Config config = ConfigUtils.loadConfig(configPath.toString());
if (output == null || output.toString().isEmpty())
config.controller().setOutputDirectory(Path.of(config.controller().getOutputDirectory()).resolve(modelName)
@@ -559,18 +616,22 @@ public void install() {
/**
* Creates the carriers and the related demand, based on the generated
* TripDistributionMatrix.
+ * @param scenario Scenario (loaded from your config), where the carriers will be put into
+ * @param smallScaleCommercialTrafficType Selected traffic types. Options: commercialPersonTraffic, goodsTraffic
*/
- private void createCarriers(Scenario scenario, TripDistributionMatrix odMatrix,
- Map> resultingDataPerZone, String smallScaleCommercialTrafficType,
- Map, Link>> linksPerZone) {
+ public void createCarriers(Scenario scenario,
+ String smallScaleCommercialTrafficType) {
+ //Save the given data
+ RandomGenerator rng = new MersenneTwister(scenario.getConfig().global().getRandomSeed());
+
int maxNumberOfCarrier = odMatrix.getListOfPurposes().size() * odMatrix.getListOfZones().size()
* odMatrix.getListOfModesOrVehTypes().size();
int createdCarrier = 0;
int fixedNumberOfVehiclePerTypeAndLocation = 1; //TODO possible improvement, perhaps check KiD
- EnumeratedDistribution tourDistribution = getCommercialTourSpecifications.createTourDistribution(smallScaleCommercialTrafficType, rng);
+ tourDistribution = commercialTourSpecifications.createTourDistribution(rng);
- Map> stopDurationTimeSelector = getCommercialTourSpecifications.createStopDurationDistributionPerCategory(smallScaleCommercialTrafficType, rng);
+ serviceDurationTimeSelector = commercialTourSpecifications.createStopDurationDistributionPerCategory(rng);
CarrierVehicleTypes carrierVehicleTypes = CarriersUtils.getCarrierVehicleTypes(scenario);
Map, VehicleType> additionalCarrierVehicleTypes = scenario.getVehicles().getVehicleTypes();
@@ -589,6 +650,8 @@ private void createCarriers(Scenario scenario, TripDistributionMatrix odMatrix,
for (Integer purpose : odMatrix.getListOfPurposes()) {
for (String startZone : odMatrix.getListOfZones()) {
for (String modeORvehType : odMatrix.getListOfModesOrVehTypes()) {
+
+ // Check if this purpose, startZone, modeORvehType combination is a possiblr starting location (by looking if it has a trip-distribution-entry)
boolean isStartingLocation = false;
checkIfIsStartingPosition:
{
@@ -601,87 +664,32 @@ private void createCarriers(Scenario scenario, TripDistributionMatrix odMatrix,
}
}
}
- //TODO make vehcile selection configurable
+
if (isStartingLocation) {
- double occupancyRate = 0;
- String[] possibleVehicleTypes = null;
- ArrayList startCategory = new ArrayList<>();
- ArrayList stopCategory = new ArrayList<>();
- stopCategory.add("Employee Primary Sector");
- stopCategory.add("Employee Construction");
- stopCategory.add("Employee Secondary Sector Rest");
- stopCategory.add("Employee Retail");
- stopCategory.add("Employee Traffic/Parcels");
- stopCategory.add("Employee Tertiary Sector Rest");
- stopCategory.add("Inhabitants");
- if (purpose == 1) {
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"};
- occupancyRate = 1.5;
- }
- startCategory.add("Employee Secondary Sector Rest");
- stopCategory.clear();
- stopCategory.add("Employee Secondary Sector Rest");
- } else if (purpose == 2) {
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"};
- occupancyRate = 1.6;
- }
- startCategory.add("Employee Secondary Sector Rest");
- } else if (purpose == 3) {
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- possibleVehicleTypes = new String[]{"golf1.4", "c_zero"};
- occupancyRate = 1.2;
- }
- startCategory.add("Employee Retail");
- startCategory.add("Employee Tertiary Sector Rest");
- } else if (purpose == 4) {
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- possibleVehicleTypes = new String[]{"golf1.4", "c_zero"};
- occupancyRate = 1.2;
- }
- startCategory.add("Employee Traffic/Parcels");
- } else if (purpose == 5) {
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- possibleVehicleTypes = new String[]{"mercedes313", "e_SpaceTourer"};
- occupancyRate = 1.7;
- }
- startCategory.add("Employee Construction");
- } else if (purpose == 6) {
- startCategory.add("Inhabitants");
- }
- if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
- occupancyRate = 1.;
- switch (modeORvehType) {
- case "vehTyp1" ->
- possibleVehicleTypes = new String[]{"vwCaddy", "e_SpaceTourer"}; // possible to add more types, see source
- case "vehTyp2" ->
- possibleVehicleTypes = new String[]{"mercedes313", "e_SpaceTourer"};
- case "vehTyp3", "vehTyp4" ->
- possibleVehicleTypes = new String[]{"light8t", "light8t_electro"};
- case "vehTyp5" ->
- possibleVehicleTypes = new String[]{"medium18t", "medium18t_electro", "heavy40t", "heavy40t_electro"};
- }
- }
+ // Get the vehicle-types and start/stop-categories
+ VehicleSelection.OdMatrixEntryInformation odMatrixEntry = vehicleSelection.getOdMatrixEntryInformation(purpose, modeORvehType, smallScaleCommercialTrafficType);
// use only types of the possibleTypes which are in the given types file
List vehicleTypes = new ArrayList<>();
- assert possibleVehicleTypes != null;
+ assert odMatrixEntry.possibleVehicleTypes != null;
- for (String possibleVehicleType : possibleVehicleTypes) {
+ for (String possibleVehicleType : odMatrixEntry.possibleVehicleTypes) {
if (CarriersUtils.getCarrierVehicleTypes(scenario).getVehicleTypes().containsKey(
Id.create(possibleVehicleType, VehicleType.class)))
vehicleTypes.add(possibleVehicleType);
}
- // find a start category with existing employees in this zone
- Collections.shuffle(startCategory, rnd);
- String selectedStartCategory = startCategory.getFirst();
+
+ // find a (random) start category with existing employees in this zone
+ Collections.shuffle(odMatrixEntry.possibleStartCategories, rnd);
+ String selectedStartCategory = odMatrixEntry.possibleStartCategories.getFirst();
for (int count = 1; resultingDataPerZone.get(startZone).getDouble(selectedStartCategory) == 0; count++) {
- if (count <= startCategory.size())
- selectedStartCategory = startCategory.get(rnd.nextInt(startCategory.size()));
+ if (count <= odMatrixEntry.possibleStartCategories.size())
+ selectedStartCategory = odMatrixEntry.possibleStartCategories.get(rnd.nextInt(odMatrixEntry.possibleStartCategories.size()));
else
- selectedStartCategory = stopCategory.get(rnd.nextInt(stopCategory.size()));
+ selectedStartCategory = odMatrixEntry.possibleStopCategories.get(rnd.nextInt(odMatrixEntry.possibleStopCategories.size()));
}
+
+ // Generate carrierName
String carrierName = null;
if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
carrierName = "Carrier_Goods_" + startZone + "_purpose_" + purpose + "_" + modeORvehType;
@@ -689,94 +697,96 @@ private void createCarriers(Scenario scenario, TripDistributionMatrix odMatrix,
carrierName = "Carrier_Business_" + startZone + "_purpose_" + purpose;
int numberOfDepots = odMatrix.getSumOfServicesForStartZone(startZone, modeORvehType, purpose,
smallScaleCommercialTrafficType);
- FleetSize fleetSize = FleetSize.FINITE;
+
+ // Create the Carrier
+ CarrierCapabilities.FleetSize fleetSize = CarrierCapabilities.FleetSize.FINITE;
ArrayList vehicleDepots = new ArrayList<>();
createdCarrier++;
log.info("Create carrier number {} of a maximum Number of {} carriers.", createdCarrier, maxNumberOfCarrier);
log.info("Carrier: {}; depots: {}; services: {}", carrierName, numberOfDepots,
(int) Math.ceil(odMatrix.getSumOfServicesForStartZone(startZone, modeORvehType,
- purpose, smallScaleCommercialTrafficType) / occupancyRate));
- createNewCarrierAndAddVehicleTypes(scenario, purpose, startZone,
- selectedStartCategory, carrierName, vehicleTypes, numberOfDepots, fleetSize,
- fixedNumberOfVehiclePerTypeAndLocation, vehicleDepots, linksPerZone, smallScaleCommercialTrafficType,
- tourDistribution);
- log.info("Create services for carrier: {}", carrierName);
- for (String stopZone : odMatrix.getListOfZones()) {
- int trafficVolumeForOD = Math.round((float)odMatrix.getTripDistributionValue(startZone,
- stopZone, modeORvehType, purpose, smallScaleCommercialTrafficType));
- int numberOfJobs = (int) Math.ceil(trafficVolumeForOD / occupancyRate);
- if (numberOfJobs == 0)
- continue;
- // find a category for the tour stop with existing employees in this zone
- String selectedStopCategory = stopCategory.get(rnd.nextInt(stopCategory.size()));
- while (resultingDataPerZone.get(stopZone).getDouble(selectedStopCategory) == 0)
- selectedStopCategory = stopCategory.get(rnd.nextInt(stopCategory.size()));
- String[] serviceArea = new String[]{stopZone};
- int serviceTimePerStop;
- if (selectedStartCategory.equals("Inhabitants"))
- serviceTimePerStop = getServiceTimePerStop(stopDurationTimeSelector, startCategory.getFirst(), modeORvehType, smallScaleCommercialTrafficType);
- else
- serviceTimePerStop = getServiceTimePerStop(stopDurationTimeSelector, selectedStartCategory, modeORvehType, smallScaleCommercialTrafficType);
+ purpose, smallScaleCommercialTrafficType) / odMatrixEntry.occupancyRate));
- TimeWindow serviceTimeWindow = TimeWindow.newInstance(0,
- 24 * 3600); //TODO eventuell anpassen wegen veränderter Tourzeiten
- createServices(scenario, vehicleDepots, selectedStopCategory, carrierName,
- numberOfJobs, serviceArea, serviceTimePerStop, serviceTimeWindow, linksPerZone);
- }
+ CarrierAttributes carrierAttributes = new CarrierAttributes(purpose, startZone, selectedStartCategory, modeORvehType,
+ smallScaleCommercialTrafficType, vehicleDepots, odMatrixEntry);
+ carrierId2carrierAttributes.put(Id.create(carrierName, Carrier.class), carrierAttributes);
+
+ createNewCarrierAndAddVehicleTypes(
+ scenario, carrierName, carrierAttributes,
+ vehicleTypes, numberOfDepots, fleetSize,
+ fixedNumberOfVehiclePerTypeAndLocation);
+
+ // Now Create services for this carrier
+ Carrier newCarrier = CarriersUtils.getCarriers(scenario).getCarriers().get(Id.create(carrierName, Carrier.class));
+
+ createServices(newCarrier, carrierAttributes);
}
}
}
}
-
-// System.out.println("Final results for the start time distribution");
-// tourStartTimeSelector.writeResults();
-
-// System.out.println("Final results for the tour duration distribution");
-// tourDurationTimeSelector.writeResults();
-
-// for (StopDurationGoodTrafficKey sector : stopDurationTimeSelector.keySet()) {
-// System.out.println("Final results for the stop duration distribution in sector " + sector);
-// stopDurationTimeSelector.get(sector);
-// }
-
log.warn("The jspritIterations are now set to {} in this simulation!", jspritIterations);
log.info("Finished creating {} carriers including related services.", createdCarrier);
}
/**
- * Creates the services for one carrier.
+ * Generates and adds the services for the given carrier.
*/
- private void createServices(Scenario scenario, ArrayList noPossibleLinks,
- String selectedStopCategory, String carrierName, int numberOfJobs, String[] serviceArea,
- Integer serviceTimePerStop, TimeWindow serviceTimeWindow,
- Map, Link>> linksPerZone) {
+ private void createServices(Carrier newCarrier,
+ CarrierAttributes carrierAttributes) {
+ log.info("Create services for carrier: {}", newCarrier.getId());
+ for (String stopZone : odMatrix.getListOfZones()) {
+ int trafficVolumeForOD = Math.round((float)odMatrix.getTripDistributionValue(carrierAttributes.startZone,
+ stopZone, carrierAttributes.modeORvehType, carrierAttributes.purpose, carrierAttributes.smallScaleCommercialTrafficType));
+ int numberOfJobs = (int) Math.ceil(trafficVolumeForOD / carrierAttributes.odMatrixEntry.occupancyRate);
+ if (numberOfJobs == 0)
+ continue;
+ // find a category for the tour stop with existing employees in this zone
+ String selectedStopCategory = carrierAttributes.odMatrixEntry.possibleStopCategories.get(rnd.nextInt(carrierAttributes.odMatrixEntry.possibleStopCategories.size()));
+ while (resultingDataPerZone.get(stopZone).getDouble(selectedStopCategory) == 0)
+ selectedStopCategory = carrierAttributes.odMatrixEntry.possibleStopCategories.get(rnd.nextInt(carrierAttributes.odMatrixEntry.possibleStopCategories.size()));
+ for (int i = 0; i < numberOfJobs; i++) {
+ int serviceTimePerStop;
+ if (carrierAttributes.selectedStartCategory.equals("Inhabitants")){
+ CarrierAttributes inhabitantAttributes = new CarrierAttributes(carrierAttributes.purpose, carrierAttributes.startZone,
+ carrierAttributes.odMatrixEntry.possibleStartCategories.getFirst(), carrierAttributes.modeORvehType,
+ carrierAttributes.smallScaleCommercialTrafficType, carrierAttributes.vehicleDepots, carrierAttributes.odMatrixEntry);
+ serviceTimePerStop = unhandledServicesSolution.getServiceTimePerStop(newCarrier, inhabitantAttributes, 0);
- String stopZone = serviceArea[0];
+ }
+ else {
+ serviceTimePerStop = unhandledServicesSolution.getServiceTimePerStop(newCarrier, carrierAttributes, 0);
+ }
- for (int i = 0; i < numberOfJobs; i++) {
+ TimeWindow serviceTimeWindow = TimeWindow.newInstance(0,
+ 36 * 3600); // extended time window, so that late tours can handle it
+ createService(newCarrier, carrierAttributes.vehicleDepots, selectedStopCategory, stopZone, serviceTimePerStop, serviceTimeWindow);
+ }
+ }
+ }
- Id linkId = findPossibleLink(stopZone, selectedStopCategory, noPossibleLinks, linksPerZone);
- Id idNewService = Id.create(carrierName + "_" + linkId + "_" + rnd.nextInt(10000),
- CarrierService.class);
+ /**
+ * Adds a service with the given attributes to the carrier.
+ */
+ private void createService(Carrier newCarrier, ArrayList noPossibleLinks, String selectedStopCategory, String stopZone,
+ Integer serviceTimePerStop, TimeWindow serviceTimeWindow) {
- CarrierService thisService = CarrierService.Builder.newInstance(idNewService, linkId)
- .setServiceDuration(serviceTimePerStop).setServiceStartTimeWindow(serviceTimeWindow).build();
- CarriersUtils.getCarriers(scenario).getCarriers().get(Id.create(carrierName, Carrier.class)).getServices()
- .put(thisService.getId(), thisService);
- }
+ Id linkId = findPossibleLink(stopZone, selectedStopCategory, noPossibleLinks);
+ Id idNewService = Id.create(newCarrier.getId().toString() + "_" + linkId + "_" + rnd.nextInt(10000),
+ CarrierService.class);
+ CarrierService thisService = CarrierService.Builder.newInstance(idNewService, linkId)
+ .setServiceDuration(serviceTimePerStop).setServiceStartTimeWindow(serviceTimeWindow).build();
+ newCarrier.getServices().put(thisService.getId(), thisService);
}
+
+
/**
* Creates the carrier and the related vehicles.
*/
- private void createNewCarrierAndAddVehicleTypes(Scenario scenario, Integer purpose, String startZone,
- String selectedStartCategory, String carrierName,
- List vehicleTypes, int numberOfDepots, FleetSize fleetSize,
- int fixedNumberOfVehiclePerTypeAndLocation,
- List vehicleDepots, Map, Link>> linksPerZone,
- String smallScaleCommercialTrafficType,
- EnumeratedDistribution tourStartTimeSelector) {
+ private void createNewCarrierAndAddVehicleTypes(Scenario scenario, String carrierName, CarrierAttributes carrierAttributes,
+ List vehicleTypes, int numberOfDepots, CarrierCapabilities.FleetSize fleetSize,
+ int fixedNumberOfVehiclePerTypeAndLocation) {
Carriers carriers = CarriersUtils.addOrGetCarriers(scenario);
CarrierVehicleTypes carrierVehicleTypes = CarriersUtils.getCarrierVehicleTypes(scenario);
@@ -784,28 +794,29 @@ private void createNewCarrierAndAddVehicleTypes(Scenario scenario, Integer purpo
CarrierCapabilities carrierCapabilities;
Carrier thisCarrier = CarriersUtils.createCarrier(Id.create(carrierName, Carrier.class));
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic") && purpose == 3)
- thisCarrier.getAttributes().putAttribute("subpopulation", smallScaleCommercialTrafficType + "_service");
+ if (carrierAttributes.smallScaleCommercialTrafficType.equals("commercialPersonTraffic") && carrierAttributes.purpose == 3)
+ thisCarrier.getAttributes().putAttribute("subpopulation", carrierAttributes.smallScaleCommercialTrafficType + "_service");
else
- thisCarrier.getAttributes().putAttribute("subpopulation", smallScaleCommercialTrafficType);
+ thisCarrier.getAttributes().putAttribute("subpopulation", carrierAttributes.smallScaleCommercialTrafficType);
- thisCarrier.getAttributes().putAttribute("purpose", purpose);
- thisCarrier.getAttributes().putAttribute("tourStartArea", startZone);
+ thisCarrier.getAttributes().putAttribute("purpose", carrierAttributes.purpose);
+ thisCarrier.getAttributes().putAttribute("tourStartArea", carrierAttributes.startZone);
if (jspritIterations > 0)
CarriersUtils.setJspritIterations(thisCarrier, jspritIterations);
carrierCapabilities = CarrierCapabilities.Builder.newInstance().setFleetSize(fleetSize).build();
+
carriers.addCarrier(thisCarrier);
- while (vehicleDepots.size() < numberOfDepots) {
- Id linkId = findPossibleLink(startZone, selectedStartCategory, null, linksPerZone);
- vehicleDepots.add(linkId.toString());
+ while (carrierAttributes.vehicleDepots.size() < numberOfDepots) {
+ Id linkId = findPossibleLink(carrierAttributes.startZone, carrierAttributes.selectedStartCategory, null);
+ carrierAttributes.vehicleDepots.add(linkId.toString());
}
- for (String singleDepot : vehicleDepots) {
- TourStartAndDuration t = tourStartTimeSelector.sample();
+ for (String singleDepot : carrierAttributes.vehicleDepots) {
+ GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration t = tourDistribution.get(carrierAttributes.smallScaleCommercialTrafficType).sample();
- int vehicleStartTime = getVehicleStartTime(t);
- int tourDuration = getVehicleTourDuration(t);
+ int vehicleStartTime = t.getVehicleStartTime();
+ int tourDuration = t.getVehicleTourDuration();
int vehicleEndTime = vehicleStartTime + tourDuration;
for (String thisVehicleType : vehicleTypes) { //TODO Flottenzusammensetzung anpassen. Momentan pro Depot alle Fahrzeugtypen 1x erzeugen
VehicleType thisType = carrierVehicleTypes.getVehicleTypes()
@@ -831,52 +842,10 @@ private void createNewCarrierAndAddVehicleTypes(Scenario scenario, Integer purpo
}
}
- /**
- * Gives a duration for the created tour under the given probability.
- *
- */
- private int getVehicleTourDuration(TourStartAndDuration t) {
- return (int) rnd.nextDouble(t.minDuration * 60, t.maxDuration * 60);
- }
-
- /**
- * Gives a tour start time for the created tour under the given probability.
- */
- private int getVehicleStartTime(TourStartAndDuration t) {
- return rnd.nextInt(t.hourLower * 3600, t.hourUpper * 3600);
- }
-
-
- /**
- * Give a service duration based on the purpose and the trafficType under a given probability
- *
- * @param serviceDurationTimeSelector the selector for the service duration
- * @param employeeCategory the category of the employee
- * @param modeORvehType the mode or vehicle type
- * @param smallScaleCommercialTrafficType the traffic type
- * @return the service duration
- */
- private Integer getServiceTimePerStop(Map> serviceDurationTimeSelector,
- String employeeCategory,
- String modeORvehType, String smallScaleCommercialTrafficType) {
- StopDurationGoodTrafficKey key = null;
- if (smallScaleCommercialTrafficType.equals(SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()))
- key = makeStopDurationGoodTrafficKey(employeeCategory, null);
- else if (smallScaleCommercialTrafficType.equals(SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
- key = makeStopDurationGoodTrafficKey(employeeCategory, modeORvehType);
- }
- DurationsBounds serviceDurationBounds = serviceDurationTimeSelector.get(key).sample();
- int serviceDurationLowerBound = serviceDurationBounds.minDuration();
- int serviceDurationUpperBound = serviceDurationBounds.maxDuration();
- return rnd.nextInt(serviceDurationLowerBound * 60, serviceDurationUpperBound * 60);
- }
-
/**
* Finds a possible link for a service or the vehicle location.
*/
- private Id findPossibleLink(String zone, String selectedCategory, List noPossibleLinks,
- Map, Link>> linksPerZone) {
-
+ private Id findPossibleLink(String zone, String selectedCategory, List noPossibleLinks) {
Id newLink = null;
for (int a = 0; newLink == null && a < facilitiesPerZone.get(zone).get(selectedCategory).size() * 2; a++) {
@@ -958,7 +927,7 @@ private static void findNearestLinkForZonesWithoutLinks(Network networkToChange,
private TripDistributionMatrix createTripDistribution(
Map> trafficVolume_start,
Map> trafficVolume_stop,
- String smallScaleCommercialTrafficType, Scenario scenario, Path output, Map, Link>> linksPerZone)
+ String smallScaleCommercialTrafficType, Scenario scenario, Path output)
throws Exception {
ArrayList listOfZones = new ArrayList<>();
@@ -991,6 +960,26 @@ private TripDistributionMatrix createTripDistribution(
return odMatrix;
}
+ public Map> getTourDistribution() {
+ return tourDistribution;
+ }
+
+ public Map> getServiceDurationTimeSelector() {
+ return serviceDurationTimeSelector;
+ }
+
+ public Map, CarrierAttributes> getCarrierId2carrierAttributes() {
+ return carrierId2carrierAttributes;
+ }
+
+ public int getMaxReplanningIterations(){
+ return maxReplanningIterations;
+ }
+
+ public int getAdditionalTravelBufferPerIterationInMinutes(){
+ return additionalTravelBufferPerIterationInMinutes;
+ }
+
private static class MyCarrierScoringFunctionFactory implements CarrierScoringFunctionFactory {
@Inject
@@ -1203,33 +1192,68 @@ public double getScore() {
}
- public record StopDurationGoodTrafficKey(String employeeCategory, String vehicleType) {
+ public record ServiceDurationPerCategoryKey(String employeeCategory, String vehicleType, String smallScaleCommercialTrafficType) {
@Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ServiceDurationPerCategoryKey other = (ServiceDurationPerCategoryKey) obj;
+ if (employeeCategory == null) {
+ if (other.employeeCategory != null)
return false;
- StopDurationGoodTrafficKey other = (StopDurationGoodTrafficKey) obj;
- if (employeeCategory == null) {
- if (other.employeeCategory != null)
- return false;
- } else if (!employeeCategory.equals(other.employeeCategory))
+ } else if (!employeeCategory.equals(other.employeeCategory))
+ return false;
+ if (vehicleType == null) {
+ if (other.vehicleType != null)
return false;
- if (vehicleType == null) {
- return other.vehicleType == null;
- } else return vehicleType.equals(other.vehicleType);
- }
+ } else if (!vehicleType.equals(other.vehicleType))
+ return false;
+ if (smallScaleCommercialTrafficType == null) {
+ return other.smallScaleCommercialTrafficType == null;
+ } else return smallScaleCommercialTrafficType.equals(other.smallScaleCommercialTrafficType);
}
- public static StopDurationGoodTrafficKey makeStopDurationGoodTrafficKey(String employeeCategory, String vehicleType) {
- return new StopDurationGoodTrafficKey(employeeCategory, vehicleType);
+ }
+ public static ServiceDurationPerCategoryKey makeServiceDurationPerCategoryKey(String employeeCategory, String vehicleType, String smallScaleCommercialTrafficType) {
+ return new ServiceDurationPerCategoryKey(employeeCategory, vehicleType, smallScaleCommercialTrafficType);
}
- public record TourStartAndDuration(int hourLower, int hourUpper, double minDuration, double maxDuration) {}
+ public record TourStartAndDuration(int hourLower, int hourUpper, double minDuration, double maxDuration) {
+ /**
+ * Gives a duration for the created tour under the given probability.
+ */
+ public int getVehicleTourDuration() {
+ if (minDuration == 0.)
+ return (int) maxDuration() * 60;
+ else
+ return (int) rnd.nextDouble(minDuration * 60, maxDuration * 60);
+ }
+
+ /**
+ * Gives a tour start time for the created tour under the given probability.
+ */
+ public int getVehicleStartTime() {
+ return rnd.nextInt(hourLower * 3600, hourUpper * 3600);
+ }
+ }
public record DurationsBounds(int minDuration, int maxDuration) {}
+ /**
+ * The attributes of a carrier, used during the generation
+ * @param purpose purpose of this carrier denoted as an index. Can be used in {@link VehicleSelection} to get more information about this carrier.
+ * @param startZone start zone of this carrier, entry from {@link TripDistributionMatrix#getListOfZones()}
+ * @param selectedStartCategory start category of this carrier, selected randomly from {@link VehicleSelection.OdMatrixEntryInformation#possibleStartCategories}
+ * @param modeORvehType entry from {@link TripDistributionMatrix#getListOfModesOrVehTypes()}
+ * @param smallScaleCommercialTrafficType Entry from {@link SmallScaleCommercialTrafficType} for this carrier
+ * (NOTE: This value only differs between carriers if {@link SmallScaleCommercialTrafficType#completeSmallScaleCommercialTraffic is selected)
+ * @param vehicleDepots Containing the depots of this carrier with linkIds as strings
+ */
+ public record CarrierAttributes(int purpose, String startZone, String selectedStartCategory, String modeORvehType,
+ String smallScaleCommercialTrafficType, ArrayList vehicleDepots,
+ VehicleSelection.OdMatrixEntryInformation odMatrixEntry) {}
}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGeneration.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGeneration.java
index a536f751552..34af805ee00 100644
--- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGeneration.java
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGeneration.java
@@ -25,6 +25,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.core.utils.io.IOUtils;
+import org.matsim.smallScaleCommercialTrafficGeneration.data.GetGenerationRates;
import java.io.BufferedWriter;
import java.io.IOException;
@@ -246,865 +247,16 @@ private static void writeCSVTrafficVolume(Map> setGenerationRates(String smallScaleCommercialTrafficType,
- String generationType) {
-
- Map> generationRates = new HashMap<>();
- Map ratesPerPurpose1 = new HashMap<>();
- Map ratesPerPurpose2 = new HashMap<>();
- Map ratesPerPurpose3 = new HashMap<>();
- Map ratesPerPurpose4 = new HashMap<>();
- Map ratesPerPurpose5 = new HashMap<>();
- Map ratesPerPurpose6 = new HashMap<>();
- if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
- if (generationType.equals("start")) {
- ratesPerPurpose1.put("Inhabitants", 0.0);
- ratesPerPurpose1.put("Employee", 0.0);
- ratesPerPurpose1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1.put("Employee Construction", 0.0);
- ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.059);
- ratesPerPurpose1.put("Employee Retail", 0.0);
- ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2.put("Inhabitants", 0.0);
- ratesPerPurpose2.put("Employee", 0.029);
- ratesPerPurpose2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2.put("Employee Construction", 0.0);
- ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.045);
- ratesPerPurpose2.put("Employee Retail", 0.0);
- ratesPerPurpose2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose3.put("Inhabitants", 0.0);
- ratesPerPurpose3.put("Employee", 0.021);
- ratesPerPurpose3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3.put("Employee Construction", 0.0);
- ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3.put("Employee Retail", 0.0192);
- ratesPerPurpose3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.184);
-
- ratesPerPurpose4.put("Inhabitants", 0.0);
- ratesPerPurpose4.put("Employee", 0.021);
- ratesPerPurpose4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4.put("Employee Construction", 0.0);
- ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4.put("Employee Retail", 0.0);
- ratesPerPurpose4.put("Employee Traffic/Parcels", 0.203);
- ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5.put("Inhabitants", 0.0);
- ratesPerPurpose5.put("Employee", 0.03);
- ratesPerPurpose5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5.put("Employee Construction", 0.29);
- ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5.put("Employee Retail", 0.0);
- ratesPerPurpose5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.0);
- } else if (generationType.equals("stop")) {
- ratesPerPurpose1.put("Inhabitants", 0.0);
- ratesPerPurpose1.put("Employee", 0.0);
- ratesPerPurpose1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1.put("Employee Construction", 0.0);
- ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.02);
- ratesPerPurpose1.put("Employee Retail", 0.0);
- ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2.put("Inhabitants", 0.002);
- ratesPerPurpose2.put("Employee", 0.0);
- ratesPerPurpose2.put("Employee Primary Sector", 0.029);
- ratesPerPurpose2.put("Employee Construction", 0.029);
- ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.009);
- ratesPerPurpose2.put("Employee Retail", 0.029);
- ratesPerPurpose2.put("Employee Traffic/Parcels", 0.039);
- ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.029);
-
- ratesPerPurpose3.put("Inhabitants", 0.025);
- ratesPerPurpose3.put("Employee", 0.0);
- ratesPerPurpose3.put("Employee Primary Sector", 0.0168);
- ratesPerPurpose3.put("Employee Construction", 0.168);
- ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0168);
- ratesPerPurpose3.put("Employee Retail", 0.0168);
- ratesPerPurpose3.put("Employee Traffic/Parcels", 0.097);
- ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.168);
-
- ratesPerPurpose4.put("Inhabitants", 0.002);
- ratesPerPurpose4.put("Employee", 0.0);
- ratesPerPurpose4.put("Employee Primary Sector", 0.025);
- ratesPerPurpose4.put("Employee Construction", 0.025);
- ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.025);
- ratesPerPurpose4.put("Employee Retail", 0.025);
- ratesPerPurpose4.put("Employee Traffic/Parcels", 0.075);
- ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.025);
-
- ratesPerPurpose5.put("Inhabitants", 0.004);
- ratesPerPurpose5.put("Employee", 0.0);
- ratesPerPurpose5.put("Employee Primary Sector", 0.015);
- ratesPerPurpose5.put("Employee Construction", 0.002);
- ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.015);
- ratesPerPurpose5.put("Employee Retail", 0.015);
- ratesPerPurpose5.put("Employee Traffic/Parcels", 0.02);
- ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.015);
-
- }
- } else if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
- if (generationType.equals("start")) {
- ratesPerPurpose1.put("Inhabitants", 0.0);
- ratesPerPurpose1.put("Employee", 0.0);
- ratesPerPurpose1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1.put("Employee Construction", 0.0);
- ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.023);
- ratesPerPurpose1.put("Employee Retail", 0.0);
- ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2.put("Inhabitants", 0.0);
- ratesPerPurpose2.put("Employee", 0.002);
- ratesPerPurpose2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2.put("Employee Construction", 0.0);
- ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.049);
- ratesPerPurpose2.put("Employee Retail", 0.0);
- ratesPerPurpose2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose3.put("Inhabitants", 0.0);
- ratesPerPurpose3.put("Employee", 0.002);
- ratesPerPurpose3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3.put("Employee Construction", 0.0);
- ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3.put("Employee Retail", 0.139);
- ratesPerPurpose3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.059);
-
- ratesPerPurpose4.put("Inhabitants", 0.0);
- ratesPerPurpose4.put("Employee", 0.002);
- ratesPerPurpose4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4.put("Employee Construction", 0.0);
- ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4.put("Employee Retail", 0.0);
- ratesPerPurpose4.put("Employee Traffic/Parcels", 0.333);
- ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5.put("Inhabitants", 0.0);
- ratesPerPurpose5.put("Employee", 0.002);
- ratesPerPurpose5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5.put("Employee Construction", 0.220);
- ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5.put("Employee Retail", 0.0);
- ratesPerPurpose5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6.put("Inhabitants", 0.009);
- ratesPerPurpose6.put("Employee", 0.0);
- ratesPerPurpose6.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6.put("Employee Construction", 0.0);
- ratesPerPurpose6.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6.put("Employee Retail", 0.0);
- ratesPerPurpose6.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6.put("Employee Tertiary Sector Rest", 0.0);
-
- } else if (generationType.equals("stop")) {
- ratesPerPurpose1.put("Inhabitants", 0.0);
- ratesPerPurpose1.put("Employee", 0.0);
- ratesPerPurpose1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1.put("Employee Construction", 0.0);
- ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.031);
- ratesPerPurpose1.put("Employee Retail", 0.0);
- ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2.put("Inhabitants", 0.001);
- ratesPerPurpose2.put("Employee", 0.0);
- ratesPerPurpose2.put("Employee Primary Sector", 0.001);
- ratesPerPurpose2.put("Employee Construction", 0.01);
- ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.011);
- ratesPerPurpose2.put("Employee Retail", 0.021);
- ratesPerPurpose2.put("Employee Traffic/Parcels", 0.001);
- ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.001);
-
- ratesPerPurpose3.put("Inhabitants", 0.009);
- ratesPerPurpose3.put("Employee", 0.0);
- ratesPerPurpose3.put("Employee Primary Sector", 0.02);
- ratesPerPurpose3.put("Employee Construction", 0.005);
- ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.029);
- ratesPerPurpose3.put("Employee Retail", 0.055);
- ratesPerPurpose3.put("Employee Traffic/Parcels", 0.02);
- ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.02);
-
- ratesPerPurpose4.put("Inhabitants", 0.014);
- ratesPerPurpose4.put("Employee", 0.0);
- ratesPerPurpose4.put("Employee Primary Sector", 0.02);
- ratesPerPurpose4.put("Employee Construction", 0.002);
- ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.11);
- ratesPerPurpose4.put("Employee Retail", 0.154);
- ratesPerPurpose4.put("Employee Traffic/Parcels", 0.02);
- ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.02);
-
- ratesPerPurpose5.put("Inhabitants", 0.002);
- ratesPerPurpose5.put("Employee", 0.0);
- ratesPerPurpose5.put("Employee Primary Sector", 0.005);
- ratesPerPurpose5.put("Employee Construction", 0.002);
- ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.01);
- ratesPerPurpose5.put("Employee Retail", 0.01);
- ratesPerPurpose5.put("Employee Traffic/Parcels", 0.005);
- ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.005);
-
- ratesPerPurpose6.put("Inhabitants", 0.002);
- ratesPerPurpose6.put("Employee", 0.0);
- ratesPerPurpose6.put("Employee Primary Sector", 0.005);
- ratesPerPurpose6.put("Employee Construction", 0.002);
- ratesPerPurpose6.put("Employee Secondary Sector Rest", 0.01);
- ratesPerPurpose6.put("Employee Retail", 0.01);
- ratesPerPurpose6.put("Employee Traffic/Parcels", 0.005);
- ratesPerPurpose6.put("Employee Tertiary Sector Rest", 0.005);
- }
- generationRates.put(6, ratesPerPurpose6);
- }
- generationRates.put(1, ratesPerPurpose1);
- generationRates.put(2, ratesPerPurpose2);
- generationRates.put(3, ratesPerPurpose3);
- generationRates.put(4, ratesPerPurpose4);
- generationRates.put(5, ratesPerPurpose5);
- return generationRates;
- }
-
- /**
- * Sets the commitment rates based on the IVV 2005 for the goodsTraffic. The
- * commitment rate for the commercialPersonTraffic is 1, because mode choice will be
- * done in MATSim.
- *
- * @param smallScaleCommercialTrafficType used trafficType (freight or business traffic)
- * @param commitmentType start or stop parameter
- */
- private static Map> setCommitmentRates(String smallScaleCommercialTrafficType,
- String commitmentType) {
- Map> commitmentRates = new HashMap<>();
-
- if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
-
- // the first number is the purpose; second number the vehicle type
- Map ratesPerPurpose1_1 = new HashMap<>();
- Map ratesPerPurpose1_2 = new HashMap<>();
- Map ratesPerPurpose1_3 = new HashMap<>();
- Map ratesPerPurpose1_4 = new HashMap<>();
- Map ratesPerPurpose1_5 = new HashMap<>();
- Map ratesPerPurpose2_1 = new HashMap<>();
- Map ratesPerPurpose2_2 = new HashMap<>();
- Map ratesPerPurpose2_3 = new HashMap<>();
- Map ratesPerPurpose2_4 = new HashMap<>();
- Map ratesPerPurpose2_5 = new HashMap<>();
- Map ratesPerPurpose3_1 = new HashMap<>();
- Map ratesPerPurpose3_2 = new HashMap<>();
- Map ratesPerPurpose3_3 = new HashMap<>();
- Map ratesPerPurpose3_4 = new HashMap<>();
- Map ratesPerPurpose3_5 = new HashMap<>();
- Map ratesPerPurpose4_1 = new HashMap<>();
- Map ratesPerPurpose4_2 = new HashMap<>();
- Map ratesPerPurpose4_3 = new HashMap<>();
- Map ratesPerPurpose4_4 = new HashMap<>();
- Map ratesPerPurpose4_5 = new HashMap<>();
- Map ratesPerPurpose5_1 = new HashMap<>();
- Map ratesPerPurpose5_2 = new HashMap<>();
- Map ratesPerPurpose5_3 = new HashMap<>();
- Map ratesPerPurpose5_4 = new HashMap<>();
- Map ratesPerPurpose5_5 = new HashMap<>();
- Map ratesPerPurpose6_1 = new HashMap<>();
- Map ratesPerPurpose6_2 = new HashMap<>();
- Map ratesPerPurpose6_3 = new HashMap<>();
- Map ratesPerPurpose6_4 = new HashMap<>();
- Map ratesPerPurpose6_5 = new HashMap<>();
- if (commitmentType.equals("start")) {
- ratesPerPurpose1_1.put("Inhabitants", 0.0);
- ratesPerPurpose1_1.put("Employee", 0.8);
- ratesPerPurpose1_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_1.put("Employee Construction", 0.0);
- ratesPerPurpose1_1.put("Employee Secondary Sector Rest", 0.44);
- ratesPerPurpose1_1.put("Employee Retail", 0.0);
- ratesPerPurpose1_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_2.put("Inhabitants", 0.0);
- ratesPerPurpose1_2.put("Employee", 0.1);
- ratesPerPurpose1_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_2.put("Employee Construction", 0.0);
- ratesPerPurpose1_2.put("Employee Secondary Sector Rest", 0.11);
- ratesPerPurpose1_2.put("Employee Retail", 0.0);
- ratesPerPurpose1_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_3.put("Inhabitants", 0.0);
- ratesPerPurpose1_3.put("Employee", 0.1);
- ratesPerPurpose1_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_3.put("Employee Construction", 0.0);
- ratesPerPurpose1_3.put("Employee Secondary Sector Rest", 0.22);
- ratesPerPurpose1_3.put("Employee Retail", 0.0);
- ratesPerPurpose1_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_3.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_4.put("Inhabitants", 0.0);
- ratesPerPurpose1_4.put("Employee", 0.0);
- ratesPerPurpose1_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_4.put("Employee Construction", 0.0);
- ratesPerPurpose1_4.put("Employee Secondary Sector Rest", 0.06);
- ratesPerPurpose1_4.put("Employee Retail", 0.0);
- ratesPerPurpose1_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_5.put("Inhabitants", 0.0);
- ratesPerPurpose1_5.put("Employee", 0.0);
- ratesPerPurpose1_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_5.put("Employee Construction", 0.0);
- ratesPerPurpose1_5.put("Employee Secondary Sector Rest", 0.16);
- ratesPerPurpose1_5.put("Employee Retail", 0.0);
- ratesPerPurpose1_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_1.put("Inhabitants", 0.0);
- ratesPerPurpose2_1.put("Employee", 0.8);
- ratesPerPurpose2_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2_1.put("Employee Construction", 0.0);
- ratesPerPurpose2_1.put("Employee Secondary Sector Rest", 0.44);
- ratesPerPurpose2_1.put("Employee Retail", 0.0);
- ratesPerPurpose2_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_2.put("Inhabitants", 0.0);
- ratesPerPurpose2_2.put("Employee", 0.1);
- ratesPerPurpose2_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2_2.put("Employee Construction", 0.0);
- ratesPerPurpose2_2.put("Employee Secondary Sector Rest", 0.11);
- ratesPerPurpose2_2.put("Employee Retail", 0.0);
- ratesPerPurpose2_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_3.put("Inhabitants", 0.0);
- ratesPerPurpose2_3.put("Employee", 0.1);
- ratesPerPurpose2_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2_3.put("Employee Construction", 0.0);
- ratesPerPurpose2_3.put("Employee Secondary Sector Rest", 0.22);
- ratesPerPurpose2_3.put("Employee Retail", 0.0);
- ratesPerPurpose2_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_3.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_4.put("Inhabitants", 0.0);
- ratesPerPurpose2_4.put("Employee", 0.0);
- ratesPerPurpose2_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2_4.put("Employee Construction", 0.0);
- ratesPerPurpose2_4.put("Employee Secondary Sector Rest", 0.06);
- ratesPerPurpose2_4.put("Employee Retail", 0.0);
- ratesPerPurpose2_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_5.put("Inhabitants", 0.0);
- ratesPerPurpose2_5.put("Employee", 0.0);
- ratesPerPurpose2_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose2_5.put("Employee Construction", 0.0);
- ratesPerPurpose2_5.put("Employee Secondary Sector Rest", 0.16);
- ratesPerPurpose2_5.put("Employee Retail", 0.0);
- ratesPerPurpose2_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose3_1.put("Inhabitants", 0.0);
- ratesPerPurpose3_1.put("Employee", 0.8);
- ratesPerPurpose3_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3_1.put("Employee Construction", 0.0);
- ratesPerPurpose3_1.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3_1.put("Employee Retail", 0.46);
- ratesPerPurpose3_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3_1.put("Employee Tertiary Sector Rest", 0.54);
-
- ratesPerPurpose3_2.put("Inhabitants", 0.0);
- ratesPerPurpose3_2.put("Employee", 0.1);
- ratesPerPurpose3_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3_2.put("Employee Construction", 0.0);
- ratesPerPurpose3_2.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3_2.put("Employee Retail", 0.1);
- ratesPerPurpose3_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3_2.put("Employee Tertiary Sector Rest", 0.1);
-
- ratesPerPurpose3_3.put("Inhabitants", 0.0);
- ratesPerPurpose3_3.put("Employee", 0.1);
- ratesPerPurpose3_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3_3.put("Employee Construction", 0.0);
- ratesPerPurpose3_3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3_3.put("Employee Retail", 0.23);
- ratesPerPurpose3_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3_3.put("Employee Tertiary Sector Rest", 0.2);
-
- ratesPerPurpose3_4.put("Inhabitants", 0.0);
- ratesPerPurpose3_4.put("Employee", 0.0);
- ratesPerPurpose3_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3_4.put("Employee Construction", 0.0);
- ratesPerPurpose3_4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3_4.put("Employee Retail", 0.06);
- ratesPerPurpose3_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3_4.put("Employee Tertiary Sector Rest", 0.02);
-
- ratesPerPurpose3_5.put("Inhabitants", 0.0);
- ratesPerPurpose3_5.put("Employee", 0.0);
- ratesPerPurpose3_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose3_5.put("Employee Construction", 0.0);
- ratesPerPurpose3_5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose3_5.put("Employee Retail", 0.15);
- ratesPerPurpose3_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose3_5.put("Employee Tertiary Sector Rest", 0.14);
-
- ratesPerPurpose4_1.put("Inhabitants", 0.009);
- ratesPerPurpose4_1.put("Employee", 0.8);
- ratesPerPurpose4_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4_1.put("Employee Construction", 0.0);
- ratesPerPurpose4_1.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4_1.put("Employee Retail", 0.0);
- ratesPerPurpose4_1.put("Employee Traffic/Parcels", 0.18);
- ratesPerPurpose4_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose4_2.put("Inhabitants", 0.0);
- ratesPerPurpose4_2.put("Employee", 0.1);
- ratesPerPurpose4_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4_2.put("Employee Construction", 0.0);
- ratesPerPurpose4_2.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4_2.put("Employee Retail", 0.0);
- ratesPerPurpose4_2.put("Employee Traffic/Parcels", 0.06);
- ratesPerPurpose4_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose4_3.put("Inhabitants", 0.0);
- ratesPerPurpose4_3.put("Employee", 0.1);
- ratesPerPurpose4_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4_3.put("Employee Construction", 0.0);
- ratesPerPurpose4_3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4_3.put("Employee Retail", 0.0);
- ratesPerPurpose4_3.put("Employee Traffic/Parcels", 0.25);
- ratesPerPurpose4_3.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose4_4.put("Inhabitants", 0.0);
- ratesPerPurpose4_4.put("Employee", 0.0);
- ratesPerPurpose4_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4_4.put("Employee Construction", 0.0);
- ratesPerPurpose4_4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4_4.put("Employee Retail", 0.0);
- ratesPerPurpose4_4.put("Employee Traffic/Parcels", 0.08);
- ratesPerPurpose4_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose4_5.put("Inhabitants", 0.0);
- ratesPerPurpose4_5.put("Employee", 0.0);
- ratesPerPurpose4_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose4_5.put("Employee Construction", 0.0);
- ratesPerPurpose4_5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose4_5.put("Employee Retail", 0.0);
- ratesPerPurpose4_5.put("Employee Traffic/Parcels", 0.43);
- ratesPerPurpose4_5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5_1.put("Inhabitants", 0.0);
- ratesPerPurpose5_1.put("Employee", 0.8);
- ratesPerPurpose5_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5_1.put("Employee Construction", 0.25);
- ratesPerPurpose5_1.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5_1.put("Employee Retail", 0.0);
- ratesPerPurpose5_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5_2.put("Inhabitants", 0.0);
- ratesPerPurpose5_2.put("Employee", 0.1);
- ratesPerPurpose5_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5_2.put("Employee Construction", 0.2);
- ratesPerPurpose5_2.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5_2.put("Employee Retail", 0.0);
- ratesPerPurpose5_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5_3.put("Inhabitants", 0.0);
- ratesPerPurpose5_3.put("Employee", 0.1);
- ratesPerPurpose5_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5_3.put("Employee Construction", 0.25);
- ratesPerPurpose5_3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5_3.put("Employee Retail", 0.139);
- ratesPerPurpose5_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_3.put("Employee Tertiary Sector Rest", 0.059);
-
- ratesPerPurpose5_4.put("Inhabitants", 0.0);
- ratesPerPurpose5_4.put("Employee", 0.0);
- ratesPerPurpose5_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5_4.put("Employee Construction", 0.02);
- ratesPerPurpose5_4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5_4.put("Employee Retail", 0.0);
- ratesPerPurpose5_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose5_5.put("Inhabitants", 0.0);
- ratesPerPurpose5_5.put("Employee", 0.0);
- ratesPerPurpose5_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose5_5.put("Employee Construction", 0.28);
- ratesPerPurpose5_5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose5_5.put("Employee Retail", 0.0);
- ratesPerPurpose5_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_1.put("Inhabitants", 0.0);
- ratesPerPurpose6_1.put("Employee", 0.0);
- ratesPerPurpose6_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_1.put("Employee Construction", 0.0);
- ratesPerPurpose6_1.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_1.put("Employee Retail", 0.0);
- ratesPerPurpose6_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_2.put("Inhabitants", 0.29);
- ratesPerPurpose6_2.put("Employee", 0.0);
- ratesPerPurpose6_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_2.put("Employee Construction", 0.0);
- ratesPerPurpose6_2.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_2.put("Employee Retail", 0.0);
- ratesPerPurpose6_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_3.put("Inhabitants", 0.63);
- ratesPerPurpose6_3.put("Employee", 0.0);
- ratesPerPurpose6_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_3.put("Employee Construction", 0.0);
- ratesPerPurpose6_3.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_3.put("Employee Retail", 0.0);
- ratesPerPurpose6_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_3.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_4.put("Inhabitants", 0.07);
- ratesPerPurpose6_4.put("Employee", 0.0);
- ratesPerPurpose6_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_4.put("Employee Construction", 0.0);
- ratesPerPurpose6_4.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_4.put("Employee Retail", 0.0);
- ratesPerPurpose6_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_5.put("Inhabitants", 0.001);
- ratesPerPurpose6_5.put("Employee", 0.0);
- ratesPerPurpose6_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_5.put("Employee Construction", 0.2);
- ratesPerPurpose6_5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_5.put("Employee Retail", 0.0);
- ratesPerPurpose6_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_5.put("Employee Tertiary Sector Rest", 0.0);
- } else if (commitmentType.equals("stop")) {
- ratesPerPurpose1_1.put("Inhabitants", 0.0);
- ratesPerPurpose1_1.put("Employee", 0.0);
- ratesPerPurpose1_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_1.put("Employee Construction", 0.0);
- ratesPerPurpose1_1.put("Employee Secondary Sector Rest", 0.35);
- ratesPerPurpose1_1.put("Employee Retail", 0.0);
- ratesPerPurpose1_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_2.put("Inhabitants", 0.0);
- ratesPerPurpose1_2.put("Employee", 0.0);
- ratesPerPurpose1_2.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_2.put("Employee Construction", 0.0);
- ratesPerPurpose1_2.put("Employee Secondary Sector Rest", 0.1);
- ratesPerPurpose1_2.put("Employee Retail", 0.0);
- ratesPerPurpose1_2.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_2.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_3.put("Inhabitants", 0.0);
- ratesPerPurpose1_3.put("Employee", 0.0);
- ratesPerPurpose1_3.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_3.put("Employee Construction", 0.0);
- ratesPerPurpose1_3.put("Employee Secondary Sector Rest", 0.27);
- ratesPerPurpose1_3.put("Employee Retail", 0.0);
- ratesPerPurpose1_3.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_3.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_4.put("Inhabitants", 0.0);
- ratesPerPurpose1_4.put("Employee", 0.0);
- ratesPerPurpose1_4.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_4.put("Employee Construction", 0.0);
- ratesPerPurpose1_4.put("Employee Secondary Sector Rest", 0.01);
- ratesPerPurpose1_4.put("Employee Retail", 0.0);
- ratesPerPurpose1_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_4.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose1_5.put("Inhabitants", 0.0);
- ratesPerPurpose1_5.put("Employee", 0.0);
- ratesPerPurpose1_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose1_5.put("Employee Construction", 0.0);
- ratesPerPurpose1_5.put("Employee Secondary Sector Rest", 0.27);
- ratesPerPurpose1_5.put("Employee Retail", 0.0);
- ratesPerPurpose1_5.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose1_5.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose2_1.put("Inhabitants", 0.55);
- ratesPerPurpose2_1.put("Employee", 0.0);
- ratesPerPurpose2_1.put("Employee Primary Sector", 0.46);
- ratesPerPurpose2_1.put("Employee Construction", 0.46);
- ratesPerPurpose2_1.put("Employee Secondary Sector Rest", 0.46);
- ratesPerPurpose2_1.put("Employee Retail", 0.46);
- ratesPerPurpose2_1.put("Employee Traffic/Parcels", 0.34);
- ratesPerPurpose2_1.put("Employee Tertiary Sector Rest", 0.46);
-
- ratesPerPurpose2_2.put("Inhabitants", 0.09);
- ratesPerPurpose2_2.put("Employee", 0.0);
- ratesPerPurpose2_2.put("Employee Primary Sector", 0.09);
- ratesPerPurpose2_2.put("Employee Construction", 0.09);
- ratesPerPurpose2_2.put("Employee Secondary Sector Rest", 0.09);
- ratesPerPurpose2_2.put("Employee Retail", 0.09);
- ratesPerPurpose2_2.put("Employee Traffic/Parcels", 0.1);
- ratesPerPurpose2_2.put("Employee Tertiary Sector Rest", 0.09);
-
- ratesPerPurpose2_3.put("Inhabitants", 0.21);
- ratesPerPurpose2_3.put("Employee", 0.0);
- ratesPerPurpose2_3.put("Employee Primary Sector", 0.22);
- ratesPerPurpose2_3.put("Employee Construction", 0.22);
- ratesPerPurpose2_3.put("Employee Secondary Sector Rest", 0.22);
- ratesPerPurpose2_3.put("Employee Retail", 0.22);
- ratesPerPurpose2_3.put("Employee Traffic/Parcels", 0.29);
- ratesPerPurpose2_3.put("Employee Tertiary Sector Rest", 0.22);
-
- ratesPerPurpose2_4.put("Inhabitants", 0.06);
- ratesPerPurpose2_4.put("Employee", 0.0);
- ratesPerPurpose2_4.put("Employee Primary Sector", 0.06);
- ratesPerPurpose2_4.put("Employee Construction", 0.06);
- ratesPerPurpose2_4.put("Employee Secondary Sector Rest", 0.06);
- ratesPerPurpose2_4.put("Employee Retail", 0.06);
- ratesPerPurpose2_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose2_4.put("Employee Tertiary Sector Rest", 0.06);
-
- ratesPerPurpose2_5.put("Inhabitants", 0.1);
- ratesPerPurpose2_5.put("Employee", 0.0);
- ratesPerPurpose2_5.put("Employee Primary Sector", 0.17);
- ratesPerPurpose2_5.put("Employee Construction", 0.17);
- ratesPerPurpose2_5.put("Employee Secondary Sector Rest", 0.17);
- ratesPerPurpose2_5.put("Employee Retail", 0.17);
- ratesPerPurpose2_5.put("Employee Traffic/Parcels", 0.27);
- ratesPerPurpose2_5.put("Employee Tertiary Sector Rest", 0.17);
-
- ratesPerPurpose3_1.put("Inhabitants", 0.489);
- ratesPerPurpose3_1.put("Employee", 0.0);
- ratesPerPurpose3_1.put("Employee Primary Sector", 0.538);
- ratesPerPurpose3_1.put("Employee Construction", 0.538);
- ratesPerPurpose3_1.put("Employee Secondary Sector Rest", 0.538);
- ratesPerPurpose3_1.put("Employee Retail", 0.538);
- ratesPerPurpose3_1.put("Employee Traffic/Parcels", 0.59);
- ratesPerPurpose3_1.put("Employee Tertiary Sector Rest", 0.538);
-
- ratesPerPurpose3_2.put("Inhabitants", 0.106);
- ratesPerPurpose3_2.put("Employee", 0.0);
- ratesPerPurpose3_2.put("Employee Primary Sector", 0.092);
- ratesPerPurpose3_2.put("Employee Construction", 0.092);
- ratesPerPurpose3_2.put("Employee Secondary Sector Rest", 0.092);
- ratesPerPurpose3_2.put("Employee Retail", 0.092);
- ratesPerPurpose3_2.put("Employee Traffic/Parcels", 0.03);
- ratesPerPurpose3_2.put("Employee Tertiary Sector Rest", 0.092);
-
- ratesPerPurpose3_3.put("Inhabitants", 0.26);
- ratesPerPurpose3_3.put("Employee", 0.0);
- ratesPerPurpose3_3.put("Employee Primary Sector", 0.19);
- ratesPerPurpose3_3.put("Employee Construction", 0.19);
- ratesPerPurpose3_3.put("Employee Secondary Sector Rest", 0.19);
- ratesPerPurpose3_3.put("Employee Retail", 0.19);
- ratesPerPurpose3_3.put("Employee Traffic/Parcels", 0.102);
- ratesPerPurpose3_3.put("Employee Tertiary Sector Rest", 0.19);
-
- ratesPerPurpose3_4.put("Inhabitants", 0.033);
- ratesPerPurpose3_4.put("Employee", 0.0);
- ratesPerPurpose3_4.put("Employee Primary Sector", 0.032);
- ratesPerPurpose3_4.put("Employee Construction", 0.032);
- ratesPerPurpose3_4.put("Employee Secondary Sector Rest", 0.032);
- ratesPerPurpose3_4.put("Employee Retail", 0.032);
- ratesPerPurpose3_4.put("Employee Traffic/Parcels", 0.058);
- ratesPerPurpose3_4.put("Employee Tertiary Sector Rest", 0.032);
-
- ratesPerPurpose3_5.put("Inhabitants", 0.112);
- ratesPerPurpose3_5.put("Employee", 0.0);
- ratesPerPurpose3_5.put("Employee Primary Sector", 0.147);
- ratesPerPurpose3_5.put("Employee Construction", 0.147);
- ratesPerPurpose3_5.put("Employee Secondary Sector Rest", 0.147);
- ratesPerPurpose3_5.put("Employee Retail", 0.147);
- ratesPerPurpose3_5.put("Employee Traffic/Parcels", 0.219);
- ratesPerPurpose3_5.put("Employee Tertiary Sector Rest", 0.147);
-
- ratesPerPurpose4_1.put("Inhabitants", 0.37);
- ratesPerPurpose4_1.put("Employee", 0.0);
- ratesPerPurpose4_1.put("Employee Primary Sector", 0.14);
- ratesPerPurpose4_1.put("Employee Construction", 0.14);
- ratesPerPurpose4_1.put("Employee Secondary Sector Rest", 0.14);
- ratesPerPurpose4_1.put("Employee Retail", 0.14);
- ratesPerPurpose4_1.put("Employee Traffic/Parcels", 0.06);
- ratesPerPurpose4_1.put("Employee Tertiary Sector Rest", 0.14);
-
- ratesPerPurpose4_2.put("Inhabitants", 0.05);
- ratesPerPurpose4_2.put("Employee", 0.0);
- ratesPerPurpose4_2.put("Employee Primary Sector", 0.07);
- ratesPerPurpose4_2.put("Employee Construction", 0.07);
- ratesPerPurpose4_2.put("Employee Secondary Sector Rest", 0.07);
- ratesPerPurpose4_2.put("Employee Retail", 0.07);
- ratesPerPurpose4_2.put("Employee Traffic/Parcels", 0.07);
- ratesPerPurpose4_2.put("Employee Tertiary Sector Rest", 0.07);
-
- ratesPerPurpose4_3.put("Inhabitants", 0.4);
- ratesPerPurpose4_3.put("Employee", 0.0);
- ratesPerPurpose4_3.put("Employee Primary Sector", 0.21);
- ratesPerPurpose4_3.put("Employee Construction", 0.21);
- ratesPerPurpose4_3.put("Employee Secondary Sector Rest", 0.21);
- ratesPerPurpose4_3.put("Employee Retail", 0.21);
- ratesPerPurpose4_3.put("Employee Traffic/Parcels", 0.19);
- ratesPerPurpose4_3.put("Employee Tertiary Sector Rest", 0.21);
-
- ratesPerPurpose4_4.put("Inhabitants", 0.13);
- ratesPerPurpose4_4.put("Employee", 0.0);
- ratesPerPurpose4_4.put("Employee Primary Sector", 0.05);
- ratesPerPurpose4_4.put("Employee Construction", 0.05);
- ratesPerPurpose4_4.put("Employee Secondary Sector Rest", 0.05);
- ratesPerPurpose4_4.put("Employee Retail", 0.05);
- ratesPerPurpose4_4.put("Employee Traffic/Parcels", 0.08);
- ratesPerPurpose4_4.put("Employee Tertiary Sector Rest", 0.05);
-
- ratesPerPurpose4_5.put("Inhabitants", 0.05);
- ratesPerPurpose4_5.put("Employee", 0.0);
- ratesPerPurpose4_5.put("Employee Primary Sector", 0.54);
- ratesPerPurpose4_5.put("Employee Construction", 0.54);
- ratesPerPurpose4_5.put("Employee Secondary Sector Rest", 0.54);
- ratesPerPurpose4_5.put("Employee Retail", 0.54);
- ratesPerPurpose4_5.put("Employee Traffic/Parcels", 0.61);
- ratesPerPurpose4_5.put("Employee Tertiary Sector Rest", 0.54);
-
- ratesPerPurpose5_1.put("Inhabitants", 0.16);
- ratesPerPurpose5_1.put("Employee", 0.0);
- ratesPerPurpose5_1.put("Employee Primary Sector", 0.4);
- ratesPerPurpose5_1.put("Employee Construction", 0.4);
- ratesPerPurpose5_1.put("Employee Secondary Sector Rest", 0.4);
- ratesPerPurpose5_1.put("Employee Retail", 0.4);
- ratesPerPurpose5_1.put("Employee Traffic/Parcels", 0.14);
- ratesPerPurpose5_1.put("Employee Tertiary Sector Rest", 0.4);
-
- ratesPerPurpose5_2.put("Inhabitants", 0.55);
- ratesPerPurpose5_2.put("Employee", 0.11);
- ratesPerPurpose5_2.put("Employee Primary Sector", 0.11);
- ratesPerPurpose5_2.put("Employee Construction", 0.11);
- ratesPerPurpose5_2.put("Employee Secondary Sector Rest", 0.11);
- ratesPerPurpose5_2.put("Employee Retail", 0.11);
- ratesPerPurpose5_2.put("Employee Traffic/Parcels", 0.06);
- ratesPerPurpose5_2.put("Employee Tertiary Sector Rest", 0.11);
-
- ratesPerPurpose5_3.put("Inhabitants", 0.22);
- ratesPerPurpose5_3.put("Employee", 0.0);
- ratesPerPurpose5_3.put("Employee Primary Sector", 0.17);
- ratesPerPurpose5_3.put("Employee Construction", 0.17);
- ratesPerPurpose5_3.put("Employee Secondary Sector Rest", 0.17);
- ratesPerPurpose5_3.put("Employee Retail", 0.17);
- ratesPerPurpose5_3.put("Employee Traffic/Parcels", 0.21);
- ratesPerPurpose5_3.put("Employee Tertiary Sector Rest", 0.17);
-
- ratesPerPurpose5_4.put("Inhabitants", 0.0);
- ratesPerPurpose5_4.put("Employee", 0.0);
- ratesPerPurpose5_4.put("Employee Primary Sector", 0.04);
- ratesPerPurpose5_4.put("Employee Construction", 0.04);
- ratesPerPurpose5_4.put("Employee Secondary Sector Rest", 0.04);
- ratesPerPurpose5_4.put("Employee Retail", 0.04);
- ratesPerPurpose5_4.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose5_4.put("Employee Tertiary Sector Rest", 0.04);
-
- ratesPerPurpose5_5.put("Inhabitants", 0.06);
- ratesPerPurpose5_5.put("Employee", 0.0);
- ratesPerPurpose5_5.put("Employee Primary Sector", 0.28);
- ratesPerPurpose5_5.put("Employee Construction", 0.28);
- ratesPerPurpose5_5.put("Employee Secondary Sector Rest", 0.28);
- ratesPerPurpose5_5.put("Employee Retail", 0.28);
- ratesPerPurpose5_5.put("Employee Traffic/Parcels", 0.58);
- ratesPerPurpose5_5.put("Employee Tertiary Sector Rest", 0.28);
-
- ratesPerPurpose6_1.put("Inhabitants", 0.0);
- ratesPerPurpose6_1.put("Employee", 0.0);
- ratesPerPurpose6_1.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_1.put("Employee Construction", 0.0);
- ratesPerPurpose6_1.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_1.put("Employee Retail", 0.0);
- ratesPerPurpose6_1.put("Employee Traffic/Parcels", 0.0);
- ratesPerPurpose6_1.put("Employee Tertiary Sector Rest", 0.0);
-
- ratesPerPurpose6_2.put("Inhabitants", 0.85);
- ratesPerPurpose6_2.put("Employee", 0.0);
- ratesPerPurpose6_2.put("Employee Primary Sector", 0.21);
- ratesPerPurpose6_2.put("Employee Construction", 0.21);
- ratesPerPurpose6_2.put("Employee Secondary Sector Rest", 0.21);
- ratesPerPurpose6_2.put("Employee Retail", 0.21);
- ratesPerPurpose6_2.put("Employee Traffic/Parcels", 0.09);
- ratesPerPurpose6_2.put("Employee Tertiary Sector Rest", 0.21);
-
- ratesPerPurpose6_3.put("Inhabitants", 0.15);
- ratesPerPurpose6_3.put("Employee", 0.0);
- ratesPerPurpose6_3.put("Employee Primary Sector", 0.58);
- ratesPerPurpose6_3.put("Employee Construction", 0.58);
- ratesPerPurpose6_3.put("Employee Secondary Sector Rest", 0.58);
- ratesPerPurpose6_3.put("Employee Retail", 0.58);
- ratesPerPurpose6_3.put("Employee Traffic/Parcels", 0.55);
- ratesPerPurpose6_3.put("Employee Tertiary Sector Rest", 0.58);
-
- ratesPerPurpose6_4.put("Inhabitants", 0.0);
- ratesPerPurpose6_4.put("Employee", 0.0);
- ratesPerPurpose6_4.put("Employee Primary Sector", 0.21);
- ratesPerPurpose6_4.put("Employee Construction", 0.21);
- ratesPerPurpose6_4.put("Employee Secondary Sector Rest", 0.21);
- ratesPerPurpose6_4.put("Employee Retail", 0.21);
- ratesPerPurpose6_4.put("Employee Traffic/Parcels", 0.25);
- ratesPerPurpose6_4.put("Employee Tertiary Sector Rest", 0.21);
-
- ratesPerPurpose6_5.put("Inhabitants", 0.0);
- ratesPerPurpose6_5.put("Employee", 0.0);
- ratesPerPurpose6_5.put("Employee Primary Sector", 0.0);
- ratesPerPurpose6_5.put("Employee Construction", 0.0);
- ratesPerPurpose6_5.put("Employee Secondary Sector Rest", 0.0);
- ratesPerPurpose6_5.put("Employee Retail", 0.0);
- ratesPerPurpose6_5.put("Employee Traffic/Parcels", 0.11);
- ratesPerPurpose6_5.put("Employee Tertiary Sector Rest", 0.0);
- }
- commitmentRates.put("1_1", ratesPerPurpose1_1);
- commitmentRates.put("1_2", ratesPerPurpose1_2);
- commitmentRates.put("1_3", ratesPerPurpose1_3);
- commitmentRates.put("1_4", ratesPerPurpose1_4);
- commitmentRates.put("1_5", ratesPerPurpose1_5);
- commitmentRates.put("2_1", ratesPerPurpose2_1);
- commitmentRates.put("2_2", ratesPerPurpose2_2);
- commitmentRates.put("2_3", ratesPerPurpose2_3);
- commitmentRates.put("2_4", ratesPerPurpose2_4);
- commitmentRates.put("2_5", ratesPerPurpose2_5);
- commitmentRates.put("3_1", ratesPerPurpose3_1);
- commitmentRates.put("3_2", ratesPerPurpose3_2);
- commitmentRates.put("3_3", ratesPerPurpose3_3);
- commitmentRates.put("3_4", ratesPerPurpose3_4);
- commitmentRates.put("3_5", ratesPerPurpose3_5);
- commitmentRates.put("4_1", ratesPerPurpose4_1);
- commitmentRates.put("4_2", ratesPerPurpose4_2);
- commitmentRates.put("4_3", ratesPerPurpose4_3);
- commitmentRates.put("4_4", ratesPerPurpose4_4);
- commitmentRates.put("4_5", ratesPerPurpose4_5);
- commitmentRates.put("5_1", ratesPerPurpose5_1);
- commitmentRates.put("5_2", ratesPerPurpose5_2);
- commitmentRates.put("5_3", ratesPerPurpose5_3);
- commitmentRates.put("5_4", ratesPerPurpose5_4);
- commitmentRates.put("5_5", ratesPerPurpose5_5);
- commitmentRates.put("6_1", ratesPerPurpose6_1);
- commitmentRates.put("6_2", ratesPerPurpose6_2);
- commitmentRates.put("6_3", ratesPerPurpose6_3);
- commitmentRates.put("6_4", ratesPerPurpose6_4);
- commitmentRates.put("6_5", ratesPerPurpose6_5);
- }
- return commitmentRates;
- }
}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/UnhandledServicesSolution.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/UnhandledServicesSolution.java
new file mode 100644
index 00000000000..e5db51e8557
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/UnhandledServicesSolution.java
@@ -0,0 +1,39 @@
+package org.matsim.smallScaleCommercialTrafficGeneration;
+
+import org.matsim.api.core.v01.Scenario;
+import org.matsim.freight.carriers.Carrier;
+
+import java.util.List;
+
+/**
+ * When generating service-durations for {@link Carrier}s it may happen service durations of their plans
+ * are too long to be fully handled. This implementation solves this problem.
+ */
+public interface UnhandledServicesSolution {
+
+ /**
+ * @param scenario Scenario to search for carriers with unhandled jobs
+ * @return List with the found carriers
+ */
+ List createListOfCarrierWithUnhandledJobs(Scenario scenario);
+
+ /**
+ * Give a service duration based on the purpose and the trafficType under a given probability
+ *
+ * @param carrier The carrier for which we generate the serviceTime
+ * @param carrierAttributes attributes of the carrier to generate the service time for.
+ * selectedStartCategory: the category of the employee
+ * @param additionalTravelBufferPerIterationInMinutes additional buffer for the travel time
+ * @return the service duration
+ */
+ int getServiceTimePerStop(Carrier carrier, GenerateSmallScaleCommercialTrafficDemand.CarrierAttributes carrierAttributes, int additionalTravelBufferPerIterationInMinutes);
+
+ /**
+ *
+ * Checks and recalculates plans of carriers, which did not serve all services.
+ * This step may take a few minutes.
+ * @param scenario Scenario to handle the carriers for. Needed to execute {@link org.matsim.freight.carriers.CarriersUtils#runJsprit(Scenario)} and {@link UnhandledServicesSolution#createListOfCarrierWithUnhandledJobs(Scenario)}
+ * @param nonCompleteSolvedCarriers List of carriers, that are not solved. Can be obtained by {@link UnhandledServicesSolution#createListOfCarrierWithUnhandledJobs(Scenario)}
+ */
+ void tryToSolveAllCarriersCompletely(Scenario scenario, List nonCompleteSolvedCarriers);
+}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleAvailabilityAllocator.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleAvailabilityAllocator.java
new file mode 100644
index 00000000000..e13cce7efcf
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleAvailabilityAllocator.java
@@ -0,0 +1,106 @@
+package org.matsim.smallScaleCommercialTrafficGeneration;
+
+import java.util.*;
+
+/**
+ * A small allocator to solve the time-window problems in the Vehicle and Service generation using a Best-Fit Allocator.
+ * NOTE: This class does not actually change anything in the scenario. It is just a tool to check if Service and Vehicle TimeWindows are
+ * compatible.
+ */
+public class VehicleAvailabilityAllocator {
+ private List availableVehicleTime;
+
+ /**
+ * Prepares the allocator for a vehicle fleet.
+ * @param availableVehicleTime This Collection should contain the duration of available-time-frames of the vehicles.
+ * For example: 4x vehicles are available from 1:00 to 4:00 (3 hours), then the {@code availableVehicles} Collection should
+ * contain 4 entries with value: 3*3600=10800. If a vehicle has a non-coherent availability-time-frame, add it as two
+ * separate entries.
+ */
+ public VehicleAvailabilityAllocator(List availableVehicleTime){
+ this.availableVehicleTime = availableVehicleTime;
+ }
+
+ /**
+ * Prepares the allocator for one vehicle.
+ * @param availableVehicleTime This Collection should contain the duration of available-time-frames of the vehicle.
+ */
+ public VehicleAvailabilityAllocator(double availableVehicleTime){
+ this.availableVehicleTime = new ArrayList<>(1);
+ this.availableVehicleTime.add(availableVehicleTime);
+ }
+
+ /**
+ * Checks if a vehicle is available for the given amount of time. If not, then the time is set to the largest possible duration,
+ * which can be allocated.
+ * @return the reduced serviceDuration (unchanged, if a vehicle was found, that was available for the full duration)
+ */
+ public double makeServiceDurationViable(double serviceDuration){
+ for(Double vehicleTime : availableVehicleTime){
+ if(vehicleTime >= serviceDuration) return serviceDuration;
+ }
+ return availableVehicleTime.stream().mapToDouble(v -> v).max().orElseThrow();
+ }
+
+ /**
+ * Tries to allocate a single vehicle to the service and reduces the allocated vehicle available time by the serviceDuration.
+ * If no vehicle is available nothing happens. You should then consider to reduce the duration with {@link VehicleAvailabilityAllocator#makeServiceDurationViable}
+ * @return true if a vehicle was allocated, false if no vehicle is available for the given duration
+ */
+ public boolean allocateServiceDuration(double serviceDuration){
+ //Best-Fit Allocation
+ int bestFit = -1;
+ double bestRemaining = Double.MAX_VALUE;
+ for(int i = 0; i < availableVehicleTime.size(); i++){
+ double remaining = availableVehicleTime.get(i) - serviceDuration;
+ if(remaining >= 0 && remaining < bestRemaining){
+ bestFit = i;
+ bestRemaining = remaining;
+ }
+ }
+ if(bestFit == -1) return false;
+ //Allocate
+ availableVehicleTime.set(bestFit, availableVehicleTime.get(bestFit) - serviceDuration);
+ return true;
+ }
+
+ /**
+ * This method checks for a given amount of same serviceDurations, whether you can allocate a vehicle to all of them or not.
+ * If not, the Allocator reduces the serviceDurations in a balanced way, so that the duration-cutoff is distributed across all given services.
+ * If you do not care if some services get much more time than others, you can use the {@link VehicleAvailabilityAllocator#makeServiceDurationViable} method.
+ * @param serviceDuration The duration of the services.
+ * @return An array which contains the maximum possible service durations (reverse order)
+ */
+ public double makeMultipleServiceDurationsBalancedViable(int serviceAmount, double serviceDuration){
+ //Check for serviceDuration first
+ int allocatedServices = 0;
+ for (Double d : availableVehicleTime) {
+ allocatedServices += (int) Math.floor(d / serviceDuration);
+ }
+
+ if(allocatedServices >= serviceAmount){
+ return serviceDuration;
+ }
+
+ //If not found yet, get the best next value
+ double lastValue = Double.POSITIVE_INFINITY;
+ while(true){
+ //Get largest value below lastValue
+ double thisValue = 0;
+ for(double d : availableVehicleTime){
+ if(d > thisValue && d < lastValue) thisValue = d;
+ }
+
+ allocatedServices = 0;
+ for (Double d : availableVehicleTime) {
+ allocatedServices += (int) Math.floor(d / thisValue);
+ }
+
+ if(allocatedServices >= serviceAmount){
+ return thisValue;
+ }
+
+ lastValue = thisValue;
+ }
+ }
+}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleSelection.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleSelection.java
new file mode 100644
index 00000000000..fdcf721a98d
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/VehicleSelection.java
@@ -0,0 +1,31 @@
+package org.matsim.smallScaleCommercialTrafficGeneration;
+
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * Interface to set the categories needed by {@link GenerateSmallScaleCommercialTrafficDemand}.
+ * Standard implementation is {@link DefaultVehicleSelection}.
+ * Any configuration settings and external data-sources should be saved as attributes during initialization in the constructor of the class.
+ */
+public interface VehicleSelection{
+
+ class OdMatrixEntryInformation {
+ double occupancyRate;
+ String[] possibleVehicleTypes;
+ List possibleStartCategories = new ArrayList<>();
+ List possibleStopCategories = new ArrayList<>();
+ }
+
+ /**
+ * @return all possible stop/start-categories.
+ */
+ List getAllCategories();
+
+ /**
+ * @param purpose entry from {@link TripDistributionMatrix#getListOfPurposes()}
+ * @param modeORvehType entry from {@link TripDistributionMatrix#getListOfModesOrVehTypes()}
+ * @param smallScaleCommercialTrafficType Selected traffic types. Options: commercialPersonTraffic, goodsTraffic
+ * @return class holding the information that is specified by the given entry.
+ */
+ OdMatrixEntryInformation getOdMatrixEntryInformation(int purpose, String modeORvehType, String smallScaleCommercialTrafficType);
+}
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetCommercialTourSpecifications.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/CommercialTourSpecifications.java
similarity index 71%
rename from contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetCommercialTourSpecifications.java
rename to contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/CommercialTourSpecifications.java
index ce6bce3c04c..5cd6256c1ea 100644
--- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetCommercialTourSpecifications.java
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/CommercialTourSpecifications.java
@@ -6,25 +6,23 @@
import java.util.Map;
-public interface GetCommercialTourSpecifications {
+public interface CommercialTourSpecifications {
/**
* Creates the probability distribution for the duration of the services.
* The values are given in [min] and have an upperBound.
*
- * @param smallScaleCommercialTrafficType the type of small scale commercial traffic
* @return the probability distribution for the duration of the services
*/
- Map> createStopDurationDistributionPerCategory(
- String smallScaleCommercialTrafficType, RandomGenerator rng);
+ Map> createStopDurationDistributionPerCategory(
+ RandomGenerator rng);
/**
* Creates the distribution of the tour start and the related duration.
*
- * @param smallScaleCommercialTrafficType the type of the small scale commercial traffic
* @return the distribution of the tour start and the related duration
*/
- EnumeratedDistribution createTourDistribution(String smallScaleCommercialTrafficType, RandomGenerator rng);
+ Map> createTourDistribution(RandomGenerator rng);
/**
* Creates the probability distribution for the tour start times for the day.
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/DefaultTourSpecificationsByUsingKID2002.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/DefaultTourSpecificationsByUsingKID2002.java
index ec4bd9640ab..46f6887f0cd 100644
--- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/DefaultTourSpecificationsByUsingKID2002.java
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/DefaultTourSpecificationsByUsingKID2002.java
@@ -10,1279 +10,1787 @@
import java.util.List;
import java.util.Map;
-import static org.matsim.smallScaleCommercialTrafficGeneration.GenerateSmallScaleCommercialTrafficDemand.makeStopDurationGoodTrafficKey;
+import static org.matsim.smallScaleCommercialTrafficGeneration.GenerateSmallScaleCommercialTrafficDemand.makeServiceDurationPerCategoryKey;
-public class DefaultTourSpecificationsByUsingKID2002 implements GetCommercialTourSpecifications {
+public class DefaultTourSpecificationsByUsingKID2002 implements CommercialTourSpecifications {
@Override
- public Map> createStopDurationDistributionPerCategory(String smallScaleCommercialTrafficType, RandomGenerator rng) {
- Map> stopDurationProbabilityDistribution = new HashMap<>();
+ public Map> createStopDurationDistributionPerCategory(
+ RandomGenerator rng) {
+ Map> stopDurationProbabilityDistribution = new HashMap<>();
- if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString())) {
- List> thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.098));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.17));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.127));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.11));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.17));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.076));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.057));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.045));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.064));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.034));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ List> thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.098));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.17));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.127));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.11));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.17));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.076));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.057));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.045));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.064));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.034));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.054));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.164));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.153));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.087));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.12));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.055));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.044));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.069));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.132));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.058));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.054));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.164));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.153));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.087));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.12));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.055));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.044));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.069));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.132));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.058));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.13));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.324));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.178));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.108));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.097));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.034));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.027));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.029));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.008));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.13));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.324));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.178));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.108));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.097));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.034));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.027));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.029));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.008));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.178));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.301));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.192));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.104));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.092));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.043));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.013));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.178));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.301));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.192));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.104));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.092));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.043));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.013));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.144));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.372));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.203));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.069));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.038));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.005));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.005));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.144));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.372));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.203));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.069));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.038));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.005));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.005));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.196));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.292));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.19));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.105));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.034));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.013));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.019));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.004));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest",null),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 30), 0.196));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 60), 0.292));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 90), 0.19));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 180), 0.105));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.034));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 360), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(360, 420), 0.013));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 480), 0.019));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(480, 540), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 600), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(600, 720), 0.004));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(720, 840), 0.001));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", null,
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- } else if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
- List> thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.038));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.049));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.052));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.167));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.113));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.056));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.04));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.038));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.049));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.052));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.167));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.113));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.056));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.04));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.05));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.043));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.168));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.149));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.081));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.168));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.068));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.068));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.019));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.05));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.043));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.168));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.149));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.081));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.168));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.068));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.068));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.019));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.036));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.098));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.036));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.042));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.124));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.085));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.144));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.105));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.052));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.072));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.052));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.023));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.033));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.036));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.098));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.036));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.042));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.124));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.085));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.144));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.105));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.052));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.072));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.052));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.023));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.033));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.071));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.143));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.429));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.179));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.107));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.071));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.071));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.143));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.429));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.179));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.107));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.071));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.395));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.158));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.132));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.105));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.079));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.053));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Primary Sector", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.395));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.158));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.132));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.105));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.079));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.053));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Primary Sector", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.033));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.064));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.109));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.088));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.095));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.105));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.114));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.053));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.088));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.038));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.051));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.015));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.033));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.064));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.109));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.088));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.095));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.105));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.114));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.053));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.088));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.038));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.051));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.015));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.027));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.061));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.045));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.068));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.083));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.114));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.146));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.058));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.114));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.036));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.022));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.065));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.023));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.027));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.061));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.045));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.068));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.083));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.114));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.146));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.058));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.114));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.036));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.022));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.065));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.023));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.04));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.074));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.09));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.086));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.069));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.113));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.135));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.071));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.008));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.044));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.041));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.03));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.021));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.075));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.022));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.04));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.074));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.09));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.086));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.069));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.113));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.135));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.071));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.008));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.044));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.041));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.03));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.021));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.075));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.022));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.036));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.055));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.236));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.073));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.164));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.091));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.109));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.055));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.055));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.055));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.018));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.036));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.055));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.236));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.073));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.164));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.091));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.109));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.055));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.055));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.055));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.018));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.163));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.21));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.165));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.095));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.04));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.03));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.008));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.002));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.008));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Construction", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.163));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.21));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.165));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.095));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.04));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.03));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.008));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.002));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.008));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Construction", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.072));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.123));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.113));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.137));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.081));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.087));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.079));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.032));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.021));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 780), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.072));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.123));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.113));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.137));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.081));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.087));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.079));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.032));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.021));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 780), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.14));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.115));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.098));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.071));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.067));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.038));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.027));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.011));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.14));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.115));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.098));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.071));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.067));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.038));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.027));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.011));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.051));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.214));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.146));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.129));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.10));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.072));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.083));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.063));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.054));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.022));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.008));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 900), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.051));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.214));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.146));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.129));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.10));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.072));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.083));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.063));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.054));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.022));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.008));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 900), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.163));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.224));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.153));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.061));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.173));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.082));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.122));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.01));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.163));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.224));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.153));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.061));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.173));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.082));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.122));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.01));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.003));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.195));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.225));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.16));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.143));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.089));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.075));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.031));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.048));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.003));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 660), 0.009));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Secondary Sector Rest", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.003));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.195));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.225));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.16));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.143));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.089));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.075));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.031));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.048));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.003));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 660), 0.009));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Secondary Sector Rest", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.057));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.108));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.133));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.11));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.064));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.104));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.049));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.015));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.015));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.057));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.108));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.133));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.11));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.064));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.104));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.049));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.015));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.015));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.084));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.119));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.183));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.076));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.085));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.124));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.069));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.057));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.041));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.002));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(780, 900), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.084));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.119));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.183));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.076));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.085));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.124));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.069));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.057));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.041));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.002));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(780, 900), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.103));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.23));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.193));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.08));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.065));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.071));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.072));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.044));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.054));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.035));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.013));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.003));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.103));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.23));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.193));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.08));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.065));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.071));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.072));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.044));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.054));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.035));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.013));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.003));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.179));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.245));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.123));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.075));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.038));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.019));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.179));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.245));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.123));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.075));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.038));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.019));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.066));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.063));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.142));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.165));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.135));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.122));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.033));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.086));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.043));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.023));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Retail", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.066));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.063));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.142));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.165));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.135));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.122));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.033));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.086));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.043));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.023));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Retail", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.159));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.173));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.173));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.088));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.115));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.071));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.051));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.041));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.031));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.007));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.159));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.173));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.173));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.088));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.115));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.071));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.051));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.041));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.031));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.007));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.292));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.135));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.197));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.051));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.079));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.022));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.045));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.056));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.034));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.022));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.292));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.135));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.197));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.051));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.079));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.022));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.045));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.056));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.034));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.022));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.092));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.111));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.224));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.173));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.09));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.103));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.045));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.028));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.056));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.006));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.092));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.111));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.224));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.173));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.09));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.103));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.045));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.028));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.056));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.006));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.146));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.098));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.146));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.195));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.268));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.037));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.012));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.146));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.098));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.146));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.195));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.268));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.037));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.012));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.042));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.121));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.144));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.144));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.104));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.121));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.046));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 900), 0.008));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Traffic/Parcels", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.042));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.121));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.144));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.144));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.104));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.121));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.046));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 900), 0.008));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Traffic/Parcels", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.061));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.125));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.124));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.08));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.046));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.013));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.005));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.061));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.125));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.125));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.124));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.08));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.046));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.013));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.005));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.081));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.101));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.109));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.124));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.065));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.109));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.124));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.097));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.032));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.022));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.008));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.081));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.101));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.109));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.124));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.065));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.109));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.124));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.097));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.032));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.022));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.017));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.003));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.008));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.052));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.114));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.155));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.111));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.151));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.125));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.043));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.051));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.026));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.016));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.009));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.003));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.052));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.114));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.155));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.111));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.151));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.125));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.043));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.051));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.026));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.016));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.009));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.003));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.082));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.449));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.061));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.163));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.102));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.02));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.082));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.449));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.061));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.163));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.102));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.02));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.02));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.151));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.296));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.156));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.065));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.121));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.05));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.075));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.015));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.005));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Employee Tertiary Sector Rest", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.02));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.151));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.296));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.156));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.065));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.121));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.05));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.075));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.015));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.005));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.005));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Employee Tertiary Sector Rest", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- // because no data für private persons; use average numbers of all employee categories
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.056));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.084));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.095));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.118));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.12));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.096));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.083));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.095));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.045));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.033));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.022));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.018));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Inhabitants", "vehTyp1"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ // because no data für private persons; use average numbers of all employee categories
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.056));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.084));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.095));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.118));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.12));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.096));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.112));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.083));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.095));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.045));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.033));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.022));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.018));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.004));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Inhabitants", "vehTyp1",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.077));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.103));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.092));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.098));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.091));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.108));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.092));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.095));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.043));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.035));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.011));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.021));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.007));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Inhabitants", "vehTyp2"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.077));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.093));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.103));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.092));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.098));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.091));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.108));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.092));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.095));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.043));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.035));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.011));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.021));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.007));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Inhabitants", "vehTyp2",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.06));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.141));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.152));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.107));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.094));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.087));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.089));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.067));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.06));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.037));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.023));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.015));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.012));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.006));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.001));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Inhabitants", "vehTyp3"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.06));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.141));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.152));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.107));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.094));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.087));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.089));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.067));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.06));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.037));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.023));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.025));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.015));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.012));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.006));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 780), 0.001));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Inhabitants", "vehTyp3",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.11));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.12));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.144));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.151));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.129));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.062));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.079));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.041));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.031));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Inhabitants", "vehTyp4"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.11));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.12));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.144));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.151));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.129));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.062));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.079));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.041));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.031));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.019));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 540), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(540, 660), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Inhabitants", "vehTyp4",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
+
+ thisStopDurationProbabilityDistribution = new ArrayList<>();
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.024));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.099));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.147));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.17));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.108));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.116));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.058));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.075));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.03));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.01));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.014));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.005));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 660), 0.007));
+ thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 900), 0.002));
+ stopDurationProbabilityDistribution.put(makeServiceDurationPerCategoryKey("Inhabitants", "vehTyp5",
+ GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString()),
+ new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
+ thisStopDurationProbabilityDistribution.clear();
- thisStopDurationProbabilityDistribution = new ArrayList<>();
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(0, 10), 0.024));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(10, 20), 0.099));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(20, 30), 0.147));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(30, 40), 0.17));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(40, 50), 0.133));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(50, 60), 0.108));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(60, 75), 0.116));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(75, 90), 0.058));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(90, 120), 0.075));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(120, 150), 0.03));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(150, 180), 0.01));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(180, 240), 0.014));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(240, 300), 0.005));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(300, 420), 0.004));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(420, 660), 0.007));
- thisStopDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.DurationsBounds(660, 900), 0.002));
- stopDurationProbabilityDistribution.put(makeStopDurationGoodTrafficKey("Inhabitants", "vehTyp5"),
- new EnumeratedDistribution<>(rng, thisStopDurationProbabilityDistribution));
- thisStopDurationProbabilityDistribution.clear();
- }
return stopDurationProbabilityDistribution;
}
@Override
- public EnumeratedDistribution createTourDistribution(
- String smallScaleCommercialTrafficType, RandomGenerator rng) {
+ public Map> createTourDistribution(
+ RandomGenerator rng) {
+ Map> tourDistribution = new HashMap<>();
List> tourDurationProbabilityDistribution = new ArrayList<>();
- if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString())) {
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 0.0, 30.0), 0.0005917893035900173));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 30.0, 60.0), 0.00021859484237437887));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 90.0, 120.0), 0.00037490287407786324));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 120.0, 180.0), 0.0004337321926125666));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 180.0, 240.0), 0.0005834182239827621));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 240.0, 300.0), 0.0005116938323661723));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 300.0, 360.0), 0.0005027065159573272));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 360.0, 420.0), 0.0006719740164147071));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 420.0, 480.0), 0.00022375027665644004));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 480.0, 540.0), 0.00022103749529549306));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 540.0, 600.0), 0.00022119440831885122));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 600.0, 660.0), 0.0002732185104003396));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 660.0, 720.0), 7.287567629774946e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 720.0, 780.0), 0.0005090670761685264));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 780.0, 840.0), 0.0002169454122557984));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 840.0, 1080.0), 0.0016947794402011696));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 0.0, 30.0), 0.00033050926084770643));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 30.0, 60.0), 0.0004963985976117265));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 60.0, 90.0), 0.0009458837608304906));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 90.0, 120.0), 0.0006507941771038976));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 120.0, 180.0), 0.0002949035696660126));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 180.0, 240.0), 0.0005812406149568905));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 240.0, 300.0), 0.00072666224822023));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 300.0, 360.0), 0.0006017750128936798));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 360.0, 420.0), 0.0007696491628020603));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 420.0, 480.0), 0.0006951014583380694));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 480.0, 540.0), 0.0006675367479652174));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 540.0, 600.0), 0.0009951412624367468));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 600.0, 660.0), 0.0006193958232902363));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 660.0, 720.0), 0.0005496335422364244));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 720.0, 780.0), 0.000963763774344583));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 780.0, 840.0), 0.001585152586657775));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 840.0, 1080.0), 0.0022779973751500433));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 0.0, 30.0), 0.003678291745870938));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 30.0, 60.0), 0.0037749680865755936));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 60.0, 90.0), 0.0021464058981758467));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 90.0, 120.0), 0.0010105726369455444));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 120.0, 180.0), 0.0017166729332290624));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 180.0, 240.0), 0.001218657902054598));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 240.0, 300.0), 0.0019212859349972463));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 300.0, 360.0), 0.0018498349748915703));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 360.0, 420.0), 0.0020820722844894844));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 420.0, 480.0), 0.0033255032578691536));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 480.0, 540.0), 0.004499580798913233));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 540.0, 600.0), 0.004508722079694882));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 600.0, 660.0), 0.009460453046374911));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 660.0, 720.0), 0.008632039128635343));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 720.0, 780.0), 0.005173130409039029));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 780.0, 840.0), 0.0021287189901771954));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 840.0, 1080.0), 0.002735246591728173));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 0.0, 30.0), 0.015534599731489868));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 30.0, 60.0), 0.009424737666749776));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 60.0, 90.0), 0.003979757502241877));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 90.0, 120.0), 0.0026219034509082214));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 120.0, 180.0), 0.004373894821911171));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 180.0, 240.0), 0.005349695968407728));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 240.0, 300.0), 0.008398668008895199));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 300.0, 360.0), 0.013017576110359298));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 360.0, 420.0), 0.013178466937493282));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 420.0, 480.0), 0.015799261066253244));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 480.0, 540.0), 0.031932993774084484));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 540.0, 600.0), 0.056976770375347194));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 600.0, 660.0), 0.03411514635058722));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 660.0, 720.0), 0.010952547256934878));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 720.0, 780.0), 0.005071677294689363));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 780.0, 840.0), 0.002758017802376135));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 840.0, 1080.0), 0.003182481371327368));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 0.0, 30.0), 0.018010507239762663));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 30.0, 60.0), 0.009246211080247332));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 60.0, 90.0), 0.006297103845359016));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 90.0, 120.0), 0.003415561088528113));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 120.0, 180.0), 0.010918022744746231));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 180.0, 240.0), 0.011371721163141522));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 240.0, 300.0), 0.01861910064916215));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 300.0, 360.0), 0.015443374909900384));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 360.0, 420.0), 0.020470726990450452));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 420.0, 480.0), 0.030727618880727087));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 480.0, 540.0), 0.07364088624635841));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 540.0, 600.0), 0.04082061588575034));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 600.0, 660.0), 0.012935881167590665));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 660.0, 720.0), 0.005469250367916343));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 720.0, 780.0), 0.0030030673084490513));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 780.0, 840.0), 0.0011042643367551329));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 840.0, 1080.0), 0.0011327583672022575));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 0.0, 30.0), 0.015589932735904798));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 30.0, 60.0), 0.007157798082590814));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 60.0, 90.0), 0.006563655710107534));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 90.0, 120.0), 0.004888423230467872));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 120.0, 180.0), 0.01261126944262904));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 180.0, 240.0), 0.013275311108363174));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 240.0, 300.0), 0.011059737216827653));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 300.0, 360.0), 0.00980644443311104));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 360.0, 420.0), 0.013476523854959467));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 420.0, 480.0), 0.01766932338862498));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 480.0, 540.0), 0.013855266610087914));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 540.0, 600.0), 0.006090238569895901));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 600.0, 660.0), 0.00326688741194661));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 660.0, 720.0), 0.0009742217966822537));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 720.0, 780.0), 0.0008462163162537791));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 780.0, 840.0), 0.0009357453082055104));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 840.0, 1080.0), 0.0006867783494497427));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 0.0, 30.0), 0.011836581569331607));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 30.0, 60.0), 0.0060475163532472224));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 60.0, 90.0), 0.006091033719221284));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 90.0, 120.0), 0.004870323217391879));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 120.0, 180.0), 0.009852214102720915));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 180.0, 240.0), 0.006649077724867284));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 240.0, 300.0), 0.006549809619698136));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 300.0, 360.0), 0.00743649188225418));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 360.0, 420.0), 0.008370330719772223));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 420.0, 480.0), 0.006055410372169952));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 480.0, 540.0), 0.003221026290023441));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 540.0, 600.0), 0.00270804359225063));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 600.0, 660.0), 0.0011328763880567346));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 660.0, 720.0), 0.0005295062815147344));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 720.0, 780.0), 0.0005244739409173669));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 780.0, 840.0), 0.00022261373811852168));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 840.0, 1080.0), 0.0002976820307410009));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 0.0, 30.0), 0.0072347359578799255));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 30.0, 60.0), 0.005528762818372258));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 60.0, 90.0), 0.004301874597910846));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 90.0, 120.0), 0.002706271535768685));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 120.0, 180.0), 0.004461225555303183));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 180.0, 240.0), 0.003289266637558867));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 240.0, 300.0), 0.004773112389257731));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 300.0, 360.0), 0.004153307715767419));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 360.0, 420.0), 0.0023002274828502435));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 420.0, 480.0), 0.002295722460734858));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 480.0, 540.0), 0.0008008191218782178));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 540.0, 600.0), 0.0005302938593833011));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 600.0, 660.0), 0.00012017333498779025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 660.0, 720.0), 0.00029497120761336085));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 720.0, 780.0), 7.442207741095891e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 780.0, 840.0), 7.491510042413546e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 0.0, 30.0), 0.005979044848708125));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 30.0, 60.0), 0.0030727725862362003));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 60.0, 90.0), 0.0018328582061095421));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 90.0, 120.0), 0.0015730248216810105));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 120.0, 180.0), 0.0025909176745678485));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 180.0, 240.0), 0.0023584284876344117));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 240.0, 300.0), 0.002888683132930499));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 300.0, 360.0), 0.0026723295114103734));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 360.0, 420.0), 0.001368034507711622));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 420.0, 480.0), 0.001322142609646873));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 480.0, 540.0), 0.00014896322977011863));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 540.0, 600.0), 0.00036793050573151096));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 600.0, 660.0), 0.0003024749417379503));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 660.0, 720.0), 7.263766179594998e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 720.0, 780.0), 7.737798495114381e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 840.0, 1080.0), 7.360037219024495e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 0.0, 30.0), 0.005442934607459622));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 30.0, 60.0), 0.0023099603288455053));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 60.0, 90.0), 0.0015476125810207045));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 90.0, 120.0), 0.0015690710859882222));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 120.0, 180.0), 0.003155552178314994));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 180.0, 240.0), 0.0024715148201473933));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 240.0, 300.0), 0.00214638868043489));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 300.0, 360.0), 0.0017134793037846727));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 360.0, 420.0), 0.0009684921868733149));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 420.0, 480.0), 0.0005519992558366529));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 480.0, 540.0), 0.0004441672064981391));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 540.0, 600.0), 0.00022332686365997108));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 600.0, 660.0), 0.00023780343565208111));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 660.0, 720.0), 0.00014898555439278127));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 0.0, 30.0), 0.0065652971880044205));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 30.0, 60.0), 0.0033645458423904226));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 60.0, 90.0), 0.002247264924524252));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 90.0, 120.0), 0.0021755851670695867));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 120.0, 180.0), 0.00292250684836152));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 180.0, 240.0), 0.0029939610328467135));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 240.0, 300.0), 0.0013771262994841458));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 300.0, 360.0), 0.0005929387919824101));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 360.0, 420.0), 0.0007299574379337656));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 420.0, 480.0), 0.00015161310680499916));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 480.0, 540.0), 0.00022326623210165028));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 540.0, 600.0), 0.00021908720500178134));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 0.0, 30.0), 0.004700575755513116));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 30.0, 60.0), 0.002876930233578738));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 60.0, 90.0), 0.0012326059557891803));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 90.0, 120.0), 0.001688513011030605));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 120.0, 180.0), 0.0024148215923521744));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 180.0, 240.0), 0.0009664823712470381));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 240.0, 300.0), 0.0008158516384741175));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 300.0, 360.0), 0.0005326476409500361));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 360.0, 420.0), 0.00037447250704764534));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 420.0, 480.0), 7.278074100962308e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 480.0, 540.0), 0.00015460621875651884));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 540.0, 600.0), 0.00022625636961834557));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 840.0, 1080.0), 7.369704340227916e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 0.0, 30.0), 0.005421542133242069));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 30.0, 60.0), 0.0028543297205245563));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 60.0, 90.0), 0.001320449445343739));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 90.0, 120.0), 0.0011372744623221703));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 120.0, 180.0), 0.0011175546229352943));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 180.0, 240.0), 0.0005212091408906178));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 240.0, 300.0), 0.00025063117439263165));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 300.0, 360.0), 0.0002906557976189996));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 360.0, 420.0), 6.934683987097806e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 420.0, 480.0), 7.198332684426051e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 0.0, 30.0), 0.005997678933359281));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 30.0, 60.0), 0.0014450238860978966));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 60.0, 90.0), 0.0008909835110546583));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 90.0, 120.0), 0.0008692603958852261));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 120.0, 180.0), 0.0004645626068627116));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 180.0, 240.0), 0.0005161866418057845));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 240.0, 300.0), 0.00047492492382272117));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 300.0, 360.0), 7.348989097075777e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 360.0, 420.0), 0.0003000342936128893));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 0.0, 30.0), 0.004621906661329853));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 30.0, 60.0), 0.0015152391398060199));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 60.0, 90.0), 0.0006769045119123614));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 90.0, 120.0), 0.00044820275277284946));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 120.0, 180.0), 0.0007140653752077821));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 180.0, 240.0), 0.0001502672132808765));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 240.0, 300.0), 0.0003842231300012746));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 300.0, 360.0), 0.00021634404805889257));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 0.0, 30.0), 0.0034023082743939916));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 30.0, 60.0), 0.0006251774232962365));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 60.0, 90.0), 0.00022163965781205308));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 90.0, 120.0), 7.360037219024495e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 120.0, 180.0), 0.00045934601255169126));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 180.0, 240.0), 7.511874968194916e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 240.0, 300.0), 0.0001486019187134722));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 300.0, 360.0), 7.505084488366769e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 420.0, 480.0), 7.594714627228585e-05));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 0.0, 30.0), 0.005137034953520923));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 30.0, 60.0), 0.0010774703023578233));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 60.0, 90.0), 0.00048539418673270443));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 90.0, 120.0), 0.0002988049182984063));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 120.0, 180.0), 0.00032644209078127245));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 180.0, 240.0), 0.0005357497395368892));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 240.0, 300.0), 0.0002944914928100358));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 300.0, 360.0), 0.00022851651374757815));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 0.0, 30.0), 0.0005917893035900173));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 30.0, 60.0), 0.00021859484237437887));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 90.0, 120.0), 0.00037490287407786324));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 120.0, 180.0), 0.0004337321926125666));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 180.0, 240.0), 0.0005834182239827621));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 240.0, 300.0), 0.0005116938323661723));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 300.0, 360.0), 0.0005027065159573272));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 360.0, 420.0), 0.0006719740164147071));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 420.0, 480.0), 0.00022375027665644004));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 480.0, 540.0), 0.00022103749529549306));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 540.0, 600.0), 0.00022119440831885122));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 600.0, 660.0), 0.0002732185104003396));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 660.0, 720.0), 7.287567629774946e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 720.0, 780.0), 0.0005090670761685264));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 780.0, 840.0), 0.0002169454122557984));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 840.0, 1080.0), 0.0016947794402011696));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 0.0, 30.0), 0.00033050926084770643));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 30.0, 60.0), 0.0004963985976117265));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 60.0, 90.0), 0.0009458837608304906));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 90.0, 120.0), 0.0006507941771038976));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 120.0, 180.0), 0.0002949035696660126));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 180.0, 240.0), 0.0005812406149568905));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 240.0, 300.0), 0.00072666224822023));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 300.0, 360.0), 0.0006017750128936798));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 360.0, 420.0), 0.0007696491628020603));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 420.0, 480.0), 0.0006951014583380694));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 480.0, 540.0), 0.0006675367479652174));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 540.0, 600.0), 0.0009951412624367468));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 600.0, 660.0), 0.0006193958232902363));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 660.0, 720.0), 0.0005496335422364244));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 720.0, 780.0), 0.000963763774344583));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 780.0, 840.0), 0.001585152586657775));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 840.0, 1080.0), 0.0022779973751500433));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 0.0, 30.0), 0.003678291745870938));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 30.0, 60.0), 0.0037749680865755936));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 60.0, 90.0), 0.0021464058981758467));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 90.0, 120.0), 0.0010105726369455444));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 120.0, 180.0), 0.0017166729332290624));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 180.0, 240.0), 0.001218657902054598));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 240.0, 300.0), 0.0019212859349972463));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 300.0, 360.0), 0.0018498349748915703));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 360.0, 420.0), 0.0020820722844894844));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 420.0, 480.0), 0.0033255032578691536));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 480.0, 540.0), 0.004499580798913233));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 540.0, 600.0), 0.004508722079694882));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 600.0, 660.0), 0.009460453046374911));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 660.0, 720.0), 0.008632039128635343));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 720.0, 780.0), 0.005173130409039029));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 780.0, 840.0), 0.0021287189901771954));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 840.0, 1080.0), 0.002735246591728173));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 0.0, 30.0), 0.015534599731489868));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 30.0, 60.0), 0.009424737666749776));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 60.0, 90.0), 0.003979757502241877));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 90.0, 120.0), 0.0026219034509082214));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 120.0, 180.0), 0.004373894821911171));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 180.0, 240.0), 0.005349695968407728));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 240.0, 300.0), 0.008398668008895199));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 300.0, 360.0), 0.013017576110359298));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 360.0, 420.0), 0.013178466937493282));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 420.0, 480.0), 0.015799261066253244));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 480.0, 540.0), 0.031932993774084484));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 540.0, 600.0), 0.056976770375347194));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 600.0, 660.0), 0.03411514635058722));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 660.0, 720.0), 0.010952547256934878));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 720.0, 780.0), 0.005071677294689363));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 780.0, 840.0), 0.002758017802376135));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 840.0, 1080.0), 0.003182481371327368));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 0.0, 30.0), 0.018010507239762663));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 30.0, 60.0), 0.009246211080247332));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 60.0, 90.0), 0.006297103845359016));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 90.0, 120.0), 0.003415561088528113));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 120.0, 180.0), 0.010918022744746231));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 180.0, 240.0), 0.011371721163141522));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 240.0, 300.0), 0.01861910064916215));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 300.0, 360.0), 0.015443374909900384));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 360.0, 420.0), 0.020470726990450452));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 420.0, 480.0), 0.030727618880727087));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 480.0, 540.0), 0.07364088624635841));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 540.0, 600.0), 0.04082061588575034));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 600.0, 660.0), 0.012935881167590665));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 660.0, 720.0), 0.005469250367916343));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 720.0, 780.0), 0.0030030673084490513));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 780.0, 840.0), 0.0011042643367551329));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 840.0, 1080.0), 0.0011327583672022575));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 0.0, 30.0), 0.015589932735904798));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 30.0, 60.0), 0.007157798082590814));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 60.0, 90.0), 0.006563655710107534));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 90.0, 120.0), 0.004888423230467872));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 120.0, 180.0), 0.01261126944262904));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 180.0, 240.0), 0.013275311108363174));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 240.0, 300.0), 0.011059737216827653));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 300.0, 360.0), 0.00980644443311104));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 360.0, 420.0), 0.013476523854959467));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 420.0, 480.0), 0.01766932338862498));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 480.0, 540.0), 0.013855266610087914));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 540.0, 600.0), 0.006090238569895901));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 600.0, 660.0), 0.00326688741194661));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 660.0, 720.0), 0.0009742217966822537));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 720.0, 780.0), 0.0008462163162537791));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 780.0, 840.0), 0.0009357453082055104));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 840.0, 1080.0), 0.0006867783494497427));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 0.0, 30.0), 0.011836581569331607));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 30.0, 60.0), 0.0060475163532472224));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 60.0, 90.0), 0.006091033719221284));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 90.0, 120.0), 0.004870323217391879));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 120.0, 180.0), 0.009852214102720915));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 180.0, 240.0), 0.006649077724867284));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 240.0, 300.0), 0.006549809619698136));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 300.0, 360.0), 0.00743649188225418));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 360.0, 420.0), 0.008370330719772223));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 420.0, 480.0), 0.006055410372169952));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 480.0, 540.0), 0.003221026290023441));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 540.0, 600.0), 0.00270804359225063));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 600.0, 660.0), 0.0011328763880567346));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 660.0, 720.0), 0.0005295062815147344));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 720.0, 780.0), 0.0005244739409173669));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 780.0, 840.0), 0.00022261373811852168));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 840.0, 1080.0), 0.0002976820307410009));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 0.0, 30.0), 0.0072347359578799255));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 30.0, 60.0), 0.005528762818372258));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 60.0, 90.0), 0.004301874597910846));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 90.0, 120.0), 0.002706271535768685));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 120.0, 180.0), 0.004461225555303183));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 180.0, 240.0), 0.003289266637558867));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 240.0, 300.0), 0.004773112389257731));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 300.0, 360.0), 0.004153307715767419));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 360.0, 420.0), 0.0023002274828502435));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 420.0, 480.0), 0.002295722460734858));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 480.0, 540.0), 0.0008008191218782178));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 540.0, 600.0), 0.0005302938593833011));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 600.0, 660.0), 0.00012017333498779025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 660.0, 720.0), 0.00029497120761336085));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 720.0, 780.0), 7.442207741095891e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 780.0, 840.0), 7.491510042413546e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 0.0, 30.0), 0.005979044848708125));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 30.0, 60.0), 0.0030727725862362003));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 60.0, 90.0), 0.0018328582061095421));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 90.0, 120.0), 0.0015730248216810105));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 120.0, 180.0), 0.0025909176745678485));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 180.0, 240.0), 0.0023584284876344117));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 240.0, 300.0), 0.002888683132930499));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 300.0, 360.0), 0.0026723295114103734));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 360.0, 420.0), 0.001368034507711622));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 420.0, 480.0), 0.001322142609646873));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 480.0, 540.0), 0.00014896322977011863));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 540.0, 600.0), 0.00036793050573151096));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 600.0, 660.0), 0.0003024749417379503));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 660.0, 720.0), 7.263766179594998e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 720.0, 780.0), 7.737798495114381e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 840.0, 1080.0), 7.360037219024495e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 0.0, 30.0), 0.005442934607459622));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 30.0, 60.0), 0.0023099603288455053));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 60.0, 90.0), 0.0015476125810207045));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 90.0, 120.0), 0.0015690710859882222));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 120.0, 180.0), 0.003155552178314994));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 180.0, 240.0), 0.0024715148201473933));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 240.0, 300.0), 0.00214638868043489));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 300.0, 360.0), 0.0017134793037846727));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 360.0, 420.0), 0.0009684921868733149));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 420.0, 480.0), 0.0005519992558366529));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 480.0, 540.0), 0.0004441672064981391));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 540.0, 600.0), 0.00022332686365997108));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 600.0, 660.0), 0.00023780343565208111));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 660.0, 720.0), 0.00014898555439278127));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 0.0, 30.0), 0.0065652971880044205));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 30.0, 60.0), 0.0033645458423904226));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 60.0, 90.0), 0.002247264924524252));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 90.0, 120.0), 0.0021755851670695867));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 120.0, 180.0), 0.00292250684836152));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 180.0, 240.0), 0.0029939610328467135));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 240.0, 300.0), 0.0013771262994841458));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 300.0, 360.0), 0.0005929387919824101));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 360.0, 420.0), 0.0007299574379337656));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 420.0, 480.0), 0.00015161310680499916));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 480.0, 540.0), 0.00022326623210165028));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 540.0, 600.0), 0.00021908720500178134));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 0.0, 30.0), 0.004700575755513116));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 30.0, 60.0), 0.002876930233578738));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 60.0, 90.0), 0.0012326059557891803));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 90.0, 120.0), 0.001688513011030605));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 120.0, 180.0), 0.0024148215923521744));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 180.0, 240.0), 0.0009664823712470381));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 240.0, 300.0), 0.0008158516384741175));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 300.0, 360.0), 0.0005326476409500361));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 360.0, 420.0), 0.00037447250704764534));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 420.0, 480.0), 7.278074100962308e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 480.0, 540.0), 0.00015460621875651884));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 540.0, 600.0), 0.00022625636961834557));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 840.0, 1080.0), 7.369704340227916e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 0.0, 30.0), 0.005421542133242069));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 30.0, 60.0), 0.0028543297205245563));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 60.0, 90.0), 0.001320449445343739));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 90.0, 120.0), 0.0011372744623221703));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 120.0, 180.0), 0.0011175546229352943));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 180.0, 240.0), 0.0005212091408906178));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 240.0, 300.0), 0.00025063117439263165));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 300.0, 360.0), 0.0002906557976189996));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 360.0, 420.0), 6.934683987097806e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 420.0, 480.0), 7.198332684426051e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 0.0, 30.0), 0.005997678933359281));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 30.0, 60.0), 0.0014450238860978966));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 60.0, 90.0), 0.0008909835110546583));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 90.0, 120.0), 0.0008692603958852261));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 120.0, 180.0), 0.0004645626068627116));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 180.0, 240.0), 0.0005161866418057845));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 240.0, 300.0), 0.00047492492382272117));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 300.0, 360.0), 7.348989097075777e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 360.0, 420.0), 0.0003000342936128893));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 0.0, 30.0), 0.004621906661329853));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 30.0, 60.0), 0.0015152391398060199));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 60.0, 90.0), 0.0006769045119123614));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 90.0, 120.0), 0.00044820275277284946));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 120.0, 180.0), 0.0007140653752077821));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 180.0, 240.0), 0.0001502672132808765));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 240.0, 300.0), 0.0003842231300012746));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 300.0, 360.0), 0.00021634404805889257));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 0.0, 30.0), 0.0034023082743939916));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 30.0, 60.0), 0.0006251774232962365));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 60.0, 90.0), 0.00022163965781205308));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 90.0, 120.0), 7.360037219024495e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 120.0, 180.0), 0.00045934601255169126));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 180.0, 240.0), 7.511874968194916e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 240.0, 300.0), 0.0001486019187134722));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 300.0, 360.0), 7.505084488366769e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 420.0, 480.0), 7.594714627228585e-05));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 0.0, 30.0), 0.005137034953520923));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 30.0, 60.0), 0.0010774703023578233));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 60.0, 90.0), 0.00048539418673270443));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 90.0, 120.0), 0.0002988049182984063));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 120.0, 180.0), 0.00032644209078127245));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 180.0, 240.0), 0.0005357497395368892));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 240.0, 300.0), 0.0002944914928100358));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 300.0, 360.0), 0.00022851651374757815));
- }
- else if (smallScaleCommercialTrafficType.equals(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString())) {
+ tourDistribution.put(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.commercialPersonTraffic.toString(),
+ new EnumeratedDistribution<>(rng, tourDurationProbabilityDistribution));
+ tourDurationProbabilityDistribution.clear();
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 0.0, 30.0), 0.0002666800577200411));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 30.0, 60.0), 0.0006395055678719748));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 60.0, 90.0), 0.0007110769046958423));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 90.0, 120.0), 0.0006665961628449491));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 120.0, 180.0), 0.0023195866923785575));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 180.0, 240.0), 0.00261751319938476));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 240.0, 300.0), 0.0021430032453503087));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 300.0, 360.0), 0.0029303876579925905));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 360.0, 420.0), 0.00283576618143643));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 420.0, 480.0), 0.0027188265347502893));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 480.0, 540.0), 0.002597768116531099));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 540.0, 600.0), 0.002659151494701916));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 600.0, 660.0), 0.0021738406044924437));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 660.0, 720.0), 0.0021949848461843176));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 720.0, 780.0), 0.0021801193011023083));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 780.0, 840.0), 0.001746033717539671));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 840.0, 1080.0), 0.00350888397405923));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 0.0, 30.0), 0.0006845643884312735));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 30.0, 60.0), 0.0004003126952082357));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 60.0, 90.0), 0.0008155012585632697));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 90.0, 120.0), 0.0010930534970200114));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 120.0, 180.0), 0.0011760353713952051));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 180.0, 240.0), 0.0019364061980548415));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 240.0, 300.0), 0.002953452881036028));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 300.0, 360.0), 0.002589370165068672));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 360.0, 420.0), 0.0025604405819583055));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 420.0, 480.0), 0.0034319041631081476));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 480.0, 540.0), 0.0033480025727905907));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 540.0, 600.0), 0.002175717502193024));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 600.0, 660.0), 0.0028036478238686957));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 660.0, 720.0), 0.0028759635193342887));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 720.0, 780.0), 0.0017584406503249872));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 780.0, 840.0), 0.0016742001219093045));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 840.0, 1080.0), 0.0020658205220468245));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 0.0, 30.0), 0.0017247403950228777));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 30.0, 60.0), 0.003090998236080484));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 60.0, 90.0), 0.0015209554995803177));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 90.0, 120.0), 0.0016533392810110293));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 120.0, 180.0), 0.003732306124403562));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 180.0, 240.0), 0.004106247357091271));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 240.0, 300.0), 0.003188442431357427));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 300.0, 360.0), 0.005929370570550301));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 360.0, 420.0), 0.005992695595693005));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 420.0, 480.0), 0.006390572360276255));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 480.0, 540.0), 0.00993732232424166));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 540.0, 600.0), 0.007917613781985494));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 600.0, 660.0), 0.00753055040114282));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 660.0, 720.0), 0.004839531706746983));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 720.0, 780.0), 0.003571294178536547));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 780.0, 840.0), 0.0022261075091276465));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 840.0, 1080.0), 0.0020123396391017526));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 0.0, 30.0), 0.00553085745500388));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 30.0, 60.0), 0.005164301035284355));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 60.0, 90.0), 0.0034287284279468384));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 90.0, 120.0), 0.003359657704287739));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 120.0, 180.0), 0.005963896679549981));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 180.0, 240.0), 0.006376396116305889));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 240.0, 300.0), 0.011553162434249647));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 300.0, 360.0), 0.01216390369869719));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 360.0, 420.0), 0.015303642980241483));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 420.0, 480.0), 0.01894502604909179));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 480.0, 540.0), 0.026995818384739457));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 540.0, 600.0), 0.03735238580259259));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 600.0, 660.0), 0.02007351137947408));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 660.0, 720.0), 0.007579189226621267));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 720.0, 780.0), 0.003806896198418994));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 780.0, 840.0), 0.0020371212990837376));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 840.0, 1080.0), 0.00246729057836831));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 0.0, 30.0), 0.007834929725170775));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 30.0, 60.0), 0.007875284751511802));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 60.0, 90.0), 0.0056369706407995695));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 90.0, 120.0), 0.007252792818630801));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 120.0, 180.0), 0.011595289158181222));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 180.0, 240.0), 0.01584695155572567));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 240.0, 300.0), 0.019385993489144607));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 300.0, 360.0), 0.01804569113072999));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 360.0, 420.0), 0.020338168968415053));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 420.0, 480.0), 0.03244941203821404));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 480.0, 540.0), 0.046986423884473));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 540.0, 600.0), 0.026127574804977814));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 600.0, 660.0), 0.006859707180170414));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 660.0, 720.0), 0.004053368732850601));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 720.0, 780.0), 0.0017728320836715625));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 780.0, 840.0), 0.0008117046283836942));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 840.0, 1080.0), 0.0014889766393137468));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 0.0, 30.0), 0.008702611915372131));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 30.0, 60.0), 0.009703391735884857));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 60.0, 90.0), 0.00833249802530372));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 90.0, 120.0), 0.008160824294542027));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 120.0, 180.0), 0.014522058792957903));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 180.0, 240.0), 0.019189639247661674));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 240.0, 300.0), 0.022628081955363144));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 300.0, 360.0), 0.018168175275565253));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 360.0, 420.0), 0.01830766579908246));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 420.0, 480.0), 0.022414786327228577));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 480.0, 540.0), 0.015454698179801149));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 540.0, 600.0), 0.00743339793333549));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 600.0, 660.0), 0.0028959167218627997));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 660.0, 720.0), 0.0011608823477359163));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 720.0, 780.0), 0.0006126324367099846));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 780.0, 840.0), 0.0007090395380022889));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 840.0, 1080.0), 0.0009650931773638335));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 0.0, 30.0), 0.010532384705529854));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 30.0, 60.0), 0.010106787618396446));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 60.0, 90.0), 0.007305519187631069));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 90.0, 120.0), 0.0065298278976416635));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 120.0, 180.0), 0.012991661099288086));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 180.0, 240.0), 0.011082392048301831));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 240.0, 300.0), 0.013735041027849332));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 300.0, 360.0), 0.012921165569106639));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 360.0, 420.0), 0.010187951930469277));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 420.0, 480.0), 0.0070071162811467125));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 480.0, 540.0), 0.003478434072337058));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 540.0, 600.0), 0.002487434148850001));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 600.0, 660.0), 0.0007617139935295275));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 660.0, 720.0), 0.0004794259473854554));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 720.0, 780.0), 0.00011828408353297643));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 780.0, 840.0), 0.0009221448817170415));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 0.0, 30.0), 0.0053803765038808364));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 30.0, 60.0), 0.00748440387556175));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 60.0, 90.0), 0.003817044622559703));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 90.0, 120.0), 0.0042559767658946045));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 120.0, 180.0), 0.004633517730561146));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 180.0, 240.0), 0.0040156278424527785));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 240.0, 300.0), 0.004097425621422603));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 300.0, 360.0), 0.00534407493573042));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 360.0, 420.0), 0.002849425985304954));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 420.0, 480.0), 0.0024443772372422234));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 480.0, 540.0), 0.0011258612568464076));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 540.0, 600.0), 0.0005966047093584399));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 600.0, 660.0), 0.0005779388889435179));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 660.0, 720.0), 0.0004527621290439082));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 720.0, 780.0), 0.00011727646428602624));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 780.0, 840.0), 0.00011130198744577025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 0.0, 30.0), 0.0025301846046864363));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 30.0, 60.0), 0.002932856090944951));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 60.0, 90.0), 0.0015297442159744696));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 90.0, 120.0), 0.0016816440829740813));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 120.0, 180.0), 0.0023140070407952395));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 180.0, 240.0), 0.0013768767086426792));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 240.0, 300.0), 0.0019019317686819275));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 300.0, 360.0), 0.0015577691125463963));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 360.0, 420.0), 0.001499121306916632));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 420.0, 480.0), 0.0007361366421130972));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 480.0, 540.0), 0.0007423049940853575));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 540.0, 600.0), 0.00011130198744577025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 660.0, 720.0), 0.00024243947114654707));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 720.0, 780.0), 0.000261579996858755));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 0.0, 30.0), 0.0021669594044717543));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 30.0, 60.0), 0.0033993161916113994));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 60.0, 90.0), 0.001870484877697732));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 90.0, 120.0), 0.0008448185262884799));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 120.0, 180.0), 0.002024573233571085));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 180.0, 240.0), 0.0021888099857994042));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 240.0, 300.0), 0.0021657834323017752));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 300.0, 360.0), 0.0010623089332746248));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 360.0, 420.0), 0.0006268095760401356));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 420.0, 480.0), 0.0005094532977538987));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 480.0, 540.0), 0.0004744090926784203));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 540.0, 600.0), 0.00016487328572417658));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 660.0, 720.0), 0.0001162996982120756));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 0.0, 30.0), 0.0033401411497772818));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 30.0, 60.0), 0.002492685695459365));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 60.0, 90.0), 0.0027064477589805068));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 90.0, 120.0), 0.0018052297053924354));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 120.0, 180.0), 0.0027984509294891498));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 180.0, 240.0), 0.0022758505657711914));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 240.0, 300.0), 0.0003535503655144059));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 300.0, 360.0), 0.0005890430396050117));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 360.0, 420.0), 0.0002319134363595028));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 420.0, 480.0), 0.00011617748025141993));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 480.0, 540.0), 0.0003690064941818713));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 540.0, 600.0), 0.0001650495071007077));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 600.0, 660.0), 0.00023113252306835525));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 840.0, 1080.0), 0.00017239206443126303));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 0.0, 30.0), 0.003543871129770451));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 30.0, 60.0), 0.0018407982276338393));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 60.0, 90.0), 0.0010649270862293423));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 90.0, 120.0), 0.0009538696044712171));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 120.0, 180.0), 0.0021318639289119572));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 180.0, 240.0), 0.0019740243143620277));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 240.0, 300.0), 0.0006157677659961421));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 300.0, 360.0), 0.0004035374922773149));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 360.0, 420.0), 0.00011607019237524387));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 420.0, 480.0), 0.0003938282727195195));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 480.0, 540.0), 0.00011130198744577025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 600.0, 660.0), 0.00011942109323430472));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 0.0, 30.0), 0.00254340964132742));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 30.0, 60.0), 0.0017847751078888892));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 60.0, 90.0), 0.000841891386995212));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 90.0, 120.0), 0.0003543852337006742));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 120.0, 180.0), 0.0013974221085794884));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 180.0, 240.0), 0.0006229273683665316));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 240.0, 300.0), 0.00020579571489011056));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 300.0, 360.0), 0.0004809214516599411));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 360.0, 420.0), 0.00022514291890117063));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 420.0, 480.0), 0.00014748146383900364));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 720.0, 780.0), 0.00011605559293173729));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 0.0, 30.0), 0.0019634787835054656));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 30.0, 60.0), 0.000860670737476427));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 60.0, 90.0), 0.0003550148096943092));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 90.0, 120.0), 0.000855728546868917));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 120.0, 180.0), 0.0009283998993093458));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 180.0, 240.0), 0.00022795178106384156));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 240.0, 300.0), 0.00024119874825349313));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 420.0, 480.0), 0.00023429279224671318));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 480.0, 540.0), 0.00011727269965059726));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 660.0, 720.0), 0.00011130198744577025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 0.0, 30.0), 0.0017099830161073832));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 30.0, 60.0), 0.0006015092064895483));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 60.0, 90.0), 0.00011819436012345105));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 90.0, 120.0), 0.0002279569151752547));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 120.0, 180.0), 0.0006440525787748041));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 180.0, 240.0), 0.0003142746964600832));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 300.0, 360.0), 0.00022788575876606104));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 360.0, 420.0), 0.0004761806298753505));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 480.0, 540.0), 0.00011727269965059726));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 0.0, 30.0), 0.0020011795184968267));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 30.0, 60.0), 0.00023620950461199452));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 60.0, 90.0), 0.00011935825257957617));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 90.0, 120.0), 0.00011130198744577025));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 120.0, 180.0), 0.00012222981614916706));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 180.0, 240.0), 0.0002377005397786721));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 240.0, 300.0), 0.00026373526728965034));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 300.0, 360.0), 0.000256086036315955));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 360.0, 420.0), 0.00011394287938236544));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 0.0, 30.0), 0.0021116872169622083));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 30.0, 60.0), 0.0003681765715703113));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 60.0, 90.0), 0.0004137833254678062));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 90.0, 120.0), 0.00025108497234833097));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 120.0, 180.0), 0.0007576827338029722));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 180.0, 240.0), 0.0005180490039062906));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 240.0, 300.0), 0.0004944106124208977));
- tourDurationProbabilityDistribution.add(Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 300.0, 360.0), 0.0002278857587658224));
- } else
- throw new IllegalArgumentException("Unknown small scale commercial traffic type: " + smallScaleCommercialTrafficType);
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 0.0, 30.0), 0.0002666800577200411));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 30.0, 60.0), 0.0006395055678719748));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 60.0, 90.0), 0.0007110769046958423));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 90.0, 120.0), 0.0006665961628449491));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 120.0, 180.0), 0.0023195866923785575));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 180.0, 240.0), 0.00261751319938476));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 240.0, 300.0), 0.0021430032453503087));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 300.0, 360.0), 0.0029303876579925905));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 360.0, 420.0), 0.00283576618143643));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 420.0, 480.0), 0.0027188265347502893));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 480.0, 540.0), 0.002597768116531099));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 540.0, 600.0), 0.002659151494701916));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 600.0, 660.0), 0.0021738406044924437));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 660.0, 720.0), 0.0021949848461843176));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 720.0, 780.0), 0.0021801193011023083));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 780.0, 840.0), 0.001746033717539671));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(0, 4, 840.0, 1080.0), 0.00350888397405923));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 0.0, 30.0), 0.0006845643884312735));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 30.0, 60.0), 0.0004003126952082357));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 60.0, 90.0), 0.0008155012585632697));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 90.0, 120.0), 0.0010930534970200114));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 120.0, 180.0), 0.0011760353713952051));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 180.0, 240.0), 0.0019364061980548415));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 240.0, 300.0), 0.002953452881036028));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 300.0, 360.0), 0.002589370165068672));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 360.0, 420.0), 0.0025604405819583055));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 420.0, 480.0), 0.0034319041631081476));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 480.0, 540.0), 0.0033480025727905907));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 540.0, 600.0), 0.002175717502193024));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 600.0, 660.0), 0.0028036478238686957));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 660.0, 720.0), 0.0028759635193342887));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 720.0, 780.0), 0.0017584406503249872));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 780.0, 840.0), 0.0016742001219093045));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(4, 5, 840.0, 1080.0), 0.0020658205220468245));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 0.0, 30.0), 0.0017247403950228777));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 30.0, 60.0), 0.003090998236080484));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 60.0, 90.0), 0.0015209554995803177));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 90.0, 120.0), 0.0016533392810110293));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 120.0, 180.0), 0.003732306124403562));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 180.0, 240.0), 0.004106247357091271));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 240.0, 300.0), 0.003188442431357427));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 300.0, 360.0), 0.005929370570550301));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 360.0, 420.0), 0.005992695595693005));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 420.0, 480.0), 0.006390572360276255));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 480.0, 540.0), 0.00993732232424166));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 540.0, 600.0), 0.007917613781985494));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 600.0, 660.0), 0.00753055040114282));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 660.0, 720.0), 0.004839531706746983));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 720.0, 780.0), 0.003571294178536547));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 780.0, 840.0), 0.0022261075091276465));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(5, 6, 840.0, 1080.0), 0.0020123396391017526));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 0.0, 30.0), 0.00553085745500388));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 30.0, 60.0), 0.005164301035284355));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 60.0, 90.0), 0.0034287284279468384));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 90.0, 120.0), 0.003359657704287739));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 120.0, 180.0), 0.005963896679549981));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 180.0, 240.0), 0.006376396116305889));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 240.0, 300.0), 0.011553162434249647));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 300.0, 360.0), 0.01216390369869719));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 360.0, 420.0), 0.015303642980241483));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 420.0, 480.0), 0.01894502604909179));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 480.0, 540.0), 0.026995818384739457));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 540.0, 600.0), 0.03735238580259259));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 600.0, 660.0), 0.02007351137947408));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 660.0, 720.0), 0.007579189226621267));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 720.0, 780.0), 0.003806896198418994));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 780.0, 840.0), 0.0020371212990837376));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(6, 7, 840.0, 1080.0), 0.00246729057836831));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 0.0, 30.0), 0.007834929725170775));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 30.0, 60.0), 0.007875284751511802));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 60.0, 90.0), 0.0056369706407995695));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 90.0, 120.0), 0.007252792818630801));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 120.0, 180.0), 0.011595289158181222));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 180.0, 240.0), 0.01584695155572567));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 240.0, 300.0), 0.019385993489144607));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 300.0, 360.0), 0.01804569113072999));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 360.0, 420.0), 0.020338168968415053));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 420.0, 480.0), 0.03244941203821404));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 480.0, 540.0), 0.046986423884473));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 540.0, 600.0), 0.026127574804977814));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 600.0, 660.0), 0.006859707180170414));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 660.0, 720.0), 0.004053368732850601));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 720.0, 780.0), 0.0017728320836715625));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 780.0, 840.0), 0.0008117046283836942));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(7, 8, 840.0, 1080.0), 0.0014889766393137468));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 0.0, 30.0), 0.008702611915372131));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 30.0, 60.0), 0.009703391735884857));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 60.0, 90.0), 0.00833249802530372));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 90.0, 120.0), 0.008160824294542027));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 120.0, 180.0), 0.014522058792957903));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 180.0, 240.0), 0.019189639247661674));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 240.0, 300.0), 0.022628081955363144));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 300.0, 360.0), 0.018168175275565253));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 360.0, 420.0), 0.01830766579908246));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 420.0, 480.0), 0.022414786327228577));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 480.0, 540.0), 0.015454698179801149));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 540.0, 600.0), 0.00743339793333549));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 600.0, 660.0), 0.0028959167218627997));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 660.0, 720.0), 0.0011608823477359163));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 720.0, 780.0), 0.0006126324367099846));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 780.0, 840.0), 0.0007090395380022889));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(8, 9, 840.0, 1080.0), 0.0009650931773638335));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 0.0, 30.0), 0.010532384705529854));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 30.0, 60.0), 0.010106787618396446));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 60.0, 90.0), 0.007305519187631069));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 90.0, 120.0), 0.0065298278976416635));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 120.0, 180.0), 0.012991661099288086));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 180.0, 240.0), 0.011082392048301831));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 240.0, 300.0), 0.013735041027849332));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 300.0, 360.0), 0.012921165569106639));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 360.0, 420.0), 0.010187951930469277));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 420.0, 480.0), 0.0070071162811467125));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 480.0, 540.0), 0.003478434072337058));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 540.0, 600.0), 0.002487434148850001));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 600.0, 660.0), 0.0007617139935295275));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 660.0, 720.0), 0.0004794259473854554));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 720.0, 780.0), 0.00011828408353297643));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(9, 10, 780.0, 840.0), 0.0009221448817170415));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 0.0, 30.0), 0.0053803765038808364));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 30.0, 60.0), 0.00748440387556175));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 60.0, 90.0), 0.003817044622559703));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 90.0, 120.0), 0.0042559767658946045));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 120.0, 180.0), 0.004633517730561146));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 180.0, 240.0), 0.0040156278424527785));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 240.0, 300.0), 0.004097425621422603));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 300.0, 360.0), 0.00534407493573042));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 360.0, 420.0), 0.002849425985304954));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 420.0, 480.0), 0.0024443772372422234));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 480.0, 540.0), 0.0011258612568464076));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 540.0, 600.0), 0.0005966047093584399));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 600.0, 660.0), 0.0005779388889435179));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 660.0, 720.0), 0.0004527621290439082));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 720.0, 780.0), 0.00011727646428602624));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(10, 11, 780.0, 840.0), 0.00011130198744577025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 0.0, 30.0), 0.0025301846046864363));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 30.0, 60.0), 0.002932856090944951));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 60.0, 90.0), 0.0015297442159744696));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 90.0, 120.0), 0.0016816440829740813));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 120.0, 180.0), 0.0023140070407952395));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 180.0, 240.0), 0.0013768767086426792));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 240.0, 300.0), 0.0019019317686819275));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 300.0, 360.0), 0.0015577691125463963));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 360.0, 420.0), 0.001499121306916632));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 420.0, 480.0), 0.0007361366421130972));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 480.0, 540.0), 0.0007423049940853575));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 540.0, 600.0), 0.00011130198744577025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 660.0, 720.0), 0.00024243947114654707));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(11, 12, 720.0, 780.0), 0.000261579996858755));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 0.0, 30.0), 0.0021669594044717543));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 30.0, 60.0), 0.0033993161916113994));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 60.0, 90.0), 0.001870484877697732));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 90.0, 120.0), 0.0008448185262884799));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 120.0, 180.0), 0.002024573233571085));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 180.0, 240.0), 0.0021888099857994042));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 240.0, 300.0), 0.0021657834323017752));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 300.0, 360.0), 0.0010623089332746248));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 360.0, 420.0), 0.0006268095760401356));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 420.0, 480.0), 0.0005094532977538987));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 480.0, 540.0), 0.0004744090926784203));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 540.0, 600.0), 0.00016487328572417658));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(12, 13, 660.0, 720.0), 0.0001162996982120756));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 0.0, 30.0), 0.0033401411497772818));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 30.0, 60.0), 0.002492685695459365));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 60.0, 90.0), 0.0027064477589805068));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 90.0, 120.0), 0.0018052297053924354));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 120.0, 180.0), 0.0027984509294891498));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 180.0, 240.0), 0.0022758505657711914));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 240.0, 300.0), 0.0003535503655144059));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 300.0, 360.0), 0.0005890430396050117));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 360.0, 420.0), 0.0002319134363595028));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 420.0, 480.0), 0.00011617748025141993));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 480.0, 540.0), 0.0003690064941818713));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 540.0, 600.0), 0.0001650495071007077));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 600.0, 660.0), 0.00023113252306835525));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(13, 14, 840.0, 1080.0), 0.00017239206443126303));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 0.0, 30.0), 0.003543871129770451));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 30.0, 60.0), 0.0018407982276338393));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 60.0, 90.0), 0.0010649270862293423));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 90.0, 120.0), 0.0009538696044712171));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 120.0, 180.0), 0.0021318639289119572));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 180.0, 240.0), 0.0019740243143620277));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 240.0, 300.0), 0.0006157677659961421));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 300.0, 360.0), 0.0004035374922773149));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 360.0, 420.0), 0.00011607019237524387));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 420.0, 480.0), 0.0003938282727195195));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 480.0, 540.0), 0.00011130198744577025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(14, 15, 600.0, 660.0), 0.00011942109323430472));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 0.0, 30.0), 0.00254340964132742));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 30.0, 60.0), 0.0017847751078888892));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 60.0, 90.0), 0.000841891386995212));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 90.0, 120.0), 0.0003543852337006742));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 120.0, 180.0), 0.0013974221085794884));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 180.0, 240.0), 0.0006229273683665316));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 240.0, 300.0), 0.00020579571489011056));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 300.0, 360.0), 0.0004809214516599411));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 360.0, 420.0), 0.00022514291890117063));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 420.0, 480.0), 0.00014748146383900364));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(15, 16, 720.0, 780.0), 0.00011605559293173729));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 0.0, 30.0), 0.0019634787835054656));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 30.0, 60.0), 0.000860670737476427));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 60.0, 90.0), 0.0003550148096943092));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 90.0, 120.0), 0.000855728546868917));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 120.0, 180.0), 0.0009283998993093458));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 180.0, 240.0), 0.00022795178106384156));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 240.0, 300.0), 0.00024119874825349313));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 420.0, 480.0), 0.00023429279224671318));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 480.0, 540.0), 0.00011727269965059726));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(16, 17, 660.0, 720.0), 0.00011130198744577025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 0.0, 30.0), 0.0017099830161073832));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 30.0, 60.0), 0.0006015092064895483));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 60.0, 90.0), 0.00011819436012345105));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 90.0, 120.0), 0.0002279569151752547));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 120.0, 180.0), 0.0006440525787748041));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 180.0, 240.0), 0.0003142746964600832));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 300.0, 360.0), 0.00022788575876606104));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 360.0, 420.0), 0.0004761806298753505));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(17, 18, 480.0, 540.0), 0.00011727269965059726));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 0.0, 30.0), 0.0020011795184968267));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 30.0, 60.0), 0.00023620950461199452));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 60.0, 90.0), 0.00011935825257957617));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 90.0, 120.0), 0.00011130198744577025));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 120.0, 180.0), 0.00012222981614916706));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 180.0, 240.0), 0.0002377005397786721));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 240.0, 300.0), 0.00026373526728965034));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 300.0, 360.0), 0.000256086036315955));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(18, 19, 360.0, 420.0), 0.00011394287938236544));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 0.0, 30.0), 0.0021116872169622083));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 30.0, 60.0), 0.0003681765715703113));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 60.0, 90.0), 0.0004137833254678062));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 90.0, 120.0), 0.00025108497234833097));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 120.0, 180.0), 0.0007576827338029722));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 180.0, 240.0), 0.0005180490039062906));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 240.0, 300.0), 0.0004944106124208977));
+ tourDurationProbabilityDistribution.add(
+ Pair.create(new GenerateSmallScaleCommercialTrafficDemand.TourStartAndDuration(19, 24, 300.0, 360.0), 0.0002278857587658224));
- return new EnumeratedDistribution<>(rng, tourDurationProbabilityDistribution);
+ tourDistribution.put(GenerateSmallScaleCommercialTrafficDemand.SmallScaleCommercialTrafficType.goodsTraffic.toString(),
+ new EnumeratedDistribution<>(rng, tourDurationProbabilityDistribution));
+ return tourDistribution;
}
@Override
diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetGenerationRates.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetGenerationRates.java
new file mode 100644
index 00000000000..5ed6ab36660
--- /dev/null
+++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/data/GetGenerationRates.java
@@ -0,0 +1,856 @@
+package org.matsim.smallScaleCommercialTrafficGeneration.data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public interface GetGenerationRates {
+ /**
+ * Sets the generation rates based on the IVV 2005
+ *
+ * @param smallScaleCommercialTrafficType used trafficType (freight or business traffic)
+ * @param generationType start or stop rates
+ */
+ static Map> setGenerationRates(String smallScaleCommercialTrafficType,
+ String generationType) {
+
+ Map> generationRates = new HashMap<>();
+ Map ratesPerPurpose1 = new HashMap<>();
+ Map ratesPerPurpose2 = new HashMap<>();
+ Map ratesPerPurpose3 = new HashMap<>();
+ Map ratesPerPurpose4 = new HashMap<>();
+ Map ratesPerPurpose5 = new HashMap<>();
+ Map ratesPerPurpose6 = new HashMap<>();
+ if (smallScaleCommercialTrafficType.equals("commercialPersonTraffic")) {
+ if (generationType.equals("start")) {
+ ratesPerPurpose1.put("Inhabitants", 0.0);
+ ratesPerPurpose1.put("Employee", 0.0);
+ ratesPerPurpose1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1.put("Employee Construction", 0.0);
+ ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.059);
+ ratesPerPurpose1.put("Employee Retail", 0.0);
+ ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2.put("Inhabitants", 0.0);
+ ratesPerPurpose2.put("Employee", 0.029);
+ ratesPerPurpose2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2.put("Employee Construction", 0.0);
+ ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.045);
+ ratesPerPurpose2.put("Employee Retail", 0.0);
+ ratesPerPurpose2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose3.put("Inhabitants", 0.0);
+ ratesPerPurpose3.put("Employee", 0.021);
+ ratesPerPurpose3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3.put("Employee Construction", 0.0);
+ ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3.put("Employee Retail", 0.0192);
+ ratesPerPurpose3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.184);
+
+ ratesPerPurpose4.put("Inhabitants", 0.0);
+ ratesPerPurpose4.put("Employee", 0.021);
+ ratesPerPurpose4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4.put("Employee Construction", 0.0);
+ ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4.put("Employee Retail", 0.0);
+ ratesPerPurpose4.put("Employee Traffic/Parcels", 0.203);
+ ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5.put("Inhabitants", 0.0);
+ ratesPerPurpose5.put("Employee", 0.03);
+ ratesPerPurpose5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5.put("Employee Construction", 0.29);
+ ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5.put("Employee Retail", 0.0);
+ ratesPerPurpose5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.0);
+ } else if (generationType.equals("stop")) {
+ ratesPerPurpose1.put("Inhabitants", 0.0);
+ ratesPerPurpose1.put("Employee", 0.0);
+ ratesPerPurpose1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1.put("Employee Construction", 0.0);
+ ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.02);
+ ratesPerPurpose1.put("Employee Retail", 0.0);
+ ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2.put("Inhabitants", 0.002);
+ ratesPerPurpose2.put("Employee", 0.0);
+ ratesPerPurpose2.put("Employee Primary Sector", 0.029);
+ ratesPerPurpose2.put("Employee Construction", 0.029);
+ ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.009);
+ ratesPerPurpose2.put("Employee Retail", 0.029);
+ ratesPerPurpose2.put("Employee Traffic/Parcels", 0.039);
+ ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.029);
+
+ ratesPerPurpose3.put("Inhabitants", 0.025);
+ ratesPerPurpose3.put("Employee", 0.0);
+ ratesPerPurpose3.put("Employee Primary Sector", 0.0168);
+ ratesPerPurpose3.put("Employee Construction", 0.168);
+ ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0168);
+ ratesPerPurpose3.put("Employee Retail", 0.0168);
+ ratesPerPurpose3.put("Employee Traffic/Parcels", 0.097);
+ ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.168);
+
+ ratesPerPurpose4.put("Inhabitants", 0.002);
+ ratesPerPurpose4.put("Employee", 0.0);
+ ratesPerPurpose4.put("Employee Primary Sector", 0.025);
+ ratesPerPurpose4.put("Employee Construction", 0.025);
+ ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.025);
+ ratesPerPurpose4.put("Employee Retail", 0.025);
+ ratesPerPurpose4.put("Employee Traffic/Parcels", 0.075);
+ ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.025);
+
+ ratesPerPurpose5.put("Inhabitants", 0.004);
+ ratesPerPurpose5.put("Employee", 0.0);
+ ratesPerPurpose5.put("Employee Primary Sector", 0.015);
+ ratesPerPurpose5.put("Employee Construction", 0.002);
+ ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.015);
+ ratesPerPurpose5.put("Employee Retail", 0.015);
+ ratesPerPurpose5.put("Employee Traffic/Parcels", 0.02);
+ ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.015);
+
+ }
+ } else if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
+ if (generationType.equals("start")) {
+ ratesPerPurpose1.put("Inhabitants", 0.0);
+ ratesPerPurpose1.put("Employee", 0.0);
+ ratesPerPurpose1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1.put("Employee Construction", 0.0);
+ ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.023);
+ ratesPerPurpose1.put("Employee Retail", 0.0);
+ ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2.put("Inhabitants", 0.0);
+ ratesPerPurpose2.put("Employee", 0.002);
+ ratesPerPurpose2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2.put("Employee Construction", 0.0);
+ ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.049);
+ ratesPerPurpose2.put("Employee Retail", 0.0);
+ ratesPerPurpose2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose3.put("Inhabitants", 0.0);
+ ratesPerPurpose3.put("Employee", 0.002);
+ ratesPerPurpose3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3.put("Employee Construction", 0.0);
+ ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3.put("Employee Retail", 0.139);
+ ratesPerPurpose3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.059);
+
+ ratesPerPurpose4.put("Inhabitants", 0.0);
+ ratesPerPurpose4.put("Employee", 0.002);
+ ratesPerPurpose4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4.put("Employee Construction", 0.0);
+ ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4.put("Employee Retail", 0.0);
+ ratesPerPurpose4.put("Employee Traffic/Parcels", 0.333);
+ ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5.put("Inhabitants", 0.0);
+ ratesPerPurpose5.put("Employee", 0.002);
+ ratesPerPurpose5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5.put("Employee Construction", 0.220);
+ ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5.put("Employee Retail", 0.0);
+ ratesPerPurpose5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6.put("Inhabitants", 0.009);
+ ratesPerPurpose6.put("Employee", 0.0);
+ ratesPerPurpose6.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6.put("Employee Construction", 0.0);
+ ratesPerPurpose6.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6.put("Employee Retail", 0.0);
+ ratesPerPurpose6.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6.put("Employee Tertiary Sector Rest", 0.0);
+
+ } else if (generationType.equals("stop")) {
+ ratesPerPurpose1.put("Inhabitants", 0.0);
+ ratesPerPurpose1.put("Employee", 0.0);
+ ratesPerPurpose1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1.put("Employee Construction", 0.0);
+ ratesPerPurpose1.put("Employee Secondary Sector Rest", 0.031);
+ ratesPerPurpose1.put("Employee Retail", 0.0);
+ ratesPerPurpose1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2.put("Inhabitants", 0.001);
+ ratesPerPurpose2.put("Employee", 0.0);
+ ratesPerPurpose2.put("Employee Primary Sector", 0.001);
+ ratesPerPurpose2.put("Employee Construction", 0.01);
+ ratesPerPurpose2.put("Employee Secondary Sector Rest", 0.011);
+ ratesPerPurpose2.put("Employee Retail", 0.021);
+ ratesPerPurpose2.put("Employee Traffic/Parcels", 0.001);
+ ratesPerPurpose2.put("Employee Tertiary Sector Rest", 0.001);
+
+ ratesPerPurpose3.put("Inhabitants", 0.009);
+ ratesPerPurpose3.put("Employee", 0.0);
+ ratesPerPurpose3.put("Employee Primary Sector", 0.02);
+ ratesPerPurpose3.put("Employee Construction", 0.005);
+ ratesPerPurpose3.put("Employee Secondary Sector Rest", 0.029);
+ ratesPerPurpose3.put("Employee Retail", 0.055);
+ ratesPerPurpose3.put("Employee Traffic/Parcels", 0.02);
+ ratesPerPurpose3.put("Employee Tertiary Sector Rest", 0.02);
+
+ ratesPerPurpose4.put("Inhabitants", 0.014);
+ ratesPerPurpose4.put("Employee", 0.0);
+ ratesPerPurpose4.put("Employee Primary Sector", 0.02);
+ ratesPerPurpose4.put("Employee Construction", 0.002);
+ ratesPerPurpose4.put("Employee Secondary Sector Rest", 0.11);
+ ratesPerPurpose4.put("Employee Retail", 0.154);
+ ratesPerPurpose4.put("Employee Traffic/Parcels", 0.02);
+ ratesPerPurpose4.put("Employee Tertiary Sector Rest", 0.02);
+
+ ratesPerPurpose5.put("Inhabitants", 0.002);
+ ratesPerPurpose5.put("Employee", 0.0);
+ ratesPerPurpose5.put("Employee Primary Sector", 0.005);
+ ratesPerPurpose5.put("Employee Construction", 0.002);
+ ratesPerPurpose5.put("Employee Secondary Sector Rest", 0.01);
+ ratesPerPurpose5.put("Employee Retail", 0.01);
+ ratesPerPurpose5.put("Employee Traffic/Parcels", 0.005);
+ ratesPerPurpose5.put("Employee Tertiary Sector Rest", 0.005);
+
+ ratesPerPurpose6.put("Inhabitants", 0.002);
+ ratesPerPurpose6.put("Employee", 0.0);
+ ratesPerPurpose6.put("Employee Primary Sector", 0.005);
+ ratesPerPurpose6.put("Employee Construction", 0.002);
+ ratesPerPurpose6.put("Employee Secondary Sector Rest", 0.01);
+ ratesPerPurpose6.put("Employee Retail", 0.01);
+ ratesPerPurpose6.put("Employee Traffic/Parcels", 0.005);
+ ratesPerPurpose6.put("Employee Tertiary Sector Rest", 0.005);
+ }
+ generationRates.put(6, ratesPerPurpose6);
+ }
+ generationRates.put(1, ratesPerPurpose1);
+ generationRates.put(2, ratesPerPurpose2);
+ generationRates.put(3, ratesPerPurpose3);
+ generationRates.put(4, ratesPerPurpose4);
+ generationRates.put(5, ratesPerPurpose5);
+ return generationRates;
+ }
+
+ /**
+ * Sets the commitment rates based on the IVV 2005 for the goodsTraffic. The
+ * commitment rate for the commercialPersonTraffic is 1, because mode choice will be
+ * done in MATSim.
+ *
+ * @param smallScaleCommercialTrafficType used trafficType (freight or business traffic)
+ * @param commitmentType start or stop parameter
+ */
+ static Map> setCommitmentRates(String smallScaleCommercialTrafficType,
+ String commitmentType) {
+ Map> commitmentRates = new HashMap<>();
+
+ if (smallScaleCommercialTrafficType.equals("goodsTraffic")) {
+
+ // the first number is the purpose; second number the vehicle type
+ Map ratesPerPurpose1_1 = new HashMap<>();
+ Map ratesPerPurpose1_2 = new HashMap<>();
+ Map ratesPerPurpose1_3 = new HashMap<>();
+ Map ratesPerPurpose1_4 = new HashMap<>();
+ Map ratesPerPurpose1_5 = new HashMap<>();
+ Map ratesPerPurpose2_1 = new HashMap<>();
+ Map ratesPerPurpose2_2 = new HashMap<>();
+ Map ratesPerPurpose2_3 = new HashMap<>();
+ Map ratesPerPurpose2_4 = new HashMap<>();
+ Map ratesPerPurpose2_5 = new HashMap<>();
+ Map ratesPerPurpose3_1 = new HashMap<>();
+ Map ratesPerPurpose3_2 = new HashMap<>();
+ Map ratesPerPurpose3_3 = new HashMap<>();
+ Map ratesPerPurpose3_4 = new HashMap<>();
+ Map ratesPerPurpose3_5 = new HashMap<>();
+ Map ratesPerPurpose4_1 = new HashMap<>();
+ Map ratesPerPurpose4_2 = new HashMap<>();
+ Map ratesPerPurpose4_3 = new HashMap<>();
+ Map ratesPerPurpose4_4 = new HashMap<>();
+ Map ratesPerPurpose4_5 = new HashMap<>();
+ Map ratesPerPurpose5_1 = new HashMap<>();
+ Map ratesPerPurpose5_2 = new HashMap<>();
+ Map ratesPerPurpose5_3 = new HashMap<>();
+ Map ratesPerPurpose5_4 = new HashMap<>();
+ Map ratesPerPurpose5_5 = new HashMap<>();
+ Map ratesPerPurpose6_1 = new HashMap<>();
+ Map ratesPerPurpose6_2 = new HashMap<>();
+ Map ratesPerPurpose6_3 = new HashMap<>();
+ Map ratesPerPurpose6_4 = new HashMap<>();
+ Map ratesPerPurpose6_5 = new HashMap<>();
+ if (commitmentType.equals("start")) {
+ ratesPerPurpose1_1.put("Inhabitants", 0.0);
+ ratesPerPurpose1_1.put("Employee", 0.8);
+ ratesPerPurpose1_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_1.put("Employee Construction", 0.0);
+ ratesPerPurpose1_1.put("Employee Secondary Sector Rest", 0.44);
+ ratesPerPurpose1_1.put("Employee Retail", 0.0);
+ ratesPerPurpose1_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_2.put("Inhabitants", 0.0);
+ ratesPerPurpose1_2.put("Employee", 0.1);
+ ratesPerPurpose1_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_2.put("Employee Construction", 0.0);
+ ratesPerPurpose1_2.put("Employee Secondary Sector Rest", 0.11);
+ ratesPerPurpose1_2.put("Employee Retail", 0.0);
+ ratesPerPurpose1_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_3.put("Inhabitants", 0.0);
+ ratesPerPurpose1_3.put("Employee", 0.1);
+ ratesPerPurpose1_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_3.put("Employee Construction", 0.0);
+ ratesPerPurpose1_3.put("Employee Secondary Sector Rest", 0.22);
+ ratesPerPurpose1_3.put("Employee Retail", 0.0);
+ ratesPerPurpose1_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_3.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_4.put("Inhabitants", 0.0);
+ ratesPerPurpose1_4.put("Employee", 0.0);
+ ratesPerPurpose1_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_4.put("Employee Construction", 0.0);
+ ratesPerPurpose1_4.put("Employee Secondary Sector Rest", 0.06);
+ ratesPerPurpose1_4.put("Employee Retail", 0.0);
+ ratesPerPurpose1_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_5.put("Inhabitants", 0.0);
+ ratesPerPurpose1_5.put("Employee", 0.0);
+ ratesPerPurpose1_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_5.put("Employee Construction", 0.0);
+ ratesPerPurpose1_5.put("Employee Secondary Sector Rest", 0.16);
+ ratesPerPurpose1_5.put("Employee Retail", 0.0);
+ ratesPerPurpose1_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_1.put("Inhabitants", 0.0);
+ ratesPerPurpose2_1.put("Employee", 0.8);
+ ratesPerPurpose2_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2_1.put("Employee Construction", 0.0);
+ ratesPerPurpose2_1.put("Employee Secondary Sector Rest", 0.44);
+ ratesPerPurpose2_1.put("Employee Retail", 0.0);
+ ratesPerPurpose2_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_2.put("Inhabitants", 0.0);
+ ratesPerPurpose2_2.put("Employee", 0.1);
+ ratesPerPurpose2_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2_2.put("Employee Construction", 0.0);
+ ratesPerPurpose2_2.put("Employee Secondary Sector Rest", 0.11);
+ ratesPerPurpose2_2.put("Employee Retail", 0.0);
+ ratesPerPurpose2_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_3.put("Inhabitants", 0.0);
+ ratesPerPurpose2_3.put("Employee", 0.1);
+ ratesPerPurpose2_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2_3.put("Employee Construction", 0.0);
+ ratesPerPurpose2_3.put("Employee Secondary Sector Rest", 0.22);
+ ratesPerPurpose2_3.put("Employee Retail", 0.0);
+ ratesPerPurpose2_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_3.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_4.put("Inhabitants", 0.0);
+ ratesPerPurpose2_4.put("Employee", 0.0);
+ ratesPerPurpose2_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2_4.put("Employee Construction", 0.0);
+ ratesPerPurpose2_4.put("Employee Secondary Sector Rest", 0.06);
+ ratesPerPurpose2_4.put("Employee Retail", 0.0);
+ ratesPerPurpose2_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_5.put("Inhabitants", 0.0);
+ ratesPerPurpose2_5.put("Employee", 0.0);
+ ratesPerPurpose2_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose2_5.put("Employee Construction", 0.0);
+ ratesPerPurpose2_5.put("Employee Secondary Sector Rest", 0.16);
+ ratesPerPurpose2_5.put("Employee Retail", 0.0);
+ ratesPerPurpose2_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose3_1.put("Inhabitants", 0.0);
+ ratesPerPurpose3_1.put("Employee", 0.8);
+ ratesPerPurpose3_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3_1.put("Employee Construction", 0.0);
+ ratesPerPurpose3_1.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3_1.put("Employee Retail", 0.46);
+ ratesPerPurpose3_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3_1.put("Employee Tertiary Sector Rest", 0.54);
+
+ ratesPerPurpose3_2.put("Inhabitants", 0.0);
+ ratesPerPurpose3_2.put("Employee", 0.1);
+ ratesPerPurpose3_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3_2.put("Employee Construction", 0.0);
+ ratesPerPurpose3_2.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3_2.put("Employee Retail", 0.1);
+ ratesPerPurpose3_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3_2.put("Employee Tertiary Sector Rest", 0.1);
+
+ ratesPerPurpose3_3.put("Inhabitants", 0.0);
+ ratesPerPurpose3_3.put("Employee", 0.1);
+ ratesPerPurpose3_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3_3.put("Employee Construction", 0.0);
+ ratesPerPurpose3_3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3_3.put("Employee Retail", 0.23);
+ ratesPerPurpose3_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3_3.put("Employee Tertiary Sector Rest", 0.2);
+
+ ratesPerPurpose3_4.put("Inhabitants", 0.0);
+ ratesPerPurpose3_4.put("Employee", 0.0);
+ ratesPerPurpose3_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3_4.put("Employee Construction", 0.0);
+ ratesPerPurpose3_4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3_4.put("Employee Retail", 0.06);
+ ratesPerPurpose3_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3_4.put("Employee Tertiary Sector Rest", 0.02);
+
+ ratesPerPurpose3_5.put("Inhabitants", 0.0);
+ ratesPerPurpose3_5.put("Employee", 0.0);
+ ratesPerPurpose3_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose3_5.put("Employee Construction", 0.0);
+ ratesPerPurpose3_5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose3_5.put("Employee Retail", 0.15);
+ ratesPerPurpose3_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose3_5.put("Employee Tertiary Sector Rest", 0.14);
+
+ ratesPerPurpose4_1.put("Inhabitants", 0.009);
+ ratesPerPurpose4_1.put("Employee", 0.8);
+ ratesPerPurpose4_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4_1.put("Employee Construction", 0.0);
+ ratesPerPurpose4_1.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4_1.put("Employee Retail", 0.0);
+ ratesPerPurpose4_1.put("Employee Traffic/Parcels", 0.18);
+ ratesPerPurpose4_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose4_2.put("Inhabitants", 0.0);
+ ratesPerPurpose4_2.put("Employee", 0.1);
+ ratesPerPurpose4_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4_2.put("Employee Construction", 0.0);
+ ratesPerPurpose4_2.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4_2.put("Employee Retail", 0.0);
+ ratesPerPurpose4_2.put("Employee Traffic/Parcels", 0.06);
+ ratesPerPurpose4_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose4_3.put("Inhabitants", 0.0);
+ ratesPerPurpose4_3.put("Employee", 0.1);
+ ratesPerPurpose4_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4_3.put("Employee Construction", 0.0);
+ ratesPerPurpose4_3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4_3.put("Employee Retail", 0.0);
+ ratesPerPurpose4_3.put("Employee Traffic/Parcels", 0.25);
+ ratesPerPurpose4_3.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose4_4.put("Inhabitants", 0.0);
+ ratesPerPurpose4_4.put("Employee", 0.0);
+ ratesPerPurpose4_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4_4.put("Employee Construction", 0.0);
+ ratesPerPurpose4_4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4_4.put("Employee Retail", 0.0);
+ ratesPerPurpose4_4.put("Employee Traffic/Parcels", 0.08);
+ ratesPerPurpose4_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose4_5.put("Inhabitants", 0.0);
+ ratesPerPurpose4_5.put("Employee", 0.0);
+ ratesPerPurpose4_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose4_5.put("Employee Construction", 0.0);
+ ratesPerPurpose4_5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose4_5.put("Employee Retail", 0.0);
+ ratesPerPurpose4_5.put("Employee Traffic/Parcels", 0.43);
+ ratesPerPurpose4_5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5_1.put("Inhabitants", 0.0);
+ ratesPerPurpose5_1.put("Employee", 0.8);
+ ratesPerPurpose5_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5_1.put("Employee Construction", 0.25);
+ ratesPerPurpose5_1.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5_1.put("Employee Retail", 0.0);
+ ratesPerPurpose5_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5_2.put("Inhabitants", 0.0);
+ ratesPerPurpose5_2.put("Employee", 0.1);
+ ratesPerPurpose5_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5_2.put("Employee Construction", 0.2);
+ ratesPerPurpose5_2.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5_2.put("Employee Retail", 0.0);
+ ratesPerPurpose5_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5_3.put("Inhabitants", 0.0);
+ ratesPerPurpose5_3.put("Employee", 0.1);
+ ratesPerPurpose5_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5_3.put("Employee Construction", 0.25);
+ ratesPerPurpose5_3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5_3.put("Employee Retail", 0.139);
+ ratesPerPurpose5_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_3.put("Employee Tertiary Sector Rest", 0.059);
+
+ ratesPerPurpose5_4.put("Inhabitants", 0.0);
+ ratesPerPurpose5_4.put("Employee", 0.0);
+ ratesPerPurpose5_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5_4.put("Employee Construction", 0.02);
+ ratesPerPurpose5_4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5_4.put("Employee Retail", 0.0);
+ ratesPerPurpose5_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose5_5.put("Inhabitants", 0.0);
+ ratesPerPurpose5_5.put("Employee", 0.0);
+ ratesPerPurpose5_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose5_5.put("Employee Construction", 0.28);
+ ratesPerPurpose5_5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose5_5.put("Employee Retail", 0.0);
+ ratesPerPurpose5_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_1.put("Inhabitants", 0.0);
+ ratesPerPurpose6_1.put("Employee", 0.0);
+ ratesPerPurpose6_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_1.put("Employee Construction", 0.0);
+ ratesPerPurpose6_1.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_1.put("Employee Retail", 0.0);
+ ratesPerPurpose6_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_2.put("Inhabitants", 0.29);
+ ratesPerPurpose6_2.put("Employee", 0.0);
+ ratesPerPurpose6_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_2.put("Employee Construction", 0.0);
+ ratesPerPurpose6_2.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_2.put("Employee Retail", 0.0);
+ ratesPerPurpose6_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_3.put("Inhabitants", 0.63);
+ ratesPerPurpose6_3.put("Employee", 0.0);
+ ratesPerPurpose6_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_3.put("Employee Construction", 0.0);
+ ratesPerPurpose6_3.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_3.put("Employee Retail", 0.0);
+ ratesPerPurpose6_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_3.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_4.put("Inhabitants", 0.07);
+ ratesPerPurpose6_4.put("Employee", 0.0);
+ ratesPerPurpose6_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_4.put("Employee Construction", 0.0);
+ ratesPerPurpose6_4.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_4.put("Employee Retail", 0.0);
+ ratesPerPurpose6_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_5.put("Inhabitants", 0.001);
+ ratesPerPurpose6_5.put("Employee", 0.0);
+ ratesPerPurpose6_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_5.put("Employee Construction", 0.2);
+ ratesPerPurpose6_5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_5.put("Employee Retail", 0.0);
+ ratesPerPurpose6_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_5.put("Employee Tertiary Sector Rest", 0.0);
+ } else if (commitmentType.equals("stop")) {
+ ratesPerPurpose1_1.put("Inhabitants", 0.0);
+ ratesPerPurpose1_1.put("Employee", 0.0);
+ ratesPerPurpose1_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_1.put("Employee Construction", 0.0);
+ ratesPerPurpose1_1.put("Employee Secondary Sector Rest", 0.35);
+ ratesPerPurpose1_1.put("Employee Retail", 0.0);
+ ratesPerPurpose1_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_2.put("Inhabitants", 0.0);
+ ratesPerPurpose1_2.put("Employee", 0.0);
+ ratesPerPurpose1_2.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_2.put("Employee Construction", 0.0);
+ ratesPerPurpose1_2.put("Employee Secondary Sector Rest", 0.1);
+ ratesPerPurpose1_2.put("Employee Retail", 0.0);
+ ratesPerPurpose1_2.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_2.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_3.put("Inhabitants", 0.0);
+ ratesPerPurpose1_3.put("Employee", 0.0);
+ ratesPerPurpose1_3.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_3.put("Employee Construction", 0.0);
+ ratesPerPurpose1_3.put("Employee Secondary Sector Rest", 0.27);
+ ratesPerPurpose1_3.put("Employee Retail", 0.0);
+ ratesPerPurpose1_3.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_3.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_4.put("Inhabitants", 0.0);
+ ratesPerPurpose1_4.put("Employee", 0.0);
+ ratesPerPurpose1_4.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_4.put("Employee Construction", 0.0);
+ ratesPerPurpose1_4.put("Employee Secondary Sector Rest", 0.01);
+ ratesPerPurpose1_4.put("Employee Retail", 0.0);
+ ratesPerPurpose1_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_4.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose1_5.put("Inhabitants", 0.0);
+ ratesPerPurpose1_5.put("Employee", 0.0);
+ ratesPerPurpose1_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose1_5.put("Employee Construction", 0.0);
+ ratesPerPurpose1_5.put("Employee Secondary Sector Rest", 0.27);
+ ratesPerPurpose1_5.put("Employee Retail", 0.0);
+ ratesPerPurpose1_5.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose1_5.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose2_1.put("Inhabitants", 0.55);
+ ratesPerPurpose2_1.put("Employee", 0.0);
+ ratesPerPurpose2_1.put("Employee Primary Sector", 0.46);
+ ratesPerPurpose2_1.put("Employee Construction", 0.46);
+ ratesPerPurpose2_1.put("Employee Secondary Sector Rest", 0.46);
+ ratesPerPurpose2_1.put("Employee Retail", 0.46);
+ ratesPerPurpose2_1.put("Employee Traffic/Parcels", 0.34);
+ ratesPerPurpose2_1.put("Employee Tertiary Sector Rest", 0.46);
+
+ ratesPerPurpose2_2.put("Inhabitants", 0.09);
+ ratesPerPurpose2_2.put("Employee", 0.0);
+ ratesPerPurpose2_2.put("Employee Primary Sector", 0.09);
+ ratesPerPurpose2_2.put("Employee Construction", 0.09);
+ ratesPerPurpose2_2.put("Employee Secondary Sector Rest", 0.09);
+ ratesPerPurpose2_2.put("Employee Retail", 0.09);
+ ratesPerPurpose2_2.put("Employee Traffic/Parcels", 0.1);
+ ratesPerPurpose2_2.put("Employee Tertiary Sector Rest", 0.09);
+
+ ratesPerPurpose2_3.put("Inhabitants", 0.21);
+ ratesPerPurpose2_3.put("Employee", 0.0);
+ ratesPerPurpose2_3.put("Employee Primary Sector", 0.22);
+ ratesPerPurpose2_3.put("Employee Construction", 0.22);
+ ratesPerPurpose2_3.put("Employee Secondary Sector Rest", 0.22);
+ ratesPerPurpose2_3.put("Employee Retail", 0.22);
+ ratesPerPurpose2_3.put("Employee Traffic/Parcels", 0.29);
+ ratesPerPurpose2_3.put("Employee Tertiary Sector Rest", 0.22);
+
+ ratesPerPurpose2_4.put("Inhabitants", 0.06);
+ ratesPerPurpose2_4.put("Employee", 0.0);
+ ratesPerPurpose2_4.put("Employee Primary Sector", 0.06);
+ ratesPerPurpose2_4.put("Employee Construction", 0.06);
+ ratesPerPurpose2_4.put("Employee Secondary Sector Rest", 0.06);
+ ratesPerPurpose2_4.put("Employee Retail", 0.06);
+ ratesPerPurpose2_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose2_4.put("Employee Tertiary Sector Rest", 0.06);
+
+ ratesPerPurpose2_5.put("Inhabitants", 0.1);
+ ratesPerPurpose2_5.put("Employee", 0.0);
+ ratesPerPurpose2_5.put("Employee Primary Sector", 0.17);
+ ratesPerPurpose2_5.put("Employee Construction", 0.17);
+ ratesPerPurpose2_5.put("Employee Secondary Sector Rest", 0.17);
+ ratesPerPurpose2_5.put("Employee Retail", 0.17);
+ ratesPerPurpose2_5.put("Employee Traffic/Parcels", 0.27);
+ ratesPerPurpose2_5.put("Employee Tertiary Sector Rest", 0.17);
+
+ ratesPerPurpose3_1.put("Inhabitants", 0.489);
+ ratesPerPurpose3_1.put("Employee", 0.0);
+ ratesPerPurpose3_1.put("Employee Primary Sector", 0.538);
+ ratesPerPurpose3_1.put("Employee Construction", 0.538);
+ ratesPerPurpose3_1.put("Employee Secondary Sector Rest", 0.538);
+ ratesPerPurpose3_1.put("Employee Retail", 0.538);
+ ratesPerPurpose3_1.put("Employee Traffic/Parcels", 0.59);
+ ratesPerPurpose3_1.put("Employee Tertiary Sector Rest", 0.538);
+
+ ratesPerPurpose3_2.put("Inhabitants", 0.106);
+ ratesPerPurpose3_2.put("Employee", 0.0);
+ ratesPerPurpose3_2.put("Employee Primary Sector", 0.092);
+ ratesPerPurpose3_2.put("Employee Construction", 0.092);
+ ratesPerPurpose3_2.put("Employee Secondary Sector Rest", 0.092);
+ ratesPerPurpose3_2.put("Employee Retail", 0.092);
+ ratesPerPurpose3_2.put("Employee Traffic/Parcels", 0.03);
+ ratesPerPurpose3_2.put("Employee Tertiary Sector Rest", 0.092);
+
+ ratesPerPurpose3_3.put("Inhabitants", 0.26);
+ ratesPerPurpose3_3.put("Employee", 0.0);
+ ratesPerPurpose3_3.put("Employee Primary Sector", 0.19);
+ ratesPerPurpose3_3.put("Employee Construction", 0.19);
+ ratesPerPurpose3_3.put("Employee Secondary Sector Rest", 0.19);
+ ratesPerPurpose3_3.put("Employee Retail", 0.19);
+ ratesPerPurpose3_3.put("Employee Traffic/Parcels", 0.102);
+ ratesPerPurpose3_3.put("Employee Tertiary Sector Rest", 0.19);
+
+ ratesPerPurpose3_4.put("Inhabitants", 0.033);
+ ratesPerPurpose3_4.put("Employee", 0.0);
+ ratesPerPurpose3_4.put("Employee Primary Sector", 0.032);
+ ratesPerPurpose3_4.put("Employee Construction", 0.032);
+ ratesPerPurpose3_4.put("Employee Secondary Sector Rest", 0.032);
+ ratesPerPurpose3_4.put("Employee Retail", 0.032);
+ ratesPerPurpose3_4.put("Employee Traffic/Parcels", 0.058);
+ ratesPerPurpose3_4.put("Employee Tertiary Sector Rest", 0.032);
+
+ ratesPerPurpose3_5.put("Inhabitants", 0.112);
+ ratesPerPurpose3_5.put("Employee", 0.0);
+ ratesPerPurpose3_5.put("Employee Primary Sector", 0.147);
+ ratesPerPurpose3_5.put("Employee Construction", 0.147);
+ ratesPerPurpose3_5.put("Employee Secondary Sector Rest", 0.147);
+ ratesPerPurpose3_5.put("Employee Retail", 0.147);
+ ratesPerPurpose3_5.put("Employee Traffic/Parcels", 0.219);
+ ratesPerPurpose3_5.put("Employee Tertiary Sector Rest", 0.147);
+
+ ratesPerPurpose4_1.put("Inhabitants", 0.37);
+ ratesPerPurpose4_1.put("Employee", 0.0);
+ ratesPerPurpose4_1.put("Employee Primary Sector", 0.14);
+ ratesPerPurpose4_1.put("Employee Construction", 0.14);
+ ratesPerPurpose4_1.put("Employee Secondary Sector Rest", 0.14);
+ ratesPerPurpose4_1.put("Employee Retail", 0.14);
+ ratesPerPurpose4_1.put("Employee Traffic/Parcels", 0.06);
+ ratesPerPurpose4_1.put("Employee Tertiary Sector Rest", 0.14);
+
+ ratesPerPurpose4_2.put("Inhabitants", 0.05);
+ ratesPerPurpose4_2.put("Employee", 0.0);
+ ratesPerPurpose4_2.put("Employee Primary Sector", 0.07);
+ ratesPerPurpose4_2.put("Employee Construction", 0.07);
+ ratesPerPurpose4_2.put("Employee Secondary Sector Rest", 0.07);
+ ratesPerPurpose4_2.put("Employee Retail", 0.07);
+ ratesPerPurpose4_2.put("Employee Traffic/Parcels", 0.07);
+ ratesPerPurpose4_2.put("Employee Tertiary Sector Rest", 0.07);
+
+ ratesPerPurpose4_3.put("Inhabitants", 0.4);
+ ratesPerPurpose4_3.put("Employee", 0.0);
+ ratesPerPurpose4_3.put("Employee Primary Sector", 0.21);
+ ratesPerPurpose4_3.put("Employee Construction", 0.21);
+ ratesPerPurpose4_3.put("Employee Secondary Sector Rest", 0.21);
+ ratesPerPurpose4_3.put("Employee Retail", 0.21);
+ ratesPerPurpose4_3.put("Employee Traffic/Parcels", 0.19);
+ ratesPerPurpose4_3.put("Employee Tertiary Sector Rest", 0.21);
+
+ ratesPerPurpose4_4.put("Inhabitants", 0.13);
+ ratesPerPurpose4_4.put("Employee", 0.0);
+ ratesPerPurpose4_4.put("Employee Primary Sector", 0.05);
+ ratesPerPurpose4_4.put("Employee Construction", 0.05);
+ ratesPerPurpose4_4.put("Employee Secondary Sector Rest", 0.05);
+ ratesPerPurpose4_4.put("Employee Retail", 0.05);
+ ratesPerPurpose4_4.put("Employee Traffic/Parcels", 0.08);
+ ratesPerPurpose4_4.put("Employee Tertiary Sector Rest", 0.05);
+
+ ratesPerPurpose4_5.put("Inhabitants", 0.05);
+ ratesPerPurpose4_5.put("Employee", 0.0);
+ ratesPerPurpose4_5.put("Employee Primary Sector", 0.54);
+ ratesPerPurpose4_5.put("Employee Construction", 0.54);
+ ratesPerPurpose4_5.put("Employee Secondary Sector Rest", 0.54);
+ ratesPerPurpose4_5.put("Employee Retail", 0.54);
+ ratesPerPurpose4_5.put("Employee Traffic/Parcels", 0.61);
+ ratesPerPurpose4_5.put("Employee Tertiary Sector Rest", 0.54);
+
+ ratesPerPurpose5_1.put("Inhabitants", 0.16);
+ ratesPerPurpose5_1.put("Employee", 0.0);
+ ratesPerPurpose5_1.put("Employee Primary Sector", 0.4);
+ ratesPerPurpose5_1.put("Employee Construction", 0.4);
+ ratesPerPurpose5_1.put("Employee Secondary Sector Rest", 0.4);
+ ratesPerPurpose5_1.put("Employee Retail", 0.4);
+ ratesPerPurpose5_1.put("Employee Traffic/Parcels", 0.14);
+ ratesPerPurpose5_1.put("Employee Tertiary Sector Rest", 0.4);
+
+ ratesPerPurpose5_2.put("Inhabitants", 0.55);
+ ratesPerPurpose5_2.put("Employee", 0.11);
+ ratesPerPurpose5_2.put("Employee Primary Sector", 0.11);
+ ratesPerPurpose5_2.put("Employee Construction", 0.11);
+ ratesPerPurpose5_2.put("Employee Secondary Sector Rest", 0.11);
+ ratesPerPurpose5_2.put("Employee Retail", 0.11);
+ ratesPerPurpose5_2.put("Employee Traffic/Parcels", 0.06);
+ ratesPerPurpose5_2.put("Employee Tertiary Sector Rest", 0.11);
+
+ ratesPerPurpose5_3.put("Inhabitants", 0.22);
+ ratesPerPurpose5_3.put("Employee", 0.0);
+ ratesPerPurpose5_3.put("Employee Primary Sector", 0.17);
+ ratesPerPurpose5_3.put("Employee Construction", 0.17);
+ ratesPerPurpose5_3.put("Employee Secondary Sector Rest", 0.17);
+ ratesPerPurpose5_3.put("Employee Retail", 0.17);
+ ratesPerPurpose5_3.put("Employee Traffic/Parcels", 0.21);
+ ratesPerPurpose5_3.put("Employee Tertiary Sector Rest", 0.17);
+
+ ratesPerPurpose5_4.put("Inhabitants", 0.0);
+ ratesPerPurpose5_4.put("Employee", 0.0);
+ ratesPerPurpose5_4.put("Employee Primary Sector", 0.04);
+ ratesPerPurpose5_4.put("Employee Construction", 0.04);
+ ratesPerPurpose5_4.put("Employee Secondary Sector Rest", 0.04);
+ ratesPerPurpose5_4.put("Employee Retail", 0.04);
+ ratesPerPurpose5_4.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose5_4.put("Employee Tertiary Sector Rest", 0.04);
+
+ ratesPerPurpose5_5.put("Inhabitants", 0.06);
+ ratesPerPurpose5_5.put("Employee", 0.0);
+ ratesPerPurpose5_5.put("Employee Primary Sector", 0.28);
+ ratesPerPurpose5_5.put("Employee Construction", 0.28);
+ ratesPerPurpose5_5.put("Employee Secondary Sector Rest", 0.28);
+ ratesPerPurpose5_5.put("Employee Retail", 0.28);
+ ratesPerPurpose5_5.put("Employee Traffic/Parcels", 0.58);
+ ratesPerPurpose5_5.put("Employee Tertiary Sector Rest", 0.28);
+
+ ratesPerPurpose6_1.put("Inhabitants", 0.0);
+ ratesPerPurpose6_1.put("Employee", 0.0);
+ ratesPerPurpose6_1.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_1.put("Employee Construction", 0.0);
+ ratesPerPurpose6_1.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_1.put("Employee Retail", 0.0);
+ ratesPerPurpose6_1.put("Employee Traffic/Parcels", 0.0);
+ ratesPerPurpose6_1.put("Employee Tertiary Sector Rest", 0.0);
+
+ ratesPerPurpose6_2.put("Inhabitants", 0.85);
+ ratesPerPurpose6_2.put("Employee", 0.0);
+ ratesPerPurpose6_2.put("Employee Primary Sector", 0.21);
+ ratesPerPurpose6_2.put("Employee Construction", 0.21);
+ ratesPerPurpose6_2.put("Employee Secondary Sector Rest", 0.21);
+ ratesPerPurpose6_2.put("Employee Retail", 0.21);
+ ratesPerPurpose6_2.put("Employee Traffic/Parcels", 0.09);
+ ratesPerPurpose6_2.put("Employee Tertiary Sector Rest", 0.21);
+
+ ratesPerPurpose6_3.put("Inhabitants", 0.15);
+ ratesPerPurpose6_3.put("Employee", 0.0);
+ ratesPerPurpose6_3.put("Employee Primary Sector", 0.58);
+ ratesPerPurpose6_3.put("Employee Construction", 0.58);
+ ratesPerPurpose6_3.put("Employee Secondary Sector Rest", 0.58);
+ ratesPerPurpose6_3.put("Employee Retail", 0.58);
+ ratesPerPurpose6_3.put("Employee Traffic/Parcels", 0.55);
+ ratesPerPurpose6_3.put("Employee Tertiary Sector Rest", 0.58);
+
+ ratesPerPurpose6_4.put("Inhabitants", 0.0);
+ ratesPerPurpose6_4.put("Employee", 0.0);
+ ratesPerPurpose6_4.put("Employee Primary Sector", 0.21);
+ ratesPerPurpose6_4.put("Employee Construction", 0.21);
+ ratesPerPurpose6_4.put("Employee Secondary Sector Rest", 0.21);
+ ratesPerPurpose6_4.put("Employee Retail", 0.21);
+ ratesPerPurpose6_4.put("Employee Traffic/Parcels", 0.25);
+ ratesPerPurpose6_4.put("Employee Tertiary Sector Rest", 0.21);
+
+ ratesPerPurpose6_5.put("Inhabitants", 0.0);
+ ratesPerPurpose6_5.put("Employee", 0.0);
+ ratesPerPurpose6_5.put("Employee Primary Sector", 0.0);
+ ratesPerPurpose6_5.put("Employee Construction", 0.0);
+ ratesPerPurpose6_5.put("Employee Secondary Sector Rest", 0.0);
+ ratesPerPurpose6_5.put("Employee Retail", 0.0);
+ ratesPerPurpose6_5.put("Employee Traffic/Parcels", 0.11);
+ ratesPerPurpose6_5.put("Employee Tertiary Sector Rest", 0.0);
+ }
+ commitmentRates.put("1_1", ratesPerPurpose1_1);
+ commitmentRates.put("1_2", ratesPerPurpose1_2);
+ commitmentRates.put("1_3", ratesPerPurpose1_3);
+ commitmentRates.put("1_4", ratesPerPurpose1_4);
+ commitmentRates.put("1_5", ratesPerPurpose1_5);
+ commitmentRates.put("2_1", ratesPerPurpose2_1);
+ commitmentRates.put("2_2", ratesPerPurpose2_2);
+ commitmentRates.put("2_3", ratesPerPurpose2_3);
+ commitmentRates.put("2_4", ratesPerPurpose2_4);
+ commitmentRates.put("2_5", ratesPerPurpose2_5);
+ commitmentRates.put("3_1", ratesPerPurpose3_1);
+ commitmentRates.put("3_2", ratesPerPurpose3_2);
+ commitmentRates.put("3_3", ratesPerPurpose3_3);
+ commitmentRates.put("3_4", ratesPerPurpose3_4);
+ commitmentRates.put("3_5", ratesPerPurpose3_5);
+ commitmentRates.put("4_1", ratesPerPurpose4_1);
+ commitmentRates.put("4_2", ratesPerPurpose4_2);
+ commitmentRates.put("4_3", ratesPerPurpose4_3);
+ commitmentRates.put("4_4", ratesPerPurpose4_4);
+ commitmentRates.put("4_5", ratesPerPurpose4_5);
+ commitmentRates.put("5_1", ratesPerPurpose5_1);
+ commitmentRates.put("5_2", ratesPerPurpose5_2);
+ commitmentRates.put("5_3", ratesPerPurpose5_3);
+ commitmentRates.put("5_4", ratesPerPurpose5_4);
+ commitmentRates.put("5_5", ratesPerPurpose5_5);
+ commitmentRates.put("6_1", ratesPerPurpose6_1);
+ commitmentRates.put("6_2", ratesPerPurpose6_2);
+ commitmentRates.put("6_3", ratesPerPurpose6_3);
+ commitmentRates.put("6_4", ratesPerPurpose6_4);
+ commitmentRates.put("6_5", ratesPerPurpose6_5);
+ }
+ return commitmentRates;
+ }
+}
diff --git a/contribs/small-scale-traffic-generation/test/input/org/matsim/smallScaleCommercialTrafficGeneration/test.output_events.xml.gz b/contribs/small-scale-traffic-generation/test/input/org/matsim/smallScaleCommercialTrafficGeneration/test.output_events.xml.gz
index 6934ebcecc0..4cac3132da0 100644
Binary files a/contribs/small-scale-traffic-generation/test/input/org/matsim/smallScaleCommercialTrafficGeneration/test.output_events.xml.gz and b/contribs/small-scale-traffic-generation/test/input/org/matsim/smallScaleCommercialTrafficGeneration/test.output_events.xml.gz differ
diff --git a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkConverter.java b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkConverter.java
index 378703db1eb..b563e1325d4 100644
--- a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkConverter.java
+++ b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkConverter.java
@@ -165,7 +165,10 @@ public void writeFeatures(SumoNetworkHandler handler, String output) {
SumoNetworkFeatureExtractor props = new SumoNetworkFeatureExtractor(handler);
try (CSVPrinter out = new CSVPrinter(IOUtils.getBufferedWriter(output), CSVFormat.DEFAULT)) {
- out.printRecord(props.getHeader());
+ List header = new ArrayList<>(props.getHeader());
+ header.addAll(handler.attributes);
+
+ out.printRecord(header);
props.print(out);
} catch (IOException e) {
diff --git a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkFeatureExtractor.java b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkFeatureExtractor.java
index ee8c9a45b87..91445ca7f33 100644
--- a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkFeatureExtractor.java
+++ b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkFeatureExtractor.java
@@ -274,6 +274,10 @@ public void print(CSVPrinter out, String linkId, SumoNetworkHandler.Edge edge) t
out.print(numConnections.getInt('r'));
out.print(numConnections.getInt('s'));
+ for (String attribute : handler.attributes) {
+ out.print(edge.attributes.getOrDefault(attribute, ""));
+ }
+
out.println();
}
diff --git a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkHandler.java b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkHandler.java
index 65de2df3a94..367be8f1827 100644
--- a/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkHandler.java
+++ b/contribs/sumo/src/main/java/org/matsim/contrib/sumo/SumoNetworkHandler.java
@@ -47,6 +47,11 @@ public class SumoNetworkHandler extends DefaultHandler {
*/
final Map types = new HashMap<>();
+ /**
+ * Attribute names that have been observed during parsing.
+ */
+ Set attributes = new LinkedHashSet<>();
+
/**
* Stores current parsed edge.
*/
@@ -257,6 +262,14 @@ public void startElement(String uri, String localName, String qName, Attributes
case "origTo":
tmpEdge.origTo = value;
break;
+ // Redundant attribute, that does not need to be stored
+ case "highway":
+ break;
+ default:
+ String attribute = attributes.getValue("key").intern();
+ this.attributes.add(attribute);
+ tmpEdge.attributes.put(attribute, value);
+ break;
}
break;
@@ -345,6 +358,8 @@ static final class Edge {
@Nullable
String origTo;
+ final Map attributes = new HashMap<>();
+
public Edge(String id, String from, String to, String type, int priority, String name, String[] shape) {
this.id = id;
this.from = from;
diff --git a/contribs/sumo/src/test/java/org/matsim/contrib/sumo/SumoNetworkConverterTest.java b/contribs/sumo/src/test/java/org/matsim/contrib/sumo/SumoNetworkConverterTest.java
index 2bb89ec4caa..7a13bf4a440 100644
--- a/contribs/sumo/src/test/java/org/matsim/contrib/sumo/SumoNetworkConverterTest.java
+++ b/contribs/sumo/src/test/java/org/matsim/contrib/sumo/SumoNetworkConverterTest.java
@@ -1,6 +1,9 @@
package org.matsim.contrib.sumo;
import com.google.common.io.Resources;
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.TransportMode;
@@ -8,6 +11,8 @@
import org.matsim.api.core.v01.network.Network;
import org.matsim.core.network.NetworkUtils;
+import java.io.File;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
@@ -42,9 +47,16 @@ void convert() throws Exception {
assert Files.exists(geometry) : "Geometries must exist";
- Path fts = Path.of(output.toString().replace(".xml", "-ft.csv"));
+ String csv = output.toString().replace(".xml", "-ft.csv");
+ Path fts = Path.of(csv);
assert Files.exists(fts) : "Features must exists";
+ CSVParser parser = CSVParser.parse(new File(csv), StandardCharsets.UTF_8, CSVFormat.DEFAULT.builder().setHeader().setHeader().build());
+
+ List header = parser.getHeaderNames();
+ Assertions.assertEquals("linkId", header.get(0));
+ Assertions.assertEquals("highway_type", header.get(1));
+
}
}
diff --git a/contribs/vsp/src/main/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributes.java b/contribs/vsp/src/main/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributes.java
index 861a51c33c4..e5a805462bd 100644
--- a/contribs/vsp/src/main/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributes.java
+++ b/contribs/vsp/src/main/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributes.java
@@ -45,7 +45,7 @@
* which is an adoption of {@link org.matsim.core.scoring.functions.SubpopulationScoringParameters}.
* This class additionaly allows for person-specific mode scoring parameters (for now ASC only) and marginalUtilityOfMoney.
* In order to use this, you need to provide the respective attributes (otherwise default values for the subpopulation
- * are used). For mode scoring parameters use .... TODO
+ * are used). The person specific mode parameters are interpreted as offset added to the subpopulation's parameters.
* For marginalUtilityOfMoney an attribute {@link org.matsim.core.population.PersonUtils#getIncome(Person)} for persons that have a specific
* income is used. Persons in the population, that have no attribute {@link org.matsim.core.population.PersonUtils#getIncome(Person)} will use the
* default marginal utility set in their subpopulation's scoring parameters.
@@ -160,9 +160,11 @@ public ScoringParameters getScoringParameters(Person person) {
Map personalScoringModeConstants = PersonUtils.getModeConstants(person);
if (personalScoringModeConstants != null) {
for (Map.Entry entry: personalScoringModeConstants.entrySet()) {
- ModeUtilityParameters.Builder modeUtilityParamsBuilder = new ModeUtilityParameters.Builder();
+ ScoringConfigGroup.ModeParams subpopulationModeParams = subpopulationScoringParams.getModes().get(entry.getKey());
+ ModeUtilityParameters.Builder modeUtilityParamsBuilder = new ModeUtilityParameters.Builder();
try {
- modeUtilityParamsBuilder.setConstant(Double.parseDouble(entry.getValue()));
+ modeUtilityParamsBuilder.setConstant(Double.parseDouble(entry.getValue()) +
+ subpopulationModeParams.getConstant());
} catch (NumberFormatException e) {
log.error("PersonalScoringModeConstants from person attribute could not be parsed for person " +
person.getId().toString() + ".");
@@ -170,7 +172,6 @@ public ScoringParameters getScoringParameters(Person person) {
}
// copy other params from subpopulation config
- ScoringConfigGroup.ModeParams subpopulationModeParams = subpopulationScoringParams.getModes().get(entry.getKey());
modeUtilityParamsBuilder.setMarginalUtilityOfTraveling_s(subpopulationModeParams.getMarginalUtilityOfTraveling());
modeUtilityParamsBuilder.setMarginalUtilityOfDistance_m(subpopulationModeParams.getMarginalUtilityOfDistance());
modeUtilityParamsBuilder.setMonetaryDistanceRate(subpopulationModeParams.getMonetaryDistanceRate());
diff --git a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java b/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java
deleted file mode 100644
index 4b57935373a..00000000000
--- a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/CarrierPlanAnalysis.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * *********************************************************************** *
- * project: org.matsim.*
- * *********************************************************************** *
- * *
- * copyright : (C) by the members listed in the COPYING, *
- * LICENSE and WARRANTY file. *
- * email : info at matsim dot org *
- * *
- * *********************************************************************** *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * See also COPYING, LICENSE and WARRANTY file *
- * *
- * ***********************************************************************
- *
- */
-
-package org.matsim.freight.carriers.analysis;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.matsim.api.core.v01.Id;
-import org.matsim.core.utils.misc.Time;
-import org.matsim.freight.carriers.Carrier;
-import org.matsim.freight.carriers.Carriers;
-import org.matsim.freight.carriers.CarriersUtils;
-
-import java.io.BufferedWriter;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.TreeMap;
-
-/**
- * Some basic analysis / data collection for {@link Carriers}(files)
- *
- * For all carriers it writes out the:
- * - score of the selected plan
- * - number of tours (= vehicles) of the selected plan
- * - number of Services (input)
- * - number of shipments (input)
- * to a tsv-file.
- * @author Kai Martins-Turner (kturner)
- */
-public class CarrierPlanAnalysis {
-
- private static final Logger log = LogManager.getLogger(CarrierPlanAnalysis.class);
-
- Carriers carriers;
-
- public CarrierPlanAnalysis(Carriers carriers) {
- this.carriers = carriers;
- }
-
- public void runAnalysisAndWriteStats(String analysisOutputDirectory) throws IOException {
- log.info("Writing out carrier analysis ...");
- //Load per vehicle
- String fileName = analysisOutputDirectory + "Carrier_stats.tsv";
-
- BufferedWriter bw1 = new BufferedWriter(new FileWriter(fileName));
-
- //Write headline:
- bw1.write("carrierId \t MATSimScoreSelectedPlan \t jSpritScoreSelectedPlan \t nuOfTours \t nuOfShipments(input) \t nuOfServices(input) \t jspritComputationTime[HH:mm:ss]");
- bw1.newLine();
-
- final TreeMap, Carrier> sortedCarrierMap = new TreeMap<>(carriers.getCarriers());
-
- for (Carrier carrier : sortedCarrierMap.values()) {
- bw1.write(carrier.getId().toString());
- bw1.write("\t" + carrier.getSelectedPlan().getScore());
- bw1.write("\t" + carrier.getSelectedPlan().getJspritScore());
- bw1.write("\t" + carrier.getSelectedPlan().getScheduledTours().size());
- bw1.write("\t" + carrier.getShipments().size());
- bw1.write("\t" + carrier.getServices().size());
- if (CarriersUtils.getJspritComputationTime(carrier) != Integer.MIN_VALUE)
- bw1.write("\t" + Time.writeTime(CarriersUtils.getJspritComputationTime(carrier), Time.TIMEFORMAT_HHMMSS));
- else
- bw1.write("\t" + "null");
-
- bw1.newLine();
- }
-
- bw1.close();
- log.info("Output written to " + fileName);
- }
-}
diff --git a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java b/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java
deleted file mode 100644
index 44374d18dd7..00000000000
--- a/contribs/vsp/src/main/java/org/matsim/freight/carriers/analysis/RunFreightAnalysisEventBased.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * *********************************************************************** *
- * project: org.matsim.*
- * *********************************************************************** *
- * *
- * copyright : (C) by the members listed in the COPYING, *
- * LICENSE and WARRANTY file. *
- * email : info at matsim dot org *
- * *
- * *********************************************************************** *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * See also COPYING, LICENSE and WARRANTY file *
- * *
- * ***********************************************************************
- *
- */
-
-package org.matsim.freight.carriers.analysis;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.matsim.api.core.v01.Scenario;
-import org.matsim.freight.carriers.FreightCarriersConfigGroup;
-import org.matsim.freight.carriers.CarriersUtils;
-import org.matsim.freight.carriers.events.CarrierEventsReaders;
-import org.matsim.core.api.experimental.events.EventsManager;
-import org.matsim.core.config.Config;
-import org.matsim.core.config.ConfigUtils;
-import org.matsim.core.events.EventsUtils;
-import org.matsim.core.events.MatsimEventsReader;
-import org.matsim.core.scenario.ScenarioUtils;
-
-import java.io.File;
-import java.io.IOException;
-
-
-/**
- * A first approach for some analysis based on the freight events introduced in 2022/23.
- * This class comes from teaching SimGV in the winter term 2022/23.
- *
- * This class should get extended and prepared as a standardized analysis for freight output.
- * This should also get aligned with the current development in Simwrapper.
- * Todo: Add some tests.
- *
- * @author kturner (Kai Martins-Turner)
- */
-public class RunFreightAnalysisEventBased {
-
- private static final Logger log = LogManager.getLogger(RunFreightAnalysisEventBased.class);
-
- //Were is your simulation output, that should be analysed?
- private final String SIM_OUTPUT_PATH ;
- private final String ANALYSIS_OUTPUT_PATH;
- private final String GLOBAL_CRS;
-
- /**
- * @param simOutputPath The output directory of the simulation run
- * @param analysisOutputPath The directory where the result of the analysis should go to
- * @param globalCrs
- */
- public RunFreightAnalysisEventBased(String simOutputPath, String analysisOutputPath, String globalCrs) {
- this.SIM_OUTPUT_PATH = simOutputPath;
- this.ANALYSIS_OUTPUT_PATH = analysisOutputPath;
- this.GLOBAL_CRS = globalCrs;
- }
-
- public void runAnalysis() throws IOException {
-
- Config config = ConfigUtils.createConfig();
- config.vehicles().setVehiclesFile(SIM_OUTPUT_PATH + "output_allVehicles.xml.gz");
- config.network().setInputFile(SIM_OUTPUT_PATH + "output_network.xml.gz");
- config.global().setCoordinateSystem(GLOBAL_CRS);
- config.plans().setInputFile(null);
- config.eventsManager().setNumberOfThreads(null);
- config.eventsManager().setEstimatedNumberOfEvents(null);
- config.global().setNumberOfThreads(1);
- //freight settings
- FreightCarriersConfigGroup freightCarriersConfigGroup = ConfigUtils.addOrGetModule( config, FreightCarriersConfigGroup.class ) ;
- freightCarriersConfigGroup.setCarriersFile( SIM_OUTPUT_PATH + "output_carriers.xml.gz");
- freightCarriersConfigGroup.setCarriersVehicleTypesFile(SIM_OUTPUT_PATH + "output_carriersVehicleTypes.xml.gz");
-
- //Were to store the analysis output?
- String analysisOutputDirectory = ANALYSIS_OUTPUT_PATH;
- if (!analysisOutputDirectory.endsWith("/")) {
- analysisOutputDirectory = analysisOutputDirectory + "/";
- }
- File folder = new File(analysisOutputDirectory);
- folder.mkdirs();
-
- final String eventsFile = SIM_OUTPUT_PATH + "output_events.xml.gz";
-
- Scenario scenario = ScenarioUtils.loadScenario(config);
-
- //load carriers according to freight config
- CarriersUtils.loadCarriersAccordingToFreightConfig( scenario );
-
-
- // CarrierPlanAnalysis
- CarrierPlanAnalysis carrierPlanAnalysis = new CarrierPlanAnalysis(CarriersUtils.getCarriers(scenario));
- carrierPlanAnalysis.runAnalysisAndWriteStats(analysisOutputDirectory);
-
- // Prepare eventsManager - start of event based Analysis;
- EventsManager eventsManager = EventsUtils.createEventsManager();
-
- FreightTimeAndDistanceAnalysisEventsHandler freightTimeAndDistanceAnalysisEventsHandler = new FreightTimeAndDistanceAnalysisEventsHandler(scenario);
- eventsManager.addHandler(freightTimeAndDistanceAnalysisEventsHandler);
-
- CarrierLoadAnalysis carrierLoadAnalysis = new CarrierLoadAnalysis(CarriersUtils.getCarriers(scenario));
- eventsManager.addHandler(carrierLoadAnalysis);
-
- eventsManager.initProcessing();
- MatsimEventsReader matsimEventsReader = CarrierEventsReaders.createEventsReader(eventsManager);
-
- matsimEventsReader.readFile(eventsFile);
- eventsManager.finishProcessing();
-
- log.info("Analysis completed.");
- log.info("Writing output...");
- freightTimeAndDistanceAnalysisEventsHandler.writeTravelTimeAndDistancePerVehicle(analysisOutputDirectory, scenario);
- freightTimeAndDistanceAnalysisEventsHandler.writeTravelTimeAndDistancePerVehicleType(analysisOutputDirectory, scenario);
- carrierLoadAnalysis.writeLoadPerVehicle(analysisOutputDirectory, scenario);
- }
-
-}
diff --git a/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesNoSubpopulationTest.java b/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesNoSubpopulationTest.java
index 395990c6a8c..9934ec2f088 100644
--- a/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesNoSubpopulationTest.java
+++ b/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesNoSubpopulationTest.java
@@ -22,7 +22,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.TransportMode;
import org.matsim.api.core.v01.population.*;
@@ -50,8 +49,6 @@
*/
public class PersonScoringParametersFromPersonAttributesNoSubpopulationTest {
- @RegisterExtension
- private MatsimTestUtils utils = new MatsimTestUtils();
private PersonScoringParametersFromPersonAttributes personScoringParams;
private Population population;
@@ -144,7 +141,7 @@ void testPersonWithLowIncomeLowCarAsc(){
Id id = Id.createPersonId("lowIncomeLowCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 0.5d, 0.5d);
- Assertions.assertEquals(-0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -153,7 +150,7 @@ void testPersonWithHighIncomeLowCarAsc(){
Id id = Id.createPersonId("highIncomeLowCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 1.5d, 0.5d);
- Assertions.assertEquals(-0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -162,8 +159,8 @@ void testPersonWithMediumIncomeHighCarAsc(){
Id id = Id.createPersonId("mediumIncomeHighCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 1d, 0.5d);
- Assertions.assertEquals(-2.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
- Assertions.assertEquals(-50.0d, params.modeParams.get(TransportMode.bike).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -2.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-0.55d -50.0d, params.modeParams.get(TransportMode.bike).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -189,12 +186,12 @@ void testPersonSpecificAscScoring(){
Leg carLegZeroDistanceTenSeconds = createLeg(TransportMode.car, 0.0d, 10.0d );
legScoringRichCarLeg.handleLeg(carLegZeroDistanceTenSeconds);
- Assertions.assertEquals(-0.1d -0.001d * 10 -7.5*1./1.5 -0.3, legScoringRichCarLeg.getScore(), MatsimTestUtils.EPSILON, "for the rich person with low car asc, a 0 meter and 10s car trip should be equal to a score of ");
+ Assertions.assertEquals(-1.0d -0.1d -0.001d * 10 -7.5*1./1.5 -0.3, legScoringRichCarLeg.getScore(), MatsimTestUtils.EPSILON, "for the rich person with low car asc, a 0 meter and 10s car trip should be equal to a score of ");
ScoringParameters paramsMediumIncomeHighCarAsc = personScoringParams.getScoringParameters(population.getPersons().get(Id.createPersonId("mediumIncomeHighCarAsc")));
CharyparNagelLegScoring legScoringMediumIncomeHighCarAsc = new CharyparNagelLegScoring(paramsMediumIncomeHighCarAsc, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
legScoringMediumIncomeHighCarAsc.handleLeg(carLegZeroDistanceTenSeconds);
- Assertions.assertEquals(-2.1d -0.001d * 10 -7.5*1./1.0 -0.3, legScoringMediumIncomeHighCarAsc.getScore(), MatsimTestUtils.EPSILON, "for the medium person with high car asc, a 0 meter and 10s car trip should be equal to a score of ");
+ Assertions.assertEquals(-1.0d -2.1d -0.001d * 10 -7.5*1./1.0 -0.3, legScoringMediumIncomeHighCarAsc.getScore(), MatsimTestUtils.EPSILON, "for the medium person with high car asc, a 0 meter and 10s car trip should be equal to a score of ");
// bike has no person specific asc for high income person and is not affected
CharyparNagelLegScoring legScoringRichBikeLeg = new CharyparNagelLegScoring(paramsRich, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
@@ -205,7 +202,7 @@ void testPersonSpecificAscScoring(){
// bike has a person specific asc for the medium income person
CharyparNagelLegScoring legScoringMediumIncomeBikeLeg = new CharyparNagelLegScoring(paramsMediumIncomeHighCarAsc, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
legScoringMediumIncomeBikeLeg.handleLeg(bikeLegZeroDistanceZeroSeconds);
- Assertions.assertEquals(-50.0d, legScoringMediumIncomeBikeLeg.getScore(), MatsimTestUtils.EPSILON, "for the medium income person with high car asc, a 0 meter and 0s bike trip should be equal to a score of ");
+ Assertions.assertEquals(-0.55d -50.0d, legScoringMediumIncomeBikeLeg.getScore(), MatsimTestUtils.EPSILON, "for the medium income person with high car asc, a 0 meter and 0s bike trip should be equal to a score of ");
}
private static Leg createLeg(String mode, double distance, double travelTime) {
diff --git a/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesTest.java b/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesTest.java
index 72f00ce92ef..2ef25ce7dea 100644
--- a/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesTest.java
+++ b/contribs/vsp/src/test/java/org/matsim/core/scoring/functions/PersonScoringParametersFromPersonAttributesTest.java
@@ -22,7 +22,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import org.matsim.api.core.v01.Id;
import org.matsim.api.core.v01.TransportMode;
import org.matsim.api.core.v01.population.*;
@@ -50,8 +49,6 @@
*/
public class PersonScoringParametersFromPersonAttributesTest {
- @RegisterExtension
- private MatsimTestUtils utils = new MatsimTestUtils();
private PersonScoringParametersFromPersonAttributes personScoringParams;
private Population population;
@@ -166,7 +163,7 @@ void testPersonWithLowIncomeLowCarAsc(){
Id id = Id.createPersonId("lowIncomeLowCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 0.5d, 0.5d);
- Assertions.assertEquals(-0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -175,7 +172,7 @@ void testPersonWithHighIncomeLowCarAsc(){
Id id = Id.createPersonId("highIncomeLowCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 1.5d, 0.5d);
- Assertions.assertEquals(-0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -0.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -184,8 +181,8 @@ void testPersonWithMediumIncomeHighCarAsc(){
Id id = Id.createPersonId("mediumIncomeHighCarAsc");
ScoringParameters params = personScoringParams.getScoringParameters(population.getPersons().get(id));
makeAssertMarginalUtilityOfMoneyAndPtWait(params, 1d, 0.5d);
- Assertions.assertEquals(-2.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
- Assertions.assertEquals(-50.0d, params.modeParams.get(TransportMode.bike).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-1.0d -2.1d, params.modeParams.get(TransportMode.car).constant, MatsimTestUtils.EPSILON);
+ Assertions.assertEquals(-0.55d -50.0d, params.modeParams.get(TransportMode.bike).constant, MatsimTestUtils.EPSILON);
Assertions.assertEquals(-0.001d, params.modeParams.get(TransportMode.car).marginalUtilityOfTraveling_s, MatsimTestUtils.EPSILON);
}
@@ -229,12 +226,12 @@ void testPersonSpecificAscScoring(){
Leg carLegZeroDistanceTenSeconds = createLeg(TransportMode.car, 0.0d, 10.0d );
legScoringRichCarLeg.handleLeg(carLegZeroDistanceTenSeconds);
- Assertions.assertEquals(-0.1d -0.001d * 10 -7.5*1./1.5 -0.3, legScoringRichCarLeg.getScore(), MatsimTestUtils.EPSILON, "for the rich person with low car asc, a 0 meter and 10s car trip should be equal to a score of ");
+ Assertions.assertEquals(-1.0d -0.1d -0.001d * 10 -7.5*1./1.5 -0.3, legScoringRichCarLeg.getScore(), MatsimTestUtils.EPSILON, "for the rich person with low car asc, a 0 meter and 10s car trip should be equal to a score of ");
ScoringParameters paramsMediumIncomeHighCarAsc = personScoringParams.getScoringParameters(population.getPersons().get(Id.createPersonId("mediumIncomeHighCarAsc")));
CharyparNagelLegScoring legScoringMediumIncomeHighCarAsc = new CharyparNagelLegScoring(paramsMediumIncomeHighCarAsc, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
legScoringMediumIncomeHighCarAsc.handleLeg(carLegZeroDistanceTenSeconds);
- Assertions.assertEquals(-2.1d -0.001d * 10 -7.5*1./1.0 -0.3, legScoringMediumIncomeHighCarAsc.getScore(), MatsimTestUtils.EPSILON, "for the medium person with high car asc, a 0 meter and 10s car trip should be equal to a score of ");
+ Assertions.assertEquals(-1.0d -2.1d -0.001d * 10 -7.5*1./1.0 -0.3, legScoringMediumIncomeHighCarAsc.getScore(), MatsimTestUtils.EPSILON, "for the medium person with high car asc, a 0 meter and 10s car trip should be equal to a score of ");
// bike has no person specific asc for high income person and is not affected
CharyparNagelLegScoring legScoringRichBikeLeg = new CharyparNagelLegScoring(paramsRich, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
@@ -245,7 +242,7 @@ void testPersonSpecificAscScoring(){
// bike has a person specific asc for the medium income person
CharyparNagelLegScoring legScoringMediumIncomeBikeLeg = new CharyparNagelLegScoring(paramsMediumIncomeHighCarAsc, NetworkUtils.createNetwork(), Set.of(TransportMode.pt));
legScoringMediumIncomeBikeLeg.handleLeg(bikeLegZeroDistanceZeroSeconds);
- Assertions.assertEquals(-50.0d, legScoringMediumIncomeBikeLeg.getScore(), MatsimTestUtils.EPSILON, "for the medium income person with high car asc, a 0 meter and 0s bike trip should be equal to a score of ");
+ Assertions.assertEquals(-0.55d -50.0d, legScoringMediumIncomeBikeLeg.getScore(), MatsimTestUtils.EPSILON, "for the medium income person with high car asc, a 0 meter and 0s bike trip should be equal to a score of ");
}
private static Leg createLeg(String mode, double distance, double travelTime) {
diff --git a/contribs/vsp/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runFreightAnalysisEventBasedTest/Carrier_stats.tsv b/contribs/vsp/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runFreightAnalysisEventBasedTest/Carrier_stats.tsv
index d9ee80ea968..fc9ba4ea543 100644
--- a/contribs/vsp/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runFreightAnalysisEventBasedTest/Carrier_stats.tsv
+++ b/contribs/vsp/test/input/org/matsim/freight/carriers/analysis/FreightAnalysisEventBasedTest/runFreightAnalysisEventBasedTest/Carrier_stats.tsv
@@ -1,2 +1,2 @@
-carrierId MATSimScoreSelectedPlan jSpritScoreSelectedPlan nuOfTours nuOfShipments(input) nuOfServices(input) jspritComputationTime[HH:mm:ss]
-carrier1 -263.4 null 2 0 7 null
+carrierId MATSimScoreSelectedPlan jSpritScoreSelectedPlan nuOfTours nuOfShipments(input) nuOfShipments(handled) nuOfServices(input) nuOfServices(handled) nuOfPlanedDemandSize nuOfHandledDemandSize jspritComputationTime[HH:mm:ss]
+carrier1 -263.4 null 2 0 0 7 7 7 7 null
diff --git a/examples/scenarios/freight-chessboard-9x9/singleCarrierFiveActivities_Shipments.xml b/examples/scenarios/freight-chessboard-9x9/singleCarrierFiveActivities_Shipments.xml
new file mode 100644
index 00000000000..1e6b969acaf
--- /dev/null
+++ b/examples/scenarios/freight-chessboard-9x9/singleCarrierFiveActivities_Shipments.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+ 0.12
+ 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -215.4666666666667
+
+
+
+
+