Commit f5ea5ab8 authored by Christopher Tchervenkov's avatar Christopher Tchervenkov
Browse files

change occurences of freight to truck

parent 9af30a44
package ch.ethz.matsim.projects.astra_2018_002.analysis.flow; package ch.ethz.matsim.projects.astra_2018_002.analysis.flow;
public class AnalysisVehicle { public class AnalysisVehicle {
public boolean isFreight = false; public boolean isTruck = false;
public boolean isShared = false; public boolean isShared = false;
public boolean isPooled = false; public boolean isPooled = false;
public int automationLevel = 0; public int automationLevel = 0;
......
...@@ -81,7 +81,7 @@ public class FlowListener implements LinkEnterEventHandler { ...@@ -81,7 +81,7 @@ public class FlowListener implements LinkEnterEventHandler {
public int privateVehicles; public int privateVehicles;
public int pooledVehicles; public int pooledVehicles;
public int taxiVehicles; public int taxiVehicles;
public int freightVehicles; public int truckVehicles;
// By automation // By automation
public int conventionalVehicles; public int conventionalVehicles;
...@@ -109,8 +109,8 @@ public class FlowListener implements LinkEnterEventHandler { ...@@ -109,8 +109,8 @@ public class FlowListener implements LinkEnterEventHandler {
vehicle.automationLevel = 5; vehicle.automationLevel = 5;
vehicle.isShared = true; vehicle.isShared = true;
vehicle.isPooled = true; vehicle.isPooled = true;
} else if (rawVehicleId.contains("freight")) { } else if (rawVehicleId.contains("truck")) {
vehicle.isFreight = true; vehicle.isTruck = true;
} }
return vehicle; return vehicle;
...@@ -151,8 +151,8 @@ public class FlowListener implements LinkEnterEventHandler { ...@@ -151,8 +151,8 @@ public class FlowListener implements LinkEnterEventHandler {
} else { } else {
item.taxiVehicles++; item.taxiVehicles++;
} }
} else if (analysisVehicle.isFreight) { } else if (analysisVehicle.isTruck) {
item.freightVehicles++; item.truckVehicles++;
} else { } else {
item.privateVehicles++; item.privateVehicles++;
} }
......
...@@ -112,7 +112,7 @@ public class RunFlowAnalysis { ...@@ -112,7 +112,7 @@ public class RunFlowAnalysis {
.addAttribute("day_pool", Integer.class) // .addAttribute("day_pool", Integer.class) //
.addAttribute("day_taxi", Integer.class) // .addAttribute("day_taxi", Integer.class) //
.addAttribute("day_conv", Integer.class) // .addAttribute("day_conv", Integer.class) //
.addAttribute("day_freight", Integer.class) // .addAttribute("day_truck", Integer.class) //
.addAttribute("day_level5", Integer.class) // .addAttribute("day_level5", Integer.class) //
.addAttribute("day_level4", Integer.class) // .addAttribute("day_level4", Integer.class) //
.addAttribute("day_level3", Integer.class) // .addAttribute("day_level3", Integer.class) //
...@@ -122,7 +122,7 @@ public class RunFlowAnalysis { ...@@ -122,7 +122,7 @@ public class RunFlowAnalysis {
.addAttribute("am_pool", Integer.class) // .addAttribute("am_pool", Integer.class) //
.addAttribute("am_taxi", Integer.class) // .addAttribute("am_taxi", Integer.class) //
.addAttribute("am_conv", Integer.class) // .addAttribute("am_conv", Integer.class) //
.addAttribute("am_freight", Integer.class) // .addAttribute("am_truck", Integer.class) //
.addAttribute("am_level5", Integer.class) // .addAttribute("am_level5", Integer.class) //
.addAttribute("am_level4", Integer.class) // .addAttribute("am_level4", Integer.class) //
.addAttribute("am_level3", Integer.class) // .addAttribute("am_level3", Integer.class) //
...@@ -132,7 +132,7 @@ public class RunFlowAnalysis { ...@@ -132,7 +132,7 @@ public class RunFlowAnalysis {
.addAttribute("pm_pool", Integer.class) // .addAttribute("pm_pool", Integer.class) //
.addAttribute("pm_taxi", Integer.class) // .addAttribute("pm_taxi", Integer.class) //
.addAttribute("pm_conv", Integer.class) // .addAttribute("pm_conv", Integer.class) //
.addAttribute("pm_freight", Integer.class) // .addAttribute("pm_truck", Integer.class) //
.addAttribute("pm_level5", Integer.class) // .addAttribute("pm_level5", Integer.class) //
.addAttribute("pm_level4", Integer.class) // .addAttribute("pm_level4", Integer.class) //
.addAttribute("pm_level3", Integer.class) // .addAttribute("pm_level3", Integer.class) //
...@@ -167,7 +167,7 @@ public class RunFlowAnalysis { ...@@ -167,7 +167,7 @@ public class RunFlowAnalysis {
totalItem.pooledVehicles, // totalItem.pooledVehicles, //
totalItem.taxiVehicles, // totalItem.taxiVehicles, //
totalItem.conventionalVehicles, // totalItem.conventionalVehicles, //
totalItem.freightVehicles, // totalItem.truckVehicles, //
totalItem.level5Vehicles, // totalItem.level5Vehicles, //
totalItem.level4Vehicles, // totalItem.level4Vehicles, //
totalItem.level3Vehicles, // totalItem.level3Vehicles, //
...@@ -177,7 +177,7 @@ public class RunFlowAnalysis { ...@@ -177,7 +177,7 @@ public class RunFlowAnalysis {
morningItem.pooledVehicles, // morningItem.pooledVehicles, //
morningItem.taxiVehicles, // morningItem.taxiVehicles, //
morningItem.conventionalVehicles, // morningItem.conventionalVehicles, //
morningItem.freightVehicles, // morningItem.truckVehicles, //
morningItem.level5Vehicles, // morningItem.level5Vehicles, //
morningItem.level4Vehicles, // morningItem.level4Vehicles, //
morningItem.level3Vehicles, // morningItem.level3Vehicles, //
...@@ -187,7 +187,7 @@ public class RunFlowAnalysis { ...@@ -187,7 +187,7 @@ public class RunFlowAnalysis {
eveningItem.pooledVehicles, // eveningItem.pooledVehicles, //
eveningItem.taxiVehicles, // eveningItem.taxiVehicles, //
eveningItem.conventionalVehicles, // eveningItem.conventionalVehicles, //
eveningItem.freightVehicles, // eveningItem.truckVehicles, //
eveningItem.level5Vehicles, // eveningItem.level5Vehicles, //
eveningItem.level4Vehicles, // eveningItem.level4Vehicles, //
eveningItem.level3Vehicles, // eveningItem.level3Vehicles, //
......
...@@ -21,7 +21,7 @@ public class SwissModeAvailability extends CarModeAvailability { ...@@ -21,7 +21,7 @@ public class SwissModeAvailability extends CarModeAvailability {
@Override @Override
public Collection<String> getAvailableModes(Person person, List<DiscreteModeChoiceTrip> trips) { public Collection<String> getAvailableModes(Person person, List<DiscreteModeChoiceTrip> trips) {
Boolean isFreight = (Boolean) person.getAttributes().getAttribute("isFreight"); Boolean isFreight = (Boolean) person.getAttributes().getAttribute("isTruck");
if (isFreight != null && isFreight) { if (isFreight != null && isFreight) {
return Collections.singleton("truck"); return Collections.singleton("truck");
......
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