PT Network Mapping with pt2matsim

Automate MATSim transit schedule mapping to road networks with pt2matsim.

1|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/ro9er117911/matsim-example-project --skill pt-network-mapping-with-pt2matsim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PT Network Mapping with pt2matsim
Source: https://github.com/ro9er117911/matsim-example-project/tree/main/.claude/skills/matsim-skill/2-pt-mapping
Command: npx skills add https://github.com/ro9er117911/matsim-example-project --skill pt-network-mapping-with-pt2matsim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mapping complex public transit schedules onto road networks is a common bottleneck in transport modeling. This Skill streamlines the entire pt2matsim process, from network preparation to parameter tuning, ensuring accurate and efficient integration of public transit into your MATSim simulations.

Core Features & Use Cases

  • Automated Transit Mapping: Automatically map GTFS-derived transit schedules onto your MATSim road network.
  • Troubleshoot Mapping Issues: Diagnose and resolve common problems like stuck processes, too many artificial links, or route failures.
  • Optimize Parameters: Tune mapping parameters for various scenarios (e.g., metro vs. bus) to achieve optimal results.
  • Use Case: You've converted GTFS data and cleaned your network. Now, use this Skill to map your Taipei Metro transit schedule onto the cleaned network, generating network-with-pt.xml.gz and transitSchedule-mapped.xml.gz for your simulation.

Quick Start

Map the transit schedule from 'transitSchedule.xml' onto the cleaned network 'network-cleaned.xml.gz' using the artificial link mode for a quick test, saving outputs to 'network-with-pt.xml.gz' and 'transitSchedule-mapped.xml.gz'.

Frequently Asked Questions about PT Network Mapping with pt2matsim

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map GTFS transit schedules onto a MATSim road network?

Mapping GTFS transit schedules onto road networks is automated using pt2matsim, which takes a transitSchedule.xml file and network.xml.gz, then outputs network-with-pt.xml.gz and transitSchedule-mapped.xml.gz by matching transit routes to road geometry. This Skill handles the entire process from setup to parameter tuning.

What parameters should I tune when pt2matsim mapping isn't working correctly?

Key tuning parameters for pt2matsim include maxLinkCandidateDistance, nLinkThreshold, maxTravelCostFactor, candidateDistanceMultiplier, networkRouter, and numOfThreads. Adjusting these resolves common issues like stuck processes, excessive artificial links, or route failures in metro, bus, and mixed transit networks.

Can I use pt2matsim for both metro and bus network mapping?

Yes, pt2matsim supports multimodal public transit mapping across metro, bus, and mixed networks. This Skill optimizes parameters for different scenario types, allowing you to map complex transit schedules regardless of transit mode or network configuration.

What files do I need before running pt2matsim transit mapping?

You need a cleaned MATSim network file (network.xml.gz) and a GTFS-derived transitSchedule.xml. Prerequisites include verifying Java dependencies and ensuring your network is preprocessed and cleaned before pt2matsim processes it into network-with-pt.xml.gz and transitSchedule-mapped.xml.gz outputs.

Why does pt2matsim create too many artificial links in my network?

Excessive artificial links typically result from overly permissive parameters like high maxLinkCandidateDistance or low nLinkThreshold. This Skill diagnoses and resolves such issues by tuning candidateDistanceMultiplier and other constraints to reduce unnecessary link creation while maintaining route accuracy.

What's the difference between artificial link mode and real link mapping in pt2matsim?

Artificial link mode creates new network links where transit routes don't align with existing roads, useful for quick testing. Real link mapping constrains routes to existing network geometry. This Skill supports both modes, letting you choose based on your simulation needs and network detail level.