arup-group / genet

Manipulate MATSim networks via a Python API.
MIT License
45 stars 9 forks source link

Add validation checks for PT stop attributes snapping to other graphs (Intermodal access/egress in matsim) #183

Closed KasiaKoz closed 1 year ago

KasiaKoz commented 1 year ago

Hit with a matsim error:

java.lang.NullPointerException: Cannot invoke "org.matsim.api.core.v01.network.Link.getToNode()" because "link" is null
    at ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorRoutingModule.findCoordinate(SwissRailRaptorRoutingModule.java:97) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorRoutingModule.fillWithActivities(SwissRailRaptorRoutingModule.java:73) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorRoutingModule.calcRoute(SwissRailRaptorRoutingModule.java:60) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at org.matsim.core.router.TripRouter.calcRoute(TripRouter.java:183) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at org.matsim.core.router.PlanRouter.run(PlanRouter.java:102) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at org.matsim.core.population.algorithms.PersonPrepareForSim.run(PersonPrepareForSim.java:234) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at org.matsim.core.population.algorithms.ParallelPersonAlgorithmUtils$PersonAlgoThread.run(ParallelPersonAlgorithmUtils.java:146) ~[columbus-2.1.0-jar-with-dependencies.jar:2.1.0]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

Turned out a link was deleted that provided access to a PT stop. Some checks for this should be added to genet.