Git Product home page Git Product logo

Comments (3)

Janekdererste avatar Janekdererste commented on June 27, 2024 1

You can have a look into our network reader examples. The reader assignes the mode car to all links by default. If you want to do something else, your best option is to hook into setAfterLinkCreated and set allowed modes there.

If you already have a network and want to set those restrictions, working with the matsim data format is probably the way to go.

from matsim-code-examples.

Janekdererste avatar Janekdererste commented on June 27, 2024

This can be modelled in several ways.

If you want to restrict roads for certain modes of transportations, for example, you want to have car-free roads, you can adjust the allowedModes property of those links, i.e. remove the car mode from the allowedModes on those links. This way the router will not consider these links for newly generated routes.

If you want to restrict traffic on certain links entirely, you can also decrease the freespeed and/or the capacity of those links to a very low value. Agents will try to use these links, but will receive low scores for such routes, since it will increase travel times.

It is always possible to adjust the routing as well, and implement a custom filter. This requires substantial knowledge of Java-programming and the MATSim framework though.

from matsim-code-examples.

subrina0013 avatar subrina0013 commented on June 27, 2024

Thank you. I think modifying the network file is a good option.
However, when matsim parse the osm tags, can't it also consider restriction on a road?

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.