Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

MTRS / SDI-BCA Toolkit

Reference implementation of two transport policy analysis methods:

  • MTRS — Multivariate Transport Ranking Stability test: assesses how stable a ranking of transport policy scenarios is under uncertainty, decomposes ranking instability into six sources, and evaluates three reporting rules (stable / reversal / non-transferable).
  • SDI-BCA — Staged-Delay-Inclusive Benefit-Cost Analysis: evaluates staged transport programmes whose benefit streams depend on the operational state of prerequisite stages, so delays propagate through the programme's dependency graph.

The MTRS procedure is introduced in Research Report No. 212 (May 2024); SDI-BCA in Research Report No. 231 (June 2025).

Project website: https://github.com/Yanxi-Liu-Research/mtrs-toolkit/ · Latest release: v1.4.0 (2026-03-20) · License: MIT

The toolkit is pure Python (standard library only, Python ≥ 3.9) with no runtime dependencies.


MTRS overview

Input

  • a decision matrix (scenarios × indicators) scoring policy scenarios on transport indicators,
  • nominal indicator weights and benefit directions (higher/lower-better),
  • an uncertainty specification describing the six uncertainty sources: model structure, parameter, data-year, policy-mapping, indicator-weight, and metropolitan-area structure.

Output

  • the base scenario ranking,
  • the stability score S = 1 - D / D_max, where D is the mean total rank displacement over the uncertainty ensemble and D_max = floor(n²/2) the largest possible displacement between two rankings of n scenarios,
  • a six-source variance decomposition of ranking instability,
  • the reversal probability of the top-ranked scenario,
  • the cross-area transfer failure rate (from the area-structure source),
  • a verdict and a text/JSON report.

Reporting rules (default thresholds, configurable)

Rule Condition
Reportable as stable S ≥ 0.80 and no reversal risk
Reversal risk top-rank flip probability > 0.10
Transferable across areas transfer failure rate ≤ 0.30

The headline verdict is REVERSAL when reversal risk is detected, NON-TRANSFERABLE when the ranking fails the cross-area check (or the stability threshold) and STABLE otherwise.

SDI-BCA overview

Stages form a directed dependency graph. A stage opens when its own construction is complete and every prerequisite stage is operational (plus an optional handover lag). A delay on one stage therefore propagates to all downstream stages — the staged-delay inclusive property. For a delay schedule, the toolkit reports:

  • base and delayed NPV, BCR, PV of benefits and costs,
  • ΔNPV and ΔBCR,
  • marginal NPV contribution of each delayed stage,
  • the staged-delay interaction term — the part of ΔNPV not attributable to any single delay, capturing overlapping delays that interact through the dependency graph.

Cash-flow convention: years are offsets from a base year; construction cost accrues uniformly over the construction period; benefits accrue from the opening year with an optional linear ramp-up; discounting is end-of-year (PV = Σ CF_t / (1+r)^t).

Installation

git clone https://github.com/Yanxi-Liu-Research/mtrs-toolkit.git
cd mtrs-sdibca-toolkit
pip install .          # optional: the packages also run from the source tree

There are no third-party dependencies.

Quick start

from mtrs import MTRSAnalysis, UncertaintySpec, render_text_report

matrix = [
    [78, 64, 55, 42, 38, 71],
    [69, 58, 61, 30, 44, 64],
    [58, 71, 66, 35, 36, 52],
    [64, 45, 41, 22, 40, 57],
    [40, 40, 40, 26, 30, 40],
]
analysis = MTRSAnalysis(
    matrix,
    scenario_names=["Metro extension", "BRT network",
                    "Road pricing + transit", "TOD intensification", "Baseline"],
    indicator_names=["accessibility", "emissions", "time saving",
                     "cost per trip", "safety", "ridership"],
    weights=[0.20, 0.15, 0.25, 0.15, 0.10, 0.15],
    directions=[1, 1, 1, -1, 1, 1],   # cost per trip is lower-better
    spec=UncertaintySpec(parameter={"sigma": 0.06}),
)
result = analysis.run(n_draws=1000, seed=42)
print(render_text_report(result))
from sdibca import SDIBCAModel, Stage

stages = [
    Stage("BRT corridor", 0, 2, annual_cost=40, annual_benefit=35, ramp_up=1.0),
    Stage("Fare integration", 1, 1, annual_cost=8, annual_benefit=10,
          ramp_up=0.5, handover_lag=0.5, depends_on=("BRT corridor",)),
    Stage("LRT extension", 3, 3, annual_cost=55, annual_benefit=60,
          ramp_up=1.5, depends_on=("BRT corridor", "Fare integration")),
]
model = SDIBCAModel(stages, discount_rate=0.05, horizon=20)
result = model.analyse({"BRT corridor": 1.0})
print(result.base["npv"], result.delayed["npv"], result.delta_npv)

Examples and tests

python3 examples/mtrs_example.py       # full CSV-driven assessment + JSON report
python3 examples/sdibca_example.py     # staged-delay worked example
python3 -m unittest discover -s tests -v

The examples/data/ directory contains the CSV inputs used by the worked examples (mtrs/io.py documents the CSV layouts).

Package layout

mtrs/          MTRS: core engine, uncertainty generators, metrics,
               CSV input helpers, report rendering
sdibca/        SDI-BCA: stage graph, delay propagation, discounting
examples/      worked examples with CSV data
tests/         unit tests (unittest, no external test deps)

Reproducibility

All randomness flows from a single seed passed to MTRSAnalysis.run(). Identical inputs and seed reproduce identical results; the example scripts pin their seeds.

License

MIT — see LICENSE.

Metadata

Release files for mtrs-sdibca-toolkit 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for mtrs-sdibca-toolkit 1.4.1
File Size Uploaded Provenance Actions
mtrs_sdibca_toolkit-1.4.1.tar.gz 23.4 kB With provenance Details for mtrs_sdibca_toolkit-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mtrs-sdibca-toolkit 1.4.1
File Interpreter ABI Platform Actions
mtrs_sdibca_toolkit-1.4.1-py3-none-any.whl Python 3 none any Details for mtrs_sdibca_toolkit-1.4.1-py3-none-any.whl

Total release size: 45.5 kB

Release files / mtrs_sdibca_toolkit-1.4.1.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL mtrs_sdibca_toolkit-1.4.1.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
618b89635fc01e5025a30953f4a7b4eccf145762c208155fcbd9e423778b36c6
BLAKE2b-256 checksum
How to use checksums
47731036ac61f4210343ae3f50c1bdef0071ede454921a47547f69cc422a023c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / mtrs_sdibca_toolkit-1.4.1-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL mtrs_sdibca_toolkit-1.4.1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0ed6385c772e3d3ad1d573f4d1595cbfa5dc7b2b33b706ad2a74b8813400200
BLAKE2b-256 checksum
How to use checksums
fdfdbf4af26bddf3f74cd8d33c8d6174afe63bb29584f080130ad807716ef72f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for mtrs-sdibca-toolkit 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for mtrs_sdibca_toolkit-1.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page