matsim-org / matsim-code-examples

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

use mode filtered subnetwork in DRT #581

Open elyh1992 opened 3 years ago

elyh1992 commented 3 years ago

Hi,

I've been using mode filtered subnetwork before when I was using MATSim version 12. Recently I have updated my MATSim to version 14.0-PR1512. In my network, I have two types of links, and two types of drt modes called drt1 and drt2. some of the links are allowed for both drt1 and drt2 modes and some of them are only allowed for drt2 modes. After updating MATSim when I run the code with exact same files the links that are only allocated to drt2 are not used by agents in the updated matsim version (no users for them when checking link stats). Have anything changed in the mode filter subnetwork configuration in the new MATSim version? Do you have any suggestions about how to solve this problem?

Thank you for your help.

michalmac commented 3 years ago

If you could share the config file, I will have a look and see if it is OK.

elyh1992 commented 3 years ago

If you could share the config file, I will have a look and see if it is OK.

Hi,

Thank you for your response. Here is the config file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">

michalmac commented 3 years ago

You need to have both <parameterset type="drt"> under one <module name="multiModeDrt">. Currently you have two multiModeDrt modules defined.

See this example with 3 drt modes: https://github.com/matsim-org/matsim-libs/blob/522c59a294483c109bed6dcd561819084c755b2b/examples/scenarios/dvrp-grid/multi_mode_one_shared_taxi_config.xml#L10-L61