Code Monkey home page Code Monkey logo

Comments (3)

golanbendor avatar golanbendor commented on May 28, 2024

Are you using PT in your simulation?

If so, PT doesn't have any plans (like a regular agent has) so this could explain why you are getting the java.lang.NullPointerException from line 131 in the class PlansTranslatorBasedOnEvents.java:
Plan selectedPlan = person.getSelectedPlan();

This is a known issue - more details and a possible fix here:
https://matsim.atlassian.net/browse/MATSIM-648

from matsim-code-examples.

LorenaBR avatar LorenaBR commented on May 28, 2024

Hello again,
Yes, i'm using PT simulation and I want to use Cadyts to work with a scenario that simulates public transit vehicles as regular vehicles on links. (transit vehicles pass a count station the same way as private cars)

I believe I did what you recommended correctly,
I defined - ((person == null)? return - in the PlansTranslatorBasedonEvents, but the same error in the same place (L131) happened .. it seems the change I made did not work .

I don't know if i did something wrong or actually to put (person=null) return it will not make difference in my case.

Do you know anything else I can do?
Follow my logfile.

logfileWarningsErrors2.txt

Thanks for any help!!

from matsim-code-examples.

kainagel avatar kainagel commented on May 28, 2024

I defined - ((person == null)? return - in the PlansTranslatorBasedonEvents, but the same error in the same place (L131) happened .. it seems the change I made did not work .

if ( person == null ) return ;

is probably not the same as what you tried with ? and :; see here:

https://stackoverflow.com/questions/18124745/java-ternary-operator-and-nullpointerexception

Your code is not exactly the same as that one, but since you did not give the full code I cannot really tell.

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.