matsim-org / matsim-code-examples

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

Teleportation #66

Closed Hamadneh closed 5 years ago

Hamadneh commented 5 years ago

When I write this:

I got error says pt is included, walk, is include, and when I change it to

<module name="planscalcroute">
    <param name="beelineDistanceFactor" value="1.3" />
    <param name="networkModes" value="car" />
    <param name="teleportedModeFreespeedFactor_pt" value="2.0" />
    <param name="teleportedModeSpeed_bike" value="6.01" />
    <param name="teleportedModeSpeed_undefined" value="13.88888888888889" />
    <param name="teleportedModeSpeed_walk" value="1.34" />  

</module>

it take time and consumed all my laptop memory without any results, the log file is:

2019-01-06 13:56:35,954 INFO Gbl:59 JVM: 1.8.0_192; Oracle Corporation; mixed mode; 64-bit 2019-01-06 13:56:35,954 INFO Gbl:63 OS: Windows 10; 10.0; amd64 2019-01-06 13:56:35,955 INFO Gbl:66 CPU cores: 4 2019-01-06 13:56:35,955 INFO Gbl:67 max. Memory: 5461.5MB (5726797824B) 2019-01-06 13:56:35,957 INFO Gbl:105 MATSim-Build: r2e52cf1f54a31596d20f378d536f9dd7a0a860bb (2018-08-25 22:17:05) 2019-01-06 13:56:35,959 INFO ControlerListenerManagerImpl:107 calling notifyStartup on org.matsim.counts.CountsControlerListener 2019-01-06 13:56:35,960 INFO ControlerListenerManagerImpl:107 calling notifyStartup on org.matsim.analysis.ModeStatsControlerListener 2019-01-06 13:56:35,963 INFO TransitRouterNetwork:407 start creating transit network 2019-01-06 13:56:35,965 INFO Counter:61 node #1 2019-01-06 13:56:35,966 INFO Counter:61 node #2 2019-01-06 13:56:35,969 INFO Counter:61 link #1 2019-01-06 13:56:35,970 INFO Counter:61 link #2 2019-01-06 13:56:35,971 INFO Counter:61 node #4 2019-01-06 13:56:35,971 INFO Counter:61 link #4 2019-01-06 13:56:35,972 INFO Counter:61 node #8 2019-01-06 13:56:35,973 INFO Counter:61 link #8 2019-01-06 13:56:35,973 INFO Counter:61 node #16 2019-01-06 13:56:35,974 INFO Counter:61 link #16 2019-01-06 13:56:35,974 INFO Counter:61 node #32 2019-01-06 13:56:35,975 INFO Counter:61 link #32 2019-01-06 13:56:35,978 INFO Counter:61 node #64 2019-01-06 13:56:35,980 INFO Counter:61 link #64 2019-01-06 13:56:35,981 INFO Counter:61 node #128 2019-01-06 13:56:35,983 INFO Counter:61 link #128 2019-01-06 13:56:35,984 INFO Counter:61 node #256 2019-01-06 13:56:35,985 INFO Counter:61 link #256 2019-01-06 13:56:35,986 INFO Counter:61 node #512 2019-01-06 13:56:35,987 INFO Counter:61 link #512 2019-01-06 13:56:35,989 INFO Counter:61 node #1024 2019-01-06 13:56:35,990 INFO Counter:61 link #1024 2019-01-06 13:56:35,992 INFO Counter:61 node #2048 2019-01-06 13:56:35,992 INFO Counter:61 link #2048 2019-01-06 13:56:35,998 INFO Counter:61 node #4096 2019-01-06 13:56:36,000 INFO Counter:61 link #4096 2019-01-06 13:56:36,016 INFO Counter:61 node #8192 2019-01-06 13:56:36,020 INFO Counter:61 link #8192 2019-01-06 13:56:36,037 INFO Counter:61 node #16384 2019-01-06 13:56:36,041 INFO Counter:61 link #16384 2019-01-06 13:56:36,080 INFO Counter:61 node #32768 2019-01-06 13:56:36,082 INFO Counter:61 link #32768 2019-01-06 13:56:36,167 INFO TransitRouterNetwork:433 add transfer links 2019-01-06 13:57:46,264 INFO TransitRouterNetwork:449 65996383 transfer links to be added. 2019-01-06 13:57:46,456 INFO Counter:61 link #65536 2019-01-06 13:57:47,334 INFO Counter:61 link #131072 2019-01-06 13:58:15,534 INFO Counter:61 link #262144 2019-01-06 13:58:18,174 INFO Counter:61 link #524288 2019-01-06 13:58:24,248 INFO Counter:61 link #1048576 2019-01-06 13:58:41,291 INFO Counter:61 link #2097152 2019-01-06 14:01:18,337 INFO Counter:61 link #4194304

Any help

kainagel commented 5 years ago

Looks like (way) too many transfer links. There is some config switch in the transit section that reduces the transfer radius, try setting that to a (much) smaller value.

polettif commented 5 years ago

Alternatively, the schedule is in the wrong coordinate system and too many stops (in lat/lon) are within the search radius, see #63

Hamadneh commented 5 years ago

/I checked the used coordinates and they are:

I followed your answers above and they work but I got the following log file warning:

2019-01-07 12:49:18,388 WARN PersonPrepareForSim:99 Person 3 has no plans! 2019-01-07 12:49:18,389 WARN PersonPrepareForSim:99 Person 4 has no plans! 2019-01-07 12:49:18,391 WARN PersonPrepareForSim:99 Person 5 has no plans! 2019-01-07 12:49:18,391 WARN PersonPrepareForSim:99 Person 7 has no plans! 2019-01-07 12:49:18,390 WARN PersonPrepareForSim:99 Person 6 has no plans! 2019-01-07 12:49:18,392 WARN PersonPrepareForSim:99 Person 9 has no plans! 2019-01-07 12:49:18,392 WARN PersonPrepareForSim:99 Person 11 has no plans! 2019-01-07 12:49:18,393 WARN PersonPrepareForSim:99 Person 13 has no plans! 2019-01-07 12:49:18,392 WARN PersonPrepareForSim:99 Person 8 has no plans! 2019-01-07 12:49:18,395 WARN PersonPrepareForSim:99 Person 10 has no plans! 2019-01-07 12:49:18,395 WARN PersonPrepareForSim:99 Person 12 has no plans! 2019-01-07 12:49:18,394 WARN PersonPrepareForSim:99 Person 15 has no plans! 2019-01-07 12:49:18,395 WARN PersonPrepareForSim:99 Person 17 has no plans! 2019-01-07 12:49:18,395 WARN PersonPrepareForSim:99 Person 19 has no plans! 2019-01-07 12:49:18,396 WARN PersonPrepareForSim:99 Person 21 has no plans! 2019-01-07 12:49:18,395 WARN PersonPrepareForSim:99 Person 14 has no plans! 2019-01-07 12:49:18,398 WARN PersonPrepareForSim:99 Person 23 has no plans! 2019-01-07 12:49:18,398 WARN PersonPrepareForSim:99 Person 16 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 18 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 20 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 22 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 24 has no plans! 2019-01-07 12:49:18,398 WARN PersonPrepareForSim:99 Person 25 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 27 has no plans! 2019-01-07 12:49:18,399 WARN PersonPrepareForSim:99 Person 26 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 29 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 31 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 28 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 30 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 32 has no plans! 2019-01-07 12:49:18,400 WARN PersonPrepareForSim:99 Person 33 has no plans! 2019-01-07 12:49:18,401 WARN PersonPrepareForSim:99 Person 35 has no plans! 2019-01-07 12:49:18,401 WARN PersonPrepareForSim:99 Person 37 has no plans! 2019-01-07 12:49:18,401 WARN PersonPrepareForSim:99 Person 39 has no plans! 2019-01-07 12:49:18,401 WARN PersonPrepareForSim:99 Person 41 has no plans! 2019-01-07 12:49:18,401 WARN PersonPrepareForSim:99 Person 34 has no plans! 2019-01-07 12:49:18,402 WARN PersonPrepareForSim:99 Person 43 has no plans! 2019-01-07 12:49:18,402 WARN PersonPrepareForSim:99 Person 36 has no plans! 2019-01-07 12:49:18,403 WARN PersonPrepareForSim:99 Person 45 has no plans! 2019-01-07 12:49:18,403 WARN PersonPrepareForSim:99 Person 38 has no plans! 2019-01-07 12:49:18,403 WARN PersonPrepareForSim:99 Person 40 has no plans! 2019-01-07 12:49:18,404 WARN PersonPrepareForSim:99 Person 42 has no plans! 2019-01-07 12:49:18,404 WARN PersonPrepareForSim:99 Person 44 has no plans! 2019-01-07 12:49:18,473 WARN MGC:175 Assuming that coordinates are in longitude first notation, i.e. (longitude, latitude). 2019-01-07 12:49:18,473 WARN MGC:175 Assuming that coordinates are in longitude first notation, i.e. (longitude, latitude). 2019-01-07 12:49:18,487 ERROR AbstractController:203 Mobsim did not complete normally! afterMobsimListeners will be called anyway. java.lang.NullPointerException at org.matsim.core.population.io.PopulationWriterHandlerImplV6.startRoute(PopulationWriterHandlerImplV6.java:239) at org.matsim.core.population.io.PopulationWriterHandlerImplV6.writePerson(PopulationWriterHandlerImplV6.java:94) at org.matsim.core.population.io.PopulationWriter.writePerson(PopulationWriter.java:182) at org.matsim.core.population.io.PopulationWriter.writePersons(PopulationWriter.java:173) at org.matsim.core.population.io.PopulationWriter.write(PopulationWriter.java:137) at org.matsim.core.population.io.PopulationWriter.writeV6(PopulationWriter.java:207) at org.matsim.api.core.v01.population.PopulationWriter.writeV6(PopulationWriter.java:108) at org.matsim.api.core.v01.population.PopulationWriter.write(PopulationWriter.java:78) at org.matsim.core.controler.corelisteners.PlansDumpingImpl.notifyBeforeMobsim(PlansDumpingImpl.java:90) at org.matsim.core.controler.ControlerListenerManagerImpl.fireControlerBeforeMobsimEvent(ControlerListenerManagerImpl.java:225) at org.matsim.core.controler.AbstractController$6.run(AbstractController.java:184) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:181) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:28) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.run.Controler.run(Controler.java:56) at org.matsim.run.Controler.main(Controler.java:60) 2019-01-07 12:49:18,493 ERROR MatsimRuntimeModifications:54 Getting uncaught Exception in Thread main java.lang.NullPointerException at org.matsim.core.population.io.PopulationWriterHandlerImplV6.startRoute(PopulationWriterHandlerImplV6.java:239) at org.matsim.core.population.io.PopulationWriterHandlerImplV6.writePerson(PopulationWriterHandlerImplV6.java:94) at org.matsim.core.population.io.PopulationWriter.writePerson(PopulationWriter.java:182) at org.matsim.core.population.io.PopulationWriter.writePersons(PopulationWriter.java:173) at org.matsim.core.population.io.PopulationWriter.write(PopulationWriter.java:137) at org.matsim.core.population.io.PopulationWriter.writeV6(PopulationWriter.java:207) at org.matsim.api.core.v01.population.PopulationWriter.writeV6(PopulationWriter.java:108) at org.matsim.api.core.v01.population.PopulationWriter.write(PopulationWriter.java:78) at org.matsim.core.controler.corelisteners.PlansDumpingImpl.notifyBeforeMobsim(PlansDumpingImpl.java:90) at org.matsim.core.controler.ControlerListenerManagerImpl.fireControlerBeforeMobsimEvent(ControlerListenerManagerImpl.java:225) at org.matsim.core.controler.AbstractController$6.run(AbstractController.java:184) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:181) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:28) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.run.Controler.run(Controler.java:56) at org.matsim.run.Controler.main(Controler.java:60) 2019-01-07 12:49:18,496 ERROR MatsimRuntimeModifications:60 ERROR --- This is an unexpected shutdown! 2019-01-07 12:49:18,496 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception: java.lang.NullPointerException at org.matsim.core.population.io.PopulationWriterHandlerImplV6.startRoute(PopulationWriterHandlerImplV6.java:239) at org.matsim.core.population.io.PopulationWriterHandlerImplV6.writePerson(PopulationWriterHandlerImplV6.java:94) at org.matsim.core.population.io.PopulationWriter.writePerson(PopulationWriter.java:182) at org.matsim.core.population.io.PopulationWriter.writePersons(PopulationWriter.java:173) at org.matsim.core.population.io.PopulationWriter.write(PopulationWriter.java:137) at org.matsim.core.population.io.PopulationWriter.writeV6(PopulationWriter.java:207) at org.matsim.api.core.v01.population.PopulationWriter.writeV6(PopulationWriter.java:108) at org.matsim.api.core.v01.population.PopulationWriter.write(PopulationWriter.java:78) at org.matsim.core.controler.corelisteners.PlansDumpingImpl.notifyBeforeMobsim(PlansDumpingImpl.java:90) at org.matsim.core.controler.ControlerListenerManagerImpl.fireControlerBeforeMobsimEvent(ControlerListenerManagerImpl.java:225) at org.matsim.core.controler.AbstractController$6.run(AbstractController.java:184) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:181) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:28) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.run.Controler.run(Controler.java:56) at org.matsim.run.Controler.main(Controler.java:60) 2019-01-07 12:49:18,501 ERROR MatsimRuntimeModifications:78 ERROR --- MATSim unexpectedly terminated. Please check the output or the logfile with warnings and errors for hints. 2019-01-07 12:49:18,501 ERROR MatsimRuntimeModifications:79 ERROR --- results should not be used for further analysis. 2019-01-07 12:49:18,502 ERROR MatsimRuntimeModifications:83 ERROR --- This was an unexpected shutdown! See the log file for a possible reason.

How can I let the MATSim recognize my plans? <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE plans SYSTEM "homettp://workworkwork.matsim.org/files/dtd/plans_v4.dtd">

41 ..... ... .
polettif commented 5 years ago

/I checked the used coordinates and they are:

  • the network from OpenStreetMap (GTFS) and I included the coordinate EPSG:4237 in the global module.
  • Facilities are in longitude and latitude format so no changes in coordinates!?
  • plans coordinates are based on HD_1972_Egyseges_Orszagos_Vetuleti_TOWGS (Hungarian Datum 1972); should I insert in config file? if yes how can I find the right coordinate based on MATSim understanding?

You should use the same projected coordinate system (one that uses meter) for all MATSim input files (plans, facilities, schedule, network, ...) to minimize possible problems. There should be coordinate converters for all those xml files. It's best you find the EPSG code for the Hungarian system you use and convert the WGS84/EPSG:4237 coordinates (which is not a projected coordinate system). I guess the plans problem is related, shouldn't be included in this issue though.

tduberne commented 5 years ago

Please refer to my previous answer to see how to convert coordinate systems: https://github.com/matsim-org/matsim-code-examples/issues/63#issuecomment-451086182

In short: find the epsg code of your coordinate system (probably epsg:6237, see http://epsg.io/6237-datum) and put it in the "global" config group, parameter "coordinateSystem". Make sure it is a metric coordinate system valid for your area. Then add the CRS metadata to all your files (in the file itself if your version of MATSim is recent enough).

Hamadneh commented 5 years ago

Thanks for your replies. I followed your instructions and I checked manually the coordinates of my files and I found the following: plans/population is the same coordinates of network (projected coordinate system-metric). Transitschedule file has different metric coordinate which I do not understand I am still have no trips! in the following link you find my files: https://www.dropbox.com/s/hhy9nuhc6kyizu1/Test.rar?dl=0

Could you please have a look and tell me if there is something critical I do not know it, please

kainagel commented 5 years ago

I can't run it from the files that are in Test.rar; some files mentioned in the config are missing.

One thing that immediately happens is

2019-01-09 12:29:50,923  INFO MatsimXmlParser:160 starting to parse xml from url file:/Users/kainagel/kairuns/budapest-hamadneh/planf.xml ...
2019-01-09 12:29:50,928  INFO PopulationReader:138 using plans_v4-reader.
2019-01-09 12:29:50,928  INFO MatsimXmlParser:275 Trying to load http://www.matsim.org/files/dtd/plans_v4.dtd. In some cases (e.g. network interface up but no connection), this may take a bit.
2019-01-09 12:29:50,993  INFO ParallelPopulationReaderMatsimV4:138 Start parallel population reading...
null
file:/Users/kainagel/kairuns/budapest-hamadneh/planf.xml
null
Element type "attributes" must be declared.
Element type "attributes" must be declared.
XML-ERROR: file:/Users/kainagel/kairuns/budapest-hamadneh/planf.xml, line 5, column 13:
org.xml.sax.SAXParseException; systemId: file:/Users/kainagel/kairuns/budapest-hamadneh/planf.xml; lineNumber: 5; columnNumber: 13; Element type "attributes" must be declared.
[WARNING]

The reason is that the attributes section (which contains the coordinate system) is not allowed in plans format v4.

So it smells a bit like an inconsistency problem: In order to use new features of matsim, one needs a new version of the code (which you may or may not have), and one has to use the new file formats. (We usually keep parsing the older versions, but evidently they do not support the newer features.)

If your version of matsim is new enough, you can define the different coordinate systems of the different input files in config.xml.


Your coordinate systems are in fact inconsistent: First node in network file

<node id="1000027817" x="2109724.9968952355" y="6018105.135086829" >

; first activity in plans file:

      <act type="home" x="240146.3509" y="649176.953" start_time="17:09:00" dur="14:50:00" end_time="8:00:00" />

Clearly, the network is in the (2mio,6mio) range, while the activities are in the (200k,600k) range.

On 9. Jan 2019, at 12:14, Hamadneh notifications@github.com<mailto:notifications@github.com> wrote:

Thanks for your replies. I followed your instructions and I checked manually the coordinates of my files and I found the following: plans/population is the same coordinates of network (projected coordinate system-metric). Transitschedule file has different metric coordinate which I do not understand I am still have no trips! in the following link you find my files: https://www.dropbox.com/s/hhy9nuhc6kyizu1/Test.rar?dl=0

Could you please have a look and tell me if there is something critical I do not know it, please

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/matsim-org/matsim-code-examples/issues/66#issuecomment-452660965, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIXvsU92VajckEU5tGI8z8hNOBGOQXC3ks5vBc8egaJpZM4Zyddh.

==============================================================

Use MATSim through an IDE (e.g. eclipse or intellij):

Use MATSim as a standalone executable:

See


www.vsp.tu-berlin.dehttp://www.vsp.tu-berlin.de +49 30 314 23308 (phone) +49 30 314 26269 (fax) TU Berlin Sekr. SG 12, Salzufer 17-19, 10587 Berlin

Hamadneh commented 5 years ago

I tried to solve them and I found the followings: facilities and tranistschedule coordinate sys. is: European Datum 1950 UTM Zone 33N which equivalent to EPSG: 23033! network and plans: coordinate sys. is: WGS_1984_Web_Mercator_Auxiliary_Sphere which equivalent to EPSG: 3857

I used them in config file and I did not get any iteration!

attached is full package of my files and I downloaded the MATSsim version since one month ago.

https://www.dropbox.com/s/99ybg5ml7nmn52c/Test-02.rar?dl=0

Could you please try to run it and tell me what problems do I have, please?

kainagel commented 5 years ago

Dear Hamadneh,

A number of problems on top of each other.

(1) First, I set useTransit to false. Debug problems one by one.

(2) The plans parser hicks up on empty activities and empty legs (of type <act type="" .../>). ➝ remove them. The error message is admittedly not very helpful, but plans v4 is also two generations back and I don't want to go back there and improve things. If the current version of the parser is shown to have the same non-helpfulness, we will fix it. :-)

(3) Then, the mobsim hicks up on " ". MATSim takes existing routes literally, so it is looking for a node or link with ID " ", and that does not exist. ➝ remove those routes completely, including the xml tags. If there are no routes at all, MATSim will compute them.

(4) Next, it turns out that most of your activities are not defined so scoring hicks up. Note that you need to be consistent with your spelling; "education" is not the same as "Education".

After that, it runs through. However, there remains a coordinate system problem. Possibly, plans_v4 is too old, and the coordinate transformation trick does not work but that is just speculation. I set the global coordinate system to the same epsg code as the plans (and network) coordinate system, and that now seems to give meaningful results. (It looks like the network and the plans are now in the same coordinate system to begin with, so I am just using that one without transformation.)

For your convenience, the config and plans files with which it works for me are attached. I am using matsim-0.11.0-SNAPSHOT, but it should also work with matsim-0.10.1. Note that this just makes it functional; you will have to define your own scoring parameters for the new activities (or write the existing ones with caps, I don't know).

I would also recommend to use "car" instead of "CAR" as mode.

I haven't started with transit since I think there is already enough to sort out. :-)

I hope you have something to visualize results. VIA should still work with the small number of agents that you currently have.

Best wishes

Kai

files.zip

Hamadneh commented 5 years ago

thanks so much for your help. I do not find the attachments

kainagel commented 5 years ago

It swallowed them from my email. Now attached.

tduberne commented 5 years ago

After that, it runs through. However, there remains a coordinate system problem. Possibly, plans_v4 is too old, and the coordinate transformation trick does not work but that is just speculation.

As I said in #63, I had issues with capitalization in EPSG codes: "epsg:1234" worked, but "EPSG:1234" did not. Maybe try again with lower case.

I thought it was just the way geotools worked, but looking at the documentation, it should not cause problems... And looking at MATSim code, everything geotools understands should be understood. We will need to fix this in the future. In the meantime, be aware of this issue and keep an eye open when using this feature. Sorry about that.

Hamadneh commented 5 years ago

Thanks for valuable comments and directions. Here I converted the coordinates of transitschedule, so now all files are in the same coordinates EPSG: 3857. I reviewed some examples and I found that my transit schedule file includes tram and bus modes not only pt mode as in examples. I tried to reflect this in config file as well as in plans file but unfortunately it gives errors!
I attached to you the plans and transitschedule xml files to tell me what is the problem, please.

Yes, you can used the same files that i sent you before and replace these three files (one plans with mode called pt and another with detailed mode containing tram, bus and metro, the last is transit schedule xml file with new coordinates ESPG 3857)

https://www.dropbox.com/s/21y6f2s9f3juwvq/3files.zip?dl=0

*****the attached file contains bus and tram modes not pt neither metro as well!

Thanks in advance for your help

miilljana commented 3 years ago

Hi everyone,

I need help. I'm working on Helsinki scenario. My simulation works okay without pt. The next step is to add public transport to the simulation, so I need to generate a multimodal network and map the unmapped schedule file which I obtained from gtfs. For this purpose I'm using pt2matsim. When I use the output network and schedule files generated with pt2matsim, my sim runs out of memory. Here is part of the output:

2021-01-18T14:13:09,715 INFO TransitRouterNetwork:428 add transfer links 2021-01-18T14:13:21,773 INFO TransitRouterNetwork:444 57178228 transfer links to be added. 2021-01-18T14:13:22,764 INFO Counter:69 link #524288 2021-01-18T14:13:24,884 INFO Counter:69 link #1048576 2021-01-18T14:13:30,632 INFO Counter:69 link #2097152 2021-01-18T14:13:40,076 INFO Counter:69 link #4194304 2021-01-18T14:14:12,811 INFO MemoryObserver:41 used RAM: 4756 MB free: 339 MB total: 5096 MB 2021-01-18T14:14:14,185 INFO Counter:69 link #8388608

According to the answers above, the problem is in the CRS? Any solutions?

input.zip

mrieser commented 3 years ago

Try to use the SwissRailRaptor as public transit router, which is much faster and uses much less memory. The SwissRailRaptor is part of MATSim-core, documentation is available here: https://github.com/matsim-org/matsim-libs/tree/master/contribs/sbb-extensions. Best is to have a look at RunSBBExtension to see how to enable the SwissRailRaptor in code.

miilljana commented 3 years ago

Thank you it helped me. Now I have simulation that works with public transport. I'm testing it with only one agent. It works okay for car/walk mode, but unfortunately when I assign pt as a leg mode, I got the following exception:

2021-01-20T19:15:12,458 INFO AbstractController$9:226 ### ITERATION 0 fires after mobsim event 2021-01-20T19:15:12,458 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on org.matsim.analysis.LegTimesControlerListener 2021-01-20T19:15:12,451 ERROR QSim:357 got exception while cleaning up java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "org.matsim.core.mobsim.qsim.qnetsimengine.AbstractQNetsimEngine.getQnetsimEngineRunner()" is null at org.matsim.core.mobsim.qsim.qnetsimengine.AbstractQNetsimEngine.afterSim(AbstractQNetsimEngine.java:185) ~[classes/:?] at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:354) [classes/:?] at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:274) [classes/:?] at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:124) [classes/:?]

Can you please explain me why the engine is null? As I followed this trace the engines in the QSim before cleaning up are: [org.matsim.core.mobsim.qsim.ActivityEngineDefaultImpl@68d4881e, org.matsim.core.mobsim.qsim.qnetsimengine.QNetsimEngineWithThreadpool@2eb35dd1, org.matsim.core.mobsim.qsim.DefaultTeleportationEngine@4f542be3, org.matsim.core.mobsim.qsim.pt.TransitQSimEngine@4c9e6ab]

BhuminTechakul commented 4 weeks ago

Thank you it helped me. Now I have simulation that works with public transport. I'm testing it with only one agent. It works okay for car/walk mode, but unfortunately when I assign pt as a leg mode, I got the following exception:

2021-01-20T19:15:12,458 INFO AbstractController$9:226 ### ITERATION 0 fires after mobsim event 2021-01-20T19:15:12,458 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on org.matsim.analysis.LegTimesControlerListener 2021-01-20T19:15:12,451 ERROR QSim:357 got exception while cleaning up java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "org.matsim.core.mobsim.qsim.qnetsimengine.AbstractQNetsimEngine.getQnetsimEngineRunner()" is null at org.matsim.core.mobsim.qsim.qnetsimengine.AbstractQNetsimEngine.afterSim(AbstractQNetsimEngine.java:185) ~[classes/:?] at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:354) [classes/:?] at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:274) [classes/:?] at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:124) [classes/:?]

Can you please explain me why the engine is null? As I followed this trace the engines in the QSim before cleaning up are: [org.matsim.core.mobsim.qsim.ActivityEngineDefaultImpl@68d4881e, org.matsim.core.mobsim.qsim.qnetsimengine.QNetsimEngineWithThreadpool@2eb35dd1, org.matsim.core.mobsim.qsim.DefaultTeleportationEngine@4f542be3, org.matsim.core.mobsim.qsim.pt.TransitQSimEngine@4c9e6ab]

Has this been resolved? I am currently having the same issue in my public transport network.