Open shenlonghu opened 4 years ago
Most likely this means that agents using walk
or pt
are teleported, in which case the agents do not have a route, as the travel time is only estimated based on the beeline distance between origin and destination.
For having exact routes for pt
, you would need to enable public transport ("transit") in the config.xml and provide it the transitSchedule and transitVehicles.
Am I able to make pedestrains' trip has exact routes in MATSim? I am doing a University Campus traffic model, and I think walk is a important traffic mode here.
@shenlonghu Yes, should be possible. As a starting point, see http://ci.matsim.org:8080/job/MATSim-Book/ws/partOne-latest.pdf Chap. 7.1. There will be a couple of issues:
(1) walk
is handled in multiple special ways in MATSim. The reason is that one needs connections between activity locations and the network, and often they are not in the data model, so they are computed on the fly. I often call this "bushwhacking walk", and it is denoted as access_walk
or egress_walk
or transit_walk
or non_network_walk
or sometimes simple walk
. Unfortunately, the implementation is not totally clean. So I would strongly recommend to name the network walking mode you are interested in something else, e.g. networkWalk
.
(2) You will have to attribute the network with that mode. The above-mentioned chapter 7.1 should explain how this is done.
In terms of building the model, I would recommend something like the following:
<link ... modes="networkWalk" ... />
. Add that and make it work. car,networkWalk
everywhere including in the network file.Actually, https://github.com/matsim-org/matsim-code-examples/blob/11.x/src/main/java/org/matsim/codeexamples/integration/RunMultipleModesExample.java should be an example. Note that it is made for 11.x, so unfortunately it won't work for the 10.0 release. I think that it is possible to make work with 10.0, but finding the right combination of config settings is not totally easy. If you prefer 10.0, let me know and I will try to back-port the example. Otherwise, please consider using a weekly 11.x release.
Please keep us posted how it goes.
In output_plan.xml, when 'leg mode=walk or PT', the 'route type=generic'. What does this mean? why i can't see the path of each agent.