matsim-org / matsim-code-examples

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

Transit: Reduce the number of transfer links #174

Closed PlumeRoberts closed 5 years ago

PlumeRoberts commented 5 years ago

Hello,

I use the GTFS to create my Public Transports, but when I start running a simulation, I end up having an OutOfMemory Error during the cration of "transferlinks". It says here that it needs to add 157810707 transfer links. So I would link to know how to reduce this so MATSim could run.

I am here using MATSim 11.0 with 15000MB of RAM.

vsp-gleich commented 5 years ago

Hello,

more and more MATSim users use the new and fast Raptor router from SBB: https://github.com/SchweizerischeBundesbahnen/matsim-sbb-extensions

It is much more efficient and does not have that issue with transfer links.

PlumeRoberts commented 5 years ago

Thank you very much it really seems great. I would like to know, is it necessary to re-build everything from scratch after doing the modification to the pom.xml or is it possible to just download and install the RAPTOR router ?

vsp-gleich commented 5 years ago

Hello, I'm not sure what exactly you mean. The only steps you have to do is

  1. add repository jitpack to your pom
  2. add dependency matsim-sbb-extensions to your pom
  3. add "controler.addOverridingModule(new SwissRailRaptorModule());" to your MATSim run class
  4. click maven-update in your IDE if it has not updated automatically (which it usually does)

Besides that, changing to the SwissRailRaptor is like any other code change in your MATSim run class. Your IDE should recompile your project automatically and that's it :-) If you use JARs, you have to export it again.

You don't have to re-build anything (except the JAR file if you use one) and you don't have to manually download or install SwissRailRaptor, because maven does that for you.

PlumeRoberts commented 5 years ago

I am sorry I am not used to Maven. to which POM must I add it ? to the matsim one ?

Does it only work using MATSim 10.x or does it also work using MATSim 11.x ?

vsp-gleich commented 5 years ago

You have to add it to the repository where your run class is located. If your project (/repository) starts from cloning matsim-example-project, add it to the pom in matsim-example-project.

The Raptor router works with MATSim 11.x, too.

PlumeRoberts commented 5 years ago

I am following your instructions, and I have tried multiple times in different version on different pom.xml, but I always end up with the same error:

Missing artifact com.github.SchweizerischeBundesbahnen:matsim-sbb-extensions:jar:0.11.x

Do you know how to solve the issue ?

mrieser commented 5 years ago

There was a change in the version numbering, when MATSim switched form version 0.10.1 to version 11.0. Note that with version 11, there is no longer a leading 0. in the version. According to the error message, it still looks for version 0.11.x, which does not exist. Try it with version 11.2 for the matsim-sbb-extensions.

PlumeRoberts commented 5 years ago

It seems that when I do the modification in the pom.xml and the update, I end up getting a Build Path Error, but it doesn't show anyone. In addition, it doesn't detect the Module as installed. image

jfbischoff commented 5 years ago

Sorry, but eclipse related errors a bit out of scope of the support that we can deliver here.

That said, try to keep your projects small: Most likely checking out the whole MATSim project is not required.