Coder Social home page Coder Social logo

Comments (7)

mrieser avatar mrieser commented on August 20, 2024 1

The error message shows that you try to add a node with the same Id and same coordinate a second time to the network.

Anyone can help-me to fix this error?

Don't add the node a second time.

It's hard to give better advice as long as we don't know what your code is actually doing. Is it happening within code you wrote yourself? Then please show us your code or we cannot help. Is it happening when running an unmodified MATSim release? Then please tell us what class you actually started and what you tried to do, otherwise we cannot say what should be changed.

from matsim-code-examples.

LorenaBR avatar LorenaBR commented on August 20, 2024

Follow attached my config file, my transitschedule (with only one busline, just to know if it's right) and my network with all nodes and links.

config_defaultDF.gz
transitschedule.gz
networkpt.gz

Thank you so much in advance for any input!

from matsim-code-examples.

mrieser avatar mrieser commented on August 20, 2024

The network itself looks fine, it only contains one node with id 0.
What code, what class did you execute when the error message appears? Could you share the whole logfile?

from matsim-code-examples.

LorenaBR avatar LorenaBR commented on August 20, 2024

Hello, thanks for your answer, but i think i had fixed the error when i changed some things in my Transit Schedule file.
In fact I was not putting all the links that the bus line was going through, somehow I deleted some links.

Anyway, I have another question about the Transit Schedule file.

Is it really necessary to put the "DepartureOffset" in my stops (except in the last one)?
From what I saw in the DTD it is not mandatory to use them, is just implied. But in the tutorials, they say it's mandatory.
i'am asking that because i have no a idea how to collect these datas, and also because the traffic department does not have this information.
What should I do?
Thanks again!!

from matsim-code-examples.

mrieser avatar mrieser commented on August 20, 2024

departureOffset is required in all except the last one. The reason it's "implied" in the DTD is exactly that it not required in the last one. The departure offset says when the vehicle departs at that stop and usually comes from the schedule: If the vehicle starts at 08:05 at the first stop and at 08:07 at the second stop, the departure offset should be 00:02.
If you really don't have any actual schedule to deduct the times: Just assume some. As long as you set "awaitDeparture=false", the vehicle will just drive as fast as they can and might either be late or early if compared to the specified offsets, but it will not influence the simulation, only some delay analysis if you would do some.

from matsim-code-examples.

LorenaBR avatar LorenaBR commented on August 20, 2024

Thank you, it helped me a lot.
so I put the transitschedule in the validator and it worked, even left the message that the transit schedule was validated.
however, when I run in matsim 8.0.1. jar, the following error appeared:

2018-10-19 13:43:34,797 ERROR QSim:316 got exception while cleaning up
java.lang.NullPointerException
at org.matsim.core.mobsim.qsim.qnetsimengine.QNetsimEngine.afterSim(QNetsimEngine.java:246)
at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:313)
at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:242)
at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120)
at org.matsim.core.controler.AbstractController$7.run(AbstractController.java:203)
at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:235)
at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:199)
at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:158)
at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:125)
at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:30)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:95)
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:103)
at org.matsim.core.controler.NewControler.run(NewControler.java:79)
at org.matsim.core.controler.Controler.run(Controler.java:190)
at org.matsim.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2018-10-19 13:43:34,797 ERROR AbstractController:214 Mobsim did not complete normally! afterMobsimListeners will be called anyway.
java.lang.RuntimeException: UmlaufId could not be found. veh=null
at org.matsim.pt.ReconstructingUmlaufBuilder.createUmlaeufe(ReconstructingUmlaufBuilder.java:80)
at org.matsim.pt.ReconstructingUmlaufBuilder.build(ReconstructingUmlaufBuilder.java:71)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.getOrCreateUmlaufCache(TransitQSimEngine.java:145)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.createVehiclesAndDriversWithUmlaeufe(TransitQSimEngine.java:124)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.insertAgentsIntoMobsim(TransitQSimEngine.java:216)
at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:273)
at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:258)
at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:219)
at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120)
at org.matsim.core.controler.AbstractController$7.run(AbstractController.java:203)
at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:235)
at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:199)
at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:158)
at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:125)
at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:30)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:95)
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:103)
at org.matsim.core.controler.NewControler.run(NewControler.java:79)
at org.matsim.core.controler.Controler.run(Controler.java:190)
at org.matsim.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2018-10-19 13:43:34,797 ERROR MatsimRuntimeModifications:54 Getting uncaught Exception in Thread main
java.lang.RuntimeException: UmlaufId could not be found. veh=null
at org.matsim.pt.ReconstructingUmlaufBuilder.createUmlaeufe(ReconstructingUmlaufBuilder.java:80)
at org.matsim.pt.ReconstructingUmlaufBuilder.build(ReconstructingUmlaufBuilder.java:71)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.getOrCreateUmlaufCache(TransitQSimEngine.java:145)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.createVehiclesAndDriversWithUmlaeufe(TransitQSimEngine.java:124)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.insertAgentsIntoMobsim(TransitQSimEngine.java:216)
at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:273)
at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:258)
at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:219)
at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120)
at org.matsim.core.controler.AbstractController$7.run(AbstractController.java:203)
at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:235)
at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:199)
at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:158)
at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:125)
at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:30)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:95)
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:103)
at org.matsim.core.controler.NewControler.run(NewControler.java:79)
at org.matsim.core.controler.Controler.run(Controler.java:190)
at org.matsim.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2018-10-19 13:43:34,797 ERROR MatsimRuntimeModifications:60 ERROR --- This is an unexpected shutdown!
2018-10-19 13:43:34,797 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception:
java.lang.RuntimeException: UmlaufId could not be found. veh=null
at org.matsim.pt.ReconstructingUmlaufBuilder.createUmlaeufe(ReconstructingUmlaufBuilder.java:80)
at org.matsim.pt.ReconstructingUmlaufBuilder.build(ReconstructingUmlaufBuilder.java:71)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.getOrCreateUmlaufCache(TransitQSimEngine.java:145)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.createVehiclesAndDriversWithUmlaeufe(TransitQSimEngine.java:124)
at org.matsim.core.mobsim.qsim.pt.TransitQSimEngine.insertAgentsIntoMobsim(TransitQSimEngine.java:216)
at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:273)
at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:258)
at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:219)
at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120)
at org.matsim.core.controler.AbstractController$7.run(AbstractController.java:203)
at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:235)
at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:199)
at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:158)
at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:125)
at org.matsim.core.controler.AbstractController.access$000(AbstractController.java:30)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:95)
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:103)
at org.matsim.core.controler.NewControler.run(NewControler.java:79)
at org.matsim.core.controler.Controler.run(Controler.java:190)
at org.matsim.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2018-10-19 13:43:34,813 ERROR MatsimRuntimeModifications:78 ERROR --- MATSim unexpectedly terminated. Please check the output or the logfile with warnings and errors for hints.
2018-10-19 13:43:34,813 ERROR MatsimRuntimeModifications:79 ERROR --- results should not be used for further analysis.
2018-10-19 13:43:34,813 ERROR MatsimRuntimeModifications:83 ERROR --- This was an unexpected shutdown! See the log file for a possible reason.

Can you help-me with any ideas?

from matsim-code-examples.

LorenaBR avatar LorenaBR commented on August 20, 2024

In the documentation the vehicle identification is only implied (vehicleRefId), but when I try to run it always appears the error "veh = null". So i tried with just with one vehicle, one route/line, and one passenger, adding the vehicheRefId and it works.

The problems is that here the buses serve different lines depending on their availability, so there's no way to know which bus serves which line, that's why i need to know if there is any possibility to replace the "VehicleRefId"?
Thanks one more time, MRieser. You've been very kind to me and helped me a lot!

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.