matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
75 stars 173 forks source link

Creating synthetic population on MATSim #1101

Closed cnabu closed 1 month ago

cnabu commented 2 months ago

Hello,

I want to know how to create plans.xml, population.xml and vehicles.xml etc for the synthetic population from the census and travel survey data? Are there any resources that you can tell me which can be useful to do this task?

Janekdererste commented 2 months ago

We have an example, where a population is created from commuter data.

https://github.com/matsim-org/matsim-code-examples/tree/15.x/src/main/java/org/matsim/codeexamples/population/demandGenerationFromShapefile

cnabu commented 2 months ago

Thank you for sharing this. I want to create all the aforementioned xml files with the help of NTS Travel Survey data (link below). Is it possible to do this by following the procedure given in the example you shared in your post?

https://beta.ukdataservice.ac.uk/datacatalogue/studies/study?id=5340

Janekdererste commented 2 months ago

The example above only creates a population file. "Plans" and "population" file reference the same thing. Those terms are used interchangeably. I think "population" conforms to the most recent nomenclature.

What exactly are you planning on doing with the vehicles file? The vehicles file contains two types of information:

  1. Vehicle types: The different vehicle types used in your simulation. Types contain the specification of a vehicle such as max velocity, length, width, etc. This could be something like "car" or "bicycle". Or, if your model requires this, you could split the specification for individual modes into more detailed categories like "car_large", "car_medium", and so forth.
  2. Vehicles: This is a very simple container with a vehicleId and a vehicleTypeId. Usually, we don't include individual vehicles into the file, as per default MATSim will generate vehicles of each network mode for each person before the simulation starts. However, you can specify vehicles in your vehicle file and assign vehicles to persons manually. Most of the time this level of control is not necessary, but it depends on what you are trying to model

In case you only need vehicle types, you can easily create this file by hand, using any vehicles file in our public repositories as a starting point. For example this one

cnabu commented 2 months ago

Thank you for your explanation. I want to figure out emissions in my simulation so I believe I need vehicleTypes.xml. Is there a good example that you can share with me for that?

Janekdererste commented 2 months ago

The Open-Berlin-Scenario contains emission calculations. The simple use case is in this file. The folder contains more complicated setups.

Please note, that you need your own emission factors. Unfortunately, we can't provide these factors, as one needs to buy a license for them.

cnabu commented 2 months ago

Hello Janek,

Thanks for this. Out of curiosity, how much is the license?

Kind regards, Arsal


From: Janek Laudan @.> Sent: Tuesday, April 30, 2024 7:59 AM To: matsim-org/matsim-code-examples @.> Cc: Arsal Butt @.>; Author @.> Subject: Re: [matsim-org/matsim-code-examples] Creating synthetic population on MATSim (Issue #1101)

CAUTION: External Message. Use caution opening links and attachments.

The Open-Berlin-Scenario contains emission calculations. The simple use case is in thishttps://github.com/matsim-scenarios/matsim-berlin/blob/4ba494fabed38311791789ee7a027bca4ab72fa0/src/main/java/org/matsim/legacy/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java#L119 file. The folder contains more complicated setups.

Please note, that you need your own emission factors. Unfortunately, we can't provide these factors, as one needs to buy a license for them.

— Reply to this email directly, view it on GitHubhttps://github.com/matsim-org/matsim-code-examples/issues/1101#issuecomment-2084521457, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BGLLT6YMUY22OE6YYKKCPFTY746OXAVCNFSM6AAAAABGNNXVHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGUZDCNBVG4. You are receiving this because you authored the thread.Message ID: @.***>

Janekdererste commented 2 months ago

I have no idea. You can check here https://www.hbefa.net/en/software#licensing