Skip to content
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

Merged
merged 4 commits into from
Aug 22, 2024
Merged

Emission noise analysis #9

merged 4 commits into from
Aug 22, 2024

Conversation

simei94
Copy link
Contributor

@simei94 simei94 commented Aug 22, 2024

add emission and noise analysis + dashboards for each to analysis cycle.

@simei94 simei94 merged commit afe958e into main Aug 22, 2024
2 of 3 checks passed
@simei94 simei94 deleted the emission-noise-analysis branch August 22, 2024 10:27
Copy link

Comment on lines +189 to +201

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());
Copy link

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.

Comment on lines +274 to +314
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()));
Copy link

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.

Comment on lines +164 to +165
eConfig.setDetailedColdEmissionFactorsFile(HBEFA_FILE_COLD_DETAILED);
eConfig.setDetailedWarmEmissionFactorsFile(HBEFA_FILE_WARM_DETAILED);
Copy link

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);
Copy link

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants