Package org.matsim.contrib.emissions
Usage
ExecuteCreateEmissionConfig
and RunDetailedEmissionToolOnlineExample
or RunDetailedEmissionToolOfflineExample
from the example package.
-
CreateEmissionConfig
: Creates a MATSim config file with links to emission related input files asEmissionsConfigGroup
. -
RunDetailedEmissionToolOnlineExample
: Writes emission events to the events file during the simulation. -
RunDetailedEmissionToolOfflineExample
: Writes emission events to the events file based on a standard MATSim events file.
CreateEmissionConfig
.
An example config and the associated files can be found at the test input directory.
The example config file allows you to directly run the online example.
Please note that the emission values given by the sample files are NOT actual data from HBEFA due to copyright restrictions. In the follwing section, there is a guide how to export these files.
Export from HBEFA 3.x
Currently, data from the HBEFA 3.x Microsoft Access database needs to be exported manually. Consequently, the following steps within HBEFA 3.x need still be done manually:- Install and open HBEFA 3.x
- Select your country and language
- Go to "CaseDefinition" > "New"
- Select the desired parameters:
- VEHICLE CATEGORIES: Currently, PC (passenger car), HGV (heavy goods vehicle), MOTORCYCLE and ZEV (zero emission vehicle) are supported (see
HbefaVehicleCategory
) - COMPONENTS: MATSim will handle any components that are exported from the hbefa database
- YEARS: Choose the year of your scenario (only when exporting the mandatory average emission factors files)
- FLEET COMPOSITION: Choose "EF weighted with fleet composition" for the mandatory average emission factors files, and "EF per subsegment (without weighting)" for the optional detailed emission factors files
- HOT EMISSION FACTORS: Choose "Individual TrafficSituations" > "Construct your own list" > "SelectAll" > "Return"
- COLD START EXCESS EMISSION FACTORS: Tick this option and choose "Construct your own list" > select all "patterns" with average temperature, detailed parking time (0-1h .. >12h), and detailed distance (0-1km and 1-2km) > "Return"
- Leave everything else as default
- Enter "Name of parameter set" and press "Calculate"
- Save the two generated tables using "Results" > "Export" to the desired location
EmissionModule
.
Input files
Required files are:- roadTypeMappingFile: This file needs to map road types in your network to HBEFA 3.x road types.
Update (June'2018) one can now directly add HBEFA road type to link attributes using
EmissionUtils.setHbefaRoadType(org.matsim.api.core.v01.network.Link, java.lang.String)
or seeEmissionsConfigGroup
for a detailed description. - emissionVehicleFile: This data type is defined in the EmissionsConfigGroup,
see
EmissionsConfigGroup
. The following information is surrounded byEmissionUtils.EmissionSpecificationMarker
. It is described as "definition of a vehicle for every person (who is allowed to choose a vehicle in the simulation):- REQUIRED: Vehicle description must start with the respective HbefaVehicleCategory followed by ";"
- OPTIONAL: If detailed emission calculation is switched on, the vehicle type Id should additionally contain HbefaVehicleAttributes ("Technology;SizeClasse;EmConcept"), corresponding to the strings in detailedWarmEmissionFactorsFile (see below)
true
in theRunDetailedEmissionToolOnlineExample
orRunDetailedEmissionToolOfflineExample
class. Define the input paths forModel description
Emissions
The main package contains classes and methods to handle the emission input data and create maps to associate the emissions with corresponding vehicle types, speed, parking time, ...
Events
This class contains extensions ofEvent
to handle different types of emissions as events.ColdEmissionAnalysisModule
calculates emissions after a cold start,WarmEmissionAnalysisModule
calculates warm emissions.Example
This class contains the "RunEmissionTool" classes and a control listener which implements some functions fromControler
.Types
HbefaVehicleAttributes
contains a default constructor, setting all values to average. This way a calculation of emissions for undefined vehicle types can be performed. Any instance ofHbefaWarmEmissionFactorKey
contains a vehicle category, a warm pollutant; a road category, a traffic situation and three vehicle attributes (technology, size class, em concept). Any instance ofHbefaTrafficSituation
specifies one of 4 traffic situations. Instances ofHbefaColdEmissionFactorKey
contain a vehicle category, a cold pollutant, a parking time range, a distance, which is driven after parking and, again, vehicle attributes. The cold/warm emission factor keys are mapped to the values of cold/warm emissions, the cold/warm emission factors.
- Author:
- benjamin, julia
-
Interface Summary Interface Description LinkEmissionsCalculator -
Class Summary Class Description EmissionModule EmissionUtils WarmEmissionAnalysisModule -
Enum Summary Enum Description HbefaVehicleCategory Pollutant