Coder Social home page Coder Social logo

Comments (1)

mrieser avatar mrieser commented on June 19, 2024

The log file contains more information about the actual problem:

2018-10-12 14:07:37,060 ERROR AbstractMultithreadedModule$ExceptionHandler:210 Thread ChooseRandomLegMode.3 died with exception. Will stop after all threads finished.
java.lang.ClassCastException: org.matsim.core.population.ActivityImpl cannot be cast to org.matsim.api.core.v01.population.Leg
	at org.matsim.core.population.algorithms.ChooseRandomLegMode.getTransportMode(ChooseRandomLegMode.java:101)
	at org.matsim.core.population.algorithms.ChooseRandomLegMode.changeToRandomLegMode(ChooseRandomLegMode.java:80)
	at org.matsim.core.population.algorithms.ChooseRandomLegMode.run(ChooseRandomLegMode.java:67)
	at org.matsim.core.replanning.modules.AbstractMultithreadedModule$PlanAlgoThread.run(AbstractMultithreadedModule.java:234)
	at java.lang.Thread.run(Thread.java:748)

Based on that, the code tries to detect the currently used leg mode by looking at the second PlanElement in the agent's plan, which should be a leg. But in your case it seems to be an Activity.

So the problem is somewhere in your plans: They should always alternate between activities and legs, and it looks as if in your case you have at least two activities at the beginning of a plan.

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.