matsim-code-examples
matsim-code-examples copied to clipboard
Whether links and nodes are both correct to be used to describe a route in the plan.xml file
Hello,
In the official tutorial of MATSim, there is a sentence to explain the field "route": For car legs, the route lists the links the agent has to traverse in the given order. However, I found that the route in the plan100.xml file of the "equil" scenario, the route lists the nodes (e.g., the last leg of person "1",
Good catch! Actually, it used to be nodes in the past, but this is not always unambiguous (there could be more than one link connecting two nodes in special cases). So we changed to use links instead of nodes a few years ago. The aforementioned plan100.xml uses the rather old format "plans_v4.dtd" which assumes nodes in the routes. Newer formats like "population_v5.dtd" and "population_v6.dtd" use links instead.
As MATSim still supports such old input formats, it still works. MATSim automatically converts the route when loading such an old file into the newer format.
@mrieser Sir, where can I get access to newer format that you mentioned. Although I have created my network including nodes and links, still if the newer format has only links it would be easier for me to process data for analysis in a big city. Thankyou
@aayushtewari01 if you have a network and a working plans file, just run a simulation with it. The output_plans.xml file will be in the newest version, i.e. population_v6, which contains the links in the routes instead of nodes.