-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emission noise analysis #9
Conversation
Quality Gate passedIssues Measures |
|
||
if (emissions == EmissionAnalysisHandling.PERFORM_EMISSIONS_ANALYSIS) { | ||
// do not use VspHbefaRoadTypeMapping() as it results in almost every road to mapped to "highway"! | ||
HbefaRoadTypeMapping roadTypeMapping = OsmHbefaMapping.build(); | ||
// the type attribute in our network has the prefix "highway" for all links but pt links. | ||
// we need to delete that because OsmHbefaMapping does not handle that. | ||
for (Link link : scenario.getNetwork().getLinks().values()) { | ||
//pt links can be disregarded | ||
if (!link.getAllowedModes().contains("pt")) { | ||
NetworkUtils.setType(link, NetworkUtils.getType(link).replaceFirst("highway.", "")); | ||
} | ||
} | ||
roadTypeMapping.addHbefaMappings(scenario.getNetwork()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As also written directly to Simon: We at VSP should have our current scenarios in a state, that the HBEFA attributes are part of the input network. This is a network property and thus should not depend on the mapping in the analysis script itself.
for (VehicleType type : scenario.getVehicles().getVehicleTypes().values()) { | ||
EngineInformation engineInformation = type.getEngineInformation(); | ||
|
||
// only set engine information if none are present | ||
if (engineInformation.getAttributes().isEmpty()) { | ||
switch (type.getId().toString()) { | ||
case TransportMode.car -> { | ||
VehicleUtils.setHbefaVehicleCategory(engineInformation, HbefaVehicleCategory.PASSENGER_CAR.toString()); | ||
VehicleUtils.setHbefaTechnology(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaSizeClass(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaEmissionsConcept(engineInformation, AVERAGE); | ||
} | ||
case TransportMode.ride -> { | ||
// ignore ride, the mode routed on network, but then teleported | ||
VehicleUtils.setHbefaVehicleCategory(engineInformation, HbefaVehicleCategory.NON_HBEFA_VEHICLE.toString()); | ||
VehicleUtils.setHbefaTechnology(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaSizeClass(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaEmissionsConcept(engineInformation, AVERAGE); | ||
} | ||
case FREIGHT -> { | ||
VehicleUtils.setHbefaVehicleCategory(engineInformation, HbefaVehicleCategory.HEAVY_GOODS_VEHICLE.toString()); | ||
VehicleUtils.setHbefaTechnology(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaSizeClass(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaEmissionsConcept(engineInformation, AVERAGE); | ||
} | ||
case TransportMode.bike -> { | ||
// ignore bikes | ||
VehicleUtils.setHbefaVehicleCategory(engineInformation, HbefaVehicleCategory.NON_HBEFA_VEHICLE.toString()); | ||
VehicleUtils.setHbefaTechnology(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaSizeClass(engineInformation, AVERAGE); | ||
VehicleUtils.setHbefaEmissionsConcept(engineInformation, AVERAGE); | ||
} | ||
default -> throw new IllegalArgumentException("does not know how to handle vehicleType " + type.getId().toString()); | ||
} | ||
} | ||
} | ||
|
||
// ignore all pt veh types | ||
scenario.getTransitVehicles() | ||
.getVehicleTypes() | ||
.values().forEach(type -> VehicleUtils.setHbefaVehicleCategory(type.getEngineInformation(), HbefaVehicleCategory.NON_HBEFA_VEHICLE.toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit the same as for the links... should be IMO part of the input. Since this script here only sets average values, if no value is set, I do not know if the input has the engineInformation set correctly or not.
Maybe also make a bit more clear that you set here everything to average.
eConfig.setDetailedColdEmissionFactorsFile(HBEFA_FILE_COLD_DETAILED); | ||
eConfig.setDetailedWarmEmissionFactorsFile(HBEFA_FILE_WARM_DETAILED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you only use AVERAGE, you should be able to run it without the detailed tables.
eConfig.setAverageColdEmissionFactorsFile(HBEFA_FILE_COLD_AVERAGE); | ||
eConfig.setAverageWarmEmissionFactorsFile(HBEFA_FILE_WARM_AVERAGE); | ||
eConfig.setHbefaTableConsistencyCheckingLevel(EmissionsConfigGroup.HbefaTableConsistencyCheckingLevel.consistent); | ||
eConfig.setDetailedVsAverageLookupBehavior(EmissionsConfigGroup.DetailedVsAverageLookupBehavior.tryDetailedThenTechnologyAverageThenAverageTable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If only running AVERAGE vehicle types, the LookupBehaviour could be set IMO to directlyAverage (or whatever its name is). Together with just setting the average tables, it makes a bit more clear, that you run an average analysis (which is totally fine!)
add emission and noise analysis + dashboards for each to analysis cycle.