Code Monkey home page Code Monkey logo

Comments (3)

kainagel avatar kainagel commented on May 29, 2024

Hello, could you please attach the full logfile? Thanks ...

from matsim-code-examples.

RMJcar avatar RMJcar commented on May 29, 2024

Thank you!
BUILT.logfile.log

from matsim-code-examples.

kainagel avatar kainagel commented on May 29, 2024

Sorry, somehow didn't get a notification when you attached the logfile, or overlooked it. Unfortunately, doesn't help much. Assuming that you are running from an unchanged RunRoadPricingUsingTollFactorExample, then line 61 is

if ( scenario.getVehicles().getVehicles().get( vehicleId ).getType().equals( someVehicleType ) ) {

You need to find out where the null pointer exception is coming from, by testing each component individually. Possibly the vehicleId does not exist in the official vehicles container. This could, for example, be a bus from the public transit module. What I would try then is to make sure that the pt bus is a different vehicle type than the vehicles that you want to charge toll on, and exclude it in the if condition before. Maybe something like

Vehicle vehicle = scenario.getVehicles().getTransitVehicles().get( vehicleId ) ;
if ( vehicle!=null ) {  //it's a transit vehicle, it will not be in the "normal" vehicles container
  ... 

You could also put a minimal working example, including some small version of input files, into a public repo at github and I could (try to) have a look

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.