Code Monkey home page Code Monkey logo

Comments (4)

cnabu avatar cnabu commented on September 23, 2024

Hi, I'm beginner to MATSim as well. I try and run your scenario it says you're missing transitVehicles.xml. Just off the top of my head, by looking at your config.xml file I can see that 10% of your agents are allowed to change their departure time, perhaps that's the reason.

from matsim-code-examples.

Janekdererste avatar Janekdererste commented on September 23, 2024

@cnabu is correct. Your config references a transitVehicles file on L114

<param name="vehiclesFile" value="transitVehicles.xml" />

At least for the files you have provided here, it is missing. I would recommend the user guide section 12.

from matsim-code-examples.

mina11so avatar mina11so commented on September 23, 2024

Thank you both for your responses. I will share the transitVehicles.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<vehicleDefinitions xmlns="http://www.matsim.org/files/dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.matsim.org/files/dtd http://www.matsim.org/files/dtd/vehicleDefinitions_v1.0.xsd">
<vehicleType id="1">
   <description>pt</description>
   <capacity>
      <seats persons="50"/>
      <standingRoom persons="100"/>
   </capacity>
   <length meter="12"/>
</vehicleType>
<vehicle id="1000" type="1"/>
<vehicle id="2000" type="1"/>
<vehicle id="6000" type="1"/>
<vehicle id="7000" type="1"/>
</vehicleDefinitions>

I'm particularly concerned about why a plan that does not align with the set train schedules is being selected in the output file. For example, in the 50.plans.xml, an agent is shown to board a train at 09:09:10 under trnsitRouteId 'local', even though the 'local' train is supposed to depart at 09:00:00. This timing does not match any train schedules.

Additionally, there seems to be a discrepancy between the output_plans.xml file and the output_events.xml file from the same iteration, where the travel and departure times differ. Is it normal for the output plans.xml file to differ from the simulation results in the events.xml file? Would increasing the number of iterations help the output plans.xml and events.xml files to converge on similar timings?

from matsim-code-examples.

JWJoubert avatar JWJoubert commented on September 23, 2024

@mina11so, remember that the plans.xml file is exactly that: what the agent plans to do (his/her intention). The agent then tries to execute that plan, and the actual events are what is reported in the events.xml file.

That might explain why your agent presents with an unreasonable plan: planning to take a train that already left might result in being stuck at the station.

There is an option in the Config, if I recall correctly (maybe it is activated by default, but I doubt it) that you can set to also write the experienced plans. To my knowledge, this then reverse engineers the events.xml file into a format that reports the actual experienced sequence of events, for each agent, in a format that is readable to you and me: a plans.xml file format.

But, to emphasise, there is a difference (that is the value of MATSim, in my view) between what agents plan to do and how those plans turn out in practice (the mobility simulation).

I hope that helps somewhat.

from matsim-code-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.