From 47f8562d0102fa1f59d549b676c41c7e54477d98 Mon Sep 17 00:00:00 2001 From: schlenther Date: Tue, 4 Jun 2024 15:59:45 +0200 Subject: [PATCH] reduce duplication --- .../emissions/KelheimEmissionsDashboard.java | 2 +- .../matsim/dashboard/AverageDrtDashboard.java | 20 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/main/java/org/matsim/analysis/emissions/KelheimEmissionsDashboard.java b/src/main/java/org/matsim/analysis/emissions/KelheimEmissionsDashboard.java index c8d92e77..cb7a9a9b 100644 --- a/src/main/java/org/matsim/analysis/emissions/KelheimEmissionsDashboard.java +++ b/src/main/java/org/matsim/analysis/emissions/KelheimEmissionsDashboard.java @@ -58,7 +58,7 @@ public void configure(Header header, Layout layout) { String linkDescription = "Displays the emissions for each link per meter. Be aware that emission values are provided in the simulation sample size!"; if (pathToCsvBase != null){ - linkDescription += String.format("\n Base is %s", pathToCsvBase); + linkDescription += String.format("%n Base is %s", pathToCsvBase); } String finalLinkDescription = linkDescription; diff --git a/src/main/java/org/matsim/dashboard/AverageDrtDashboard.java b/src/main/java/org/matsim/dashboard/AverageDrtDashboard.java index df880d8e..82ed8fde 100644 --- a/src/main/java/org/matsim/dashboard/AverageDrtDashboard.java +++ b/src/main/java/org/matsim/dashboard/AverageDrtDashboard.java @@ -43,21 +43,18 @@ public void configure(Header header, Layout layout) { layout.row("one") .el(Table.class, (viz, data) -> { viz.title = "Rides per vehicle"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "rides_per_veh_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Avg wait time"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_wait_time_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Requests"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "requests_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -66,21 +63,18 @@ public void configure(Header header, Layout layout) { layout.row("two") .el(Table.class, (viz, data) -> { viz.title = "Avg total travel time"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_total_travel_time_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Rides"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "rides_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Avg direct distance [km]"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_direct_distance_[km]_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -89,21 +83,18 @@ public void configure(Header header, Layout layout) { layout.row("three") .el(Table.class, (viz, data) -> { viz.title = "Rejections"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "rejections_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "95th percentile wait time"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "95th_percentile_wait_time_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Avg in-vehicle time"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_in-vehicle_time_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -112,21 +103,18 @@ public void configure(Header header, Layout layout) { layout.row("four") .el(Table.class, (viz, data) -> { viz.title = "Avg ride distance [km]"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_ride_distance_[km]_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Rejection rate"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "rejection_rate_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Avg fare [MoneyUnit]"; - viz.description = "Final demand statistics and KPI."; viz.dataset = postProcess(data, "avg_fare_[MoneyUnit]_avg_demand_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -140,21 +128,18 @@ private void supplyTabs(Layout layout) { layout.row("six") .el(Table.class, (viz, data) -> { viz.title = "Total service hours"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "total_service_hours_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Pooling ratio"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "pooling_ratio_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Detour ratio"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "detour_ratio_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -163,21 +148,18 @@ private void supplyTabs(Layout layout) { layout.row("seven") .el(Table.class, (viz, data) -> { viz.title = "Total vehicle mileage [km]"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "total_vehicle_mileage_[km]_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Empty ratio"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "empty_ratio_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Number of stops"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "number_of_stops_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; @@ -186,14 +168,12 @@ private void supplyTabs(Layout layout) { layout.row("eight") .el(Table.class, (viz, data) -> { viz.title = "Total pax distance [km]"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "total_pax_distance_[km]_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.; }) .el(Table.class, (viz, data) -> { viz.title = "Vehicles"; - viz.description = "Final configuration and service KPI."; viz.dataset = postProcess(data, "vehicles_avg_supply_stats.csv"); viz.showAllRows = true; viz.width = 1.;