matsim-org / matsim-code-examples

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

Modelling walks inside a shopping mall #207

Closed zekechan1 closed 4 years ago

zekechan1 commented 5 years ago

Hi First of all, thank you for creating this wonderful software. I'd like to model shopper walk paths inside a shopping mall. So there will be no vehicles other than walks. What is the best approach to do this? And are there any example files that I can use as a template?

Best

Zeke

JWJoubert commented 5 years ago

Hi @zekechan1 I'm not so sure MATSim would be the right tool choice in your case. Indeed, MATSim is a VERY competent (and elegant) piece of machinery. But the resolution at which you seem to model is in my view, a bit too low.

Have you looked into AnyLogic, and specifically its pedestrian library as an alternative?

zekechan1 commented 4 years ago

Thank you so much for the quick reply. I'll definitely look into AnyLogic - and if you have experience with other useful libraries please let me know. Let's say if I am not into very high resolution, can MATsim do pedestrian modelling? And is there any example/template that I can look at? Many thanks Zeke

JWJoubert commented 4 years ago

Let's say if I am not into very high resolution, can MATsim do pedestrian modelling? And is there any example/template that I can look at?

Have a look at the evacuation models developed for Padang. I believe Dr Gregor Lämmel created a free-standing library (built on MATSim) for (pedestrian) evacuation modelling, but you should be able to Google it.

zekechan1 commented 4 years ago

Thank you I've looked at the evacuation model by Dr Lammel. It seems that there is no source code, only jar files.

kainagel commented 4 years ago

The evacuation example is in some sense the right idea since it in fact dealt with pedestrians. However, the code is fairly old and so I am not sure if it would be a good starting point.

Have you looked at https://matsim.org/downloads/ ? Would you rather "Use MATSim as a programmer out of an IDE" or "Use the MATSim GUI"? How far did you get?

Reason I am asking: If you are able to run the "equil" example, then you essentially have enough to see how the matsim network and the matsim plans file look like.

And from that you could decide if it makes sense to go in this direction.

Or are you still at the level of just collecting information?

zekechan1 commented 4 years ago

Hi, thank you for the reply. I have been using MATsim for quite a while now as a programmer. I am now using both 0.10.1 and 0.11.x, and I can run most modules. I've downloaded "Evacuationm 0.9 snapshot" separately but I find that there is no source code, only jar files. I also cannot run it. So any tips to run a pedestrians model will be welcome. Thanks, Zeke

kainagel commented 4 years ago

Thanks for the info. If you already somewhat know matsim, I would just start it from scratch. I don't have time to look it up right now, but essentially we transformed the car-oriented link model to pedestrians. You would need to play around what works best with current infrastructure. Two options:

  1. One option would be to have a "pedestrian vehicle type", and an accordingly small pce (passenger car equivalent), and go from there.
  2. Another option would be to assume that you now think in units of "pedestrians". Then capacity would just be "pedestrians per hour". Storage capacity in general is length_of_link x number_of_lanes / cell_size. The last two are in the "links" element in the network file, and so you could just reduce them to values that make sense for pedestrians (e.g. 0.5 and 0.5).

In the older days, we used 2.; 1. would not have been possible with the infrastructure at that point in time. RI would go with 1. if I was planning to eventually combine it with other modes (e.g. bicycle/car), since otherwise you end up expressing everything in units of pedestrians, while the typical approach is to express everything in units of cars (pce). Otherwise, I would try around, but even then I would probably lean towards 1.

We reverse engineered the necessary link numbers from shape files:

After writing this up, I have to say that it might be more straightforward to have a pedestrian pce and leave width_of_lane and cell_size alone. The pce would be 1 divided by "number of people you can have in 7.5 x 3.75 meters". Number of lanes would be "most narrow width divided by 3.75". Flow capacity would have to be "number of pedestrians per hour" multiplied by pce.

Does this help a bit to get started? The dissertation of Gregor Lämmel (see https://www.vsp.tu-berlin.de/publications/vspwp ) should also be able to give details on these things.


Evidently, you would need to convert your shopping mall into a graph model. Multiple levels will be a bit of a challenge to visualize.

===

The evacuation app base code is, I think, here: https://github.com/matsim-org/evacuation-web-app .

zekechan1 commented 4 years ago

Hi Kaingel, Thank you so much for the very detailed reply. Much appreciated. I'll look into the method you described. It does appear to me that MATsim is more suited for large scale vehicle simulation, rather than indoor pedestrian flow. Thank you for creating such wonderful software! Zeke