matsim-org / matsim-code-examples

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

Visualization of activity, volume and traffic count. #651

Open khzannat opened 2 years ago

khzannat commented 2 years ago

After the simulation in MATSim I am trying to visualize the activities, traffic volume in different scenarios. I could not find potential way to do that. Since I am a new MATSim user, it would be helpful to have some examples and code to do such visualization. Also, if I want to plot traffic count from simulation and count from the field survey then what would be the procedure to do so? In couple of publication I found it is done but I couldn't find the way to do so. TIA

mashrur93 commented 2 years ago

For visualization, you can use Via (https://simunto.com/via/). They have a manual for visualizing the output after the MATSIM run using the event.xml file. You can also extract data from there. But, I find Via more useful for visualization, not for further working with the data that generates the figures.

For that, I think the .eventsHandling package would give broader alternatives to play with the event file. However, you have to with script in java as to your need. The examples can be found in the matsim_code_examples.

For the count data of a specific link, the easiest way might be...

  1. create a count file having the hourly field data of your desired link, (The format of the file is provided in the MATSIM manual)
  2. in the config file add the "count" module, having your desired mode to analyze
  3. after the simulation run, a countscompare file is created in the last iteration folder, where the comparison can be seen, along with the hourly simulated volume.
khzannat commented 2 years ago

@mashrur93 Thank you very much for your suggestion