Dear experts,

After some attempts (see here and here), I have finally managed to run an example with the parking extension. The logfiles are attached to this message.

However looking at the output files, both with a text editor and with Senozon Via, it doesn't seem to me that the vehicles are actually using or occupying the parking facilities. How can I make sure? I have also attached the output_events.xml.

Thanks a lot.




Edit: Rephrasing the question, I do visualize activities called "car interaction" in nodes more or less close to parking facilities (whose position are defined on a link, plus x and y coordinates).

  1. So why do the cars interact with different nodes? Are they randomly chosen around the position of the parking facility?
  2. Is the "capacity" of each facility taken into account in any way? If yes, can I access to the occupancy of the facility as a function of time?
    CommentAdd your comment...

    1 answer


      Dear Florian,

      facilities in MATSim are used by agents, not by vehicles.

      For the parkingSearch integration, we decided to use the facility container on each link to set the number of parking spaces allocated to each link, mainly because the container allows to store all the informations needed (i.e., a link ID and the capacity) and readers/writers are readily available.

      However, the agents do not use the facilities (in a MATSim sense) for their parking interaction. The reason for this is quite easy: A parking interaction only takes a couple of seconds (60 per default), then the agent walks to the actual place of its next activity, meaning it has left the facility.

      However, you can easily analyze all kind of parking related questions directly from the events.
      The contrib contains some analysis code, not all of it is used by default though: https://github.com/matsim-org/matsim/tree/de704479e15739b39187b298efa0b97e29be3d58/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingsearch/evaluation

      For an idea on how to use it, see


      (Basically, it is somwhat similar to all kinds of event handling in post processing).
      It also includes some code that creates CSVs that allow for a visualisation in VIA.

      As to your second question:
      Activities do not occur on nodes, but on links. Precisely, vehicles leave a link somewhere near the end of it (by default). VIAs default visualisation is then indeed near the node.

      Best wishes,


      1. Florian Zenoni

        Dear Joschka,

        Thank you very much for your answer. I played around with a basic simulation (the example coming with the Parking extension) and your RunParkingEvaluation class, and now I have a question.

        Having a look at the generated carPositions.csv file, I tried to put together the "history" of a single vehicle. This is what I get for, say, vehicle 0:

        Vehicle parkTime unparkTime   LinkId         X    Y
        1:       0        0      25260 114.0000 -347.2913 -800
        2:       0    25650      28860 207.8963 -200.0000   NA
        3:       0    29165     108000 114.0000 -332.6710 -800

        Steps 1 and 3 seem OK. Step 2, however is definitely weird: first of all, the LinkId is not a integer (which shouldn't make any sense), and its Y coordinate is missing. I tried tracing the problem back to the ParkedVehicleVisualiser class, but I couldn't find any obvious bug (but again, I am really inexperienced with Java). The difference between unparkTime and parkTime is a little bit less than an hour, though, which is consistent with the population100.xml input file, so that's fine.

        Did I maybe miss anything?



      2. Florian Zenoni

        This is embarrassing but I think that during the csv parsing I mindlessly assigned the NA value to Y instead of LinkId. Putting the missing value at the right position seems to solve the issue.

        Maybe, could you tell me if there is a reason why the finishDay method in the ParkedVehicleVisualiser class sets the unparkTime at 30 hours instead of 24?

      3. Joschka Bischoff


        sorry for the late reply, I somehow overlooked this post.

        In most of our use cases, the simulation end time is at 30 hours, rather than 24. But I agree that this should be a switch rather than hard coded (smile)

        We are currently working on more parking analysis code, so we might revise it all a bit in the next weeks and months.


      CommentAdd your comment...