MATSim Libraries

repository·main·Indexed 20 days ago

https://github.com/matsim-org/matsim-libs

A modular toolbox for large-scale agent-based transport simulations. This repository contains various contributions and extensions for MATSim, including tools for accessibility calculation, autonomous vehicle (AV) services (Robotaxi, DRT, Intermodal), carsharing simulation, Cadyts integration for simulation calibration, and the ATAP extension for improved reproducibility and lower equilibrium gaps. It also provides a framework for defining custom MATSim applications using the MATSimApplication class and picocli-powered subcommands.

Tokens
54K
Snippets
114
Records
260
Agent score
70%

What's inside matsim-libs

  1. Overview of the MATSim sharing extension

    main

    The MATSim sharing extension is a modular framework designed to simulate shared vehicle services. It provides standardized management for common service lifecycle tasks, including:

    • Reserving vehicles at a dock
    • Picking up vehicles
    • Returning vehicles

    The extension is transport-mode agnostic. You can implement sharing services using:

    • Network-simulated modes: Such as cars or bikes that follow a road network.
    • Teleportation-based modes: Such as simple representations of shared scooters or bikes that do not follow a specific network.

    Additionally, the extension includes tools to automatically convert common data sources, such as GBFS (General Bikeshare Feed Specification) feeds, into usable formats.

  2. Overview of Discrete Mode Choice components

    main

    The Discrete Mode Choice extension is modular, allowing you to individually configure and extend its core components. The framework is organized into several functional areas:

    • Model Formulations: Defines the mathematical structure of the mode choice model.
    • Mode Availability: Manages which modes are available to agents.
    • Estimators: Handles the estimation of model parameters.
    • Selectors: Determines how agents select modes or routes.
    • Tour Finder Formulations: Defines how tours are constructed or found.
    • Constraints: Manages the constraints applied during the decision process.

    For a complete workflow, refer to the Getting Started guide. To implement your own logic, refer to the Customizing the framework guide.

  3. Overview of EV functionality for MATSim

    main

    The ev contrib provides two primary frameworks for simulating electric vehicle behavior:

    1. Within-day electric vehicle charging (WEVC): A low-level framework for managing charging during a simulation. It allows for planned charging activities (inserted at the start of the day) and custom logic for how agents react to charger occupancy or availability during the day. It requires substantial code-based configuration.
    2. Strategic electric vehicle charging (SEVC): A high-level framework that adds a second replanning layer on top of MATSim's standard replanning. It uses charging plans to optimize decisions (when, where, etc.) in an evolutionary way, reacting to SoC (State of Charge) events, costs, and other factors. It is easier to use and provides rich analysis tools.
  4. Overview of the Taxi extension

    main
    The Taxi extension provides taxi service functionality for MATSim. It implements taxis as a dynamic transport service by leveraging the DVRP (Dynamic Vehicle Routing Problem) contrib. This allows taxi requests to be submitted in an online manner, enabling within-day re-planning of taxi services.
  5. Overview of MATSim-Extensions by SBB

    main

    MATSim-Extensions by SBB is a collection of specialized extensions for the MATSim (Multi-Agent Transport Simulation) framework, provided by the Swiss Federal Railways (SBB). These extensions provide advanced capabilities for public transport modeling and simulation.

    The available extensions include:

    • SwissRailRaptor: Advanced public transport routing.
    • Deterministic PT Simulation: Deterministic public transport simulation capabilities.
    • Skim Matrices: Tools for generating skim matrices.
  6. Overview of Road Pricing functionality

    main

    The roadpricing package allows for the simulation of various road-pricing scenarios within MATSim. It supports multiple tolling schemes, including:

    • Distance tolls: Charges based on the distance traveled.
    • Cordon tolls: Charges for crossing a specific boundary (cordon).
    • Area tolls: Charges for entering or traversing a specific geographic area.

    Key features include:

    • Network limitation: Toll schemes can be restricted to specific parts of the network.
    • Time-dependency: Toll amounts can vary throughout the simulated day.

    Important Note on Units: Toll amounts are specified in terms of the MATSim scoring function. The toll amount is converted into utility using the marginal utility of money parameter defined in your scoring function.

  7. Overview of Cadyts Integration

    main

    Cadyts (Calibration of dynamics traffic simulations) is a package used to provide corrections to MATSim simulations based on external measurements. The corrections act as weights during plan choice, steering the simulation closer to the observed real-world measurements.

    For implementation examples, refer to the org.matsim.contrib.cadyts.run package.

  8. Overview of the UrbanEV charging model

    main

    UrbanEV is an experimental package for modeling charging behavior for private electric vehicles (EVs) in urban environments.

    Core Logic:

    • Advance Planning: Agents plan charging in advance at the beginning of the qsim (after the official replanning phase). It does not model reactive behavior to SoC changes during the day.
    • Threshold-based Trigger: If an agent's estimated SoC is predicted to fall below a configurable threshold during a specific leg, the model attempts to incorporate charging into the plan prior to that leg.
    • Charging Constraints: Charging occurs only during activities. To charge, an agent must find an activity that is:
      • Long enough.
      • Of a corresponding type.
      • Within a maximum configurable distance of a suitable charger.
      • The destination of a leg using the same EV.
    • Diversion Mechanism: If a suitable activity is found, the agent diverts the EV leg to that activity, drives to a charger, and then walks to the original destination.
    • Home Charging: If an agent is predicted to run low on energy while returning home, and a charger exists on the home link, the model skips activity-based searching and simply plugs in the EV at home.
    • SoC Persistence: The final SoC at the end of an iteration is transferred as the initial SoC for the next iteration.
  9. Overview of the Emissions package

    main

    The Emissions package is a tool for calculating exhaust emissions based on the "Handbook on Emission Factors for Road Transport" (HBEFA), specifically supporting versions 3.1 and 4.1. It is designed to integrate with MATSim for multi-agent emission modeling.

    For detailed technical implementation details, refer to the org.matsim.contrib.emissions package or Benjamin's dissertation.

  10. Overview of Parking approaches in MATSim

    main

    MATSim does not consider parking infrastructure or supply constraints by default. Depending on your simulation requirements, you can choose from several specialized implementations:

    • Parking Choice: Focuses on simulating the choice between different parking facilities (e.g., choosing between garages). It does not model circulating traffic searching for parking or walking legs.
    • Parking Search: Models the full process of parking search, including vehicles searching for spaces and agents walking to/from parking locations. This is computationally expensive and often uses DynAgent.
    • Parking Proxy: Designed for large-scale scenarios where full simulation is infeasible. It estimates the additional time required for parking rather than simulating the search process.
    • Parking Costs: Integrates parking costs into the simulation based on link attribute data. Note that these are fixed attributes and do not account for the interaction between demand and supply.
    • Parking Search Parameterization: Estimates parking search time on links based on occupancy within a specific area. When a VehicleLeavesTraffic event occurs, the search time is estimated, and the vehicle is prevented from parking until that time expires.
  11. What is the Minibus package?

    main

    The Minibus package is a tool that takes demand and infrastructure (such as roads) as input to run an adaptive minibus model. The output consists of minibus lines which can be used for:

    • Constructing schedules for formal public transit.
    • Serving as paratransit supply in scenarios where specific paratransit information is unavailable.