Package org.matsim.contrib.emissions

Usage

Execute CreateEmissionConfig and RunDetailedEmissionToolOnlineExample or RunDetailedEmissionToolOfflineExample from the example package. The online example as well as the offline example use a config file as created by 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
All these emission factor files need to be converted into *.txt or *.csv with ";" as delimiter. Their column headers should automatically match the parser definition in the respective method of the 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 see EmissionsConfigGroup for a detailed description.
  • emissionVehicleFile: This data type is defined in the EmissionsConfigGroup, see EmissionsConfigGroup. The following information is surrounded by EmissionUtils.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)
    Optional: If you want to use vehicle specific emission calculations, set isUsingDetailedEmissionCalculation to true in the RunDetailedEmissionToolOnlineExample or RunDetailedEmissionToolOfflineExample class. Define the input paths for

      Model 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 of Event 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 from Controler.

      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 of HbefaWarmEmissionFactorKey contains a vehicle category, a warm pollutant; a road category, a traffic situation and three vehicle attributes (technology, size class, em concept). Any instance of HbefaTrafficSituation specifies one of 4 traffic situations. Instances of HbefaColdEmissionFactorKey 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