Commit 9af30a44 authored by Christopher Tchervenkov's avatar Christopher Tchervenkov
Browse files

changes to compute flows for freight vehicles

parent 18ff9f48
package ch.ethz.matsim.projects.astra_2018_002.analysis.flow;
public class AnalysisVehicle {
public boolean isFreight = false;
public boolean isShared = false;
public boolean isPooled = false;
public int automationLevel = 0;
......
......@@ -81,6 +81,7 @@ public class FlowListener implements LinkEnterEventHandler {
public int privateVehicles;
public int pooledVehicles;
public int taxiVehicles;
public int freightVehicles;
// By automation
public int conventionalVehicles;
......@@ -108,6 +109,8 @@ public class FlowListener implements LinkEnterEventHandler {
vehicle.automationLevel = 5;
vehicle.isShared = true;
vehicle.isPooled = true;
} else if (rawVehicleId.contains("freight")) {
vehicle.isFreight = true;
}
return vehicle;
......@@ -148,6 +151,8 @@ public class FlowListener implements LinkEnterEventHandler {
} else {
item.taxiVehicles++;
}
} else if (analysisVehicle.isFreight) {
item.freightVehicles++;
} else {
item.privateVehicles++;
}
......
......@@ -112,6 +112,7 @@ public class RunFlowAnalysis {
.addAttribute("day_pool", Integer.class) //
.addAttribute("day_taxi", Integer.class) //
.addAttribute("day_conv", Integer.class) //
.addAttribute("day_freight", Integer.class) //
.addAttribute("day_level5", Integer.class) //
.addAttribute("day_level4", Integer.class) //
.addAttribute("day_level3", Integer.class) //
......@@ -121,6 +122,7 @@ public class RunFlowAnalysis {
.addAttribute("am_pool", Integer.class) //
.addAttribute("am_taxi", Integer.class) //
.addAttribute("am_conv", Integer.class) //
.addAttribute("am_freight", Integer.class) //
.addAttribute("am_level5", Integer.class) //
.addAttribute("am_level4", Integer.class) //
.addAttribute("am_level3", Integer.class) //
......@@ -130,6 +132,7 @@ public class RunFlowAnalysis {
.addAttribute("pm_pool", Integer.class) //
.addAttribute("pm_taxi", Integer.class) //
.addAttribute("pm_conv", Integer.class) //
.addAttribute("pm_freight", Integer.class) //
.addAttribute("pm_level5", Integer.class) //
.addAttribute("pm_level4", Integer.class) //
.addAttribute("pm_level3", Integer.class) //
......@@ -164,6 +167,7 @@ public class RunFlowAnalysis {
totalItem.pooledVehicles, //
totalItem.taxiVehicles, //
totalItem.conventionalVehicles, //
totalItem.freightVehicles, //
totalItem.level5Vehicles, //
totalItem.level4Vehicles, //
totalItem.level3Vehicles, //
......@@ -173,6 +177,7 @@ public class RunFlowAnalysis {
morningItem.pooledVehicles, //
morningItem.taxiVehicles, //
morningItem.conventionalVehicles, //
morningItem.freightVehicles, //
morningItem.level5Vehicles, //
morningItem.level4Vehicles, //
morningItem.level3Vehicles, //
......@@ -182,6 +187,7 @@ public class RunFlowAnalysis {
eveningItem.pooledVehicles, //
eveningItem.taxiVehicles, //
eveningItem.conventionalVehicles, //
eveningItem.freightVehicles, //
eveningItem.level5Vehicles, //
eveningItem.level4Vehicles, //
eveningItem.level3Vehicles, //
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment