train-kouts 0.1.0

Explainable planning decisions across railways and roads
Documentation
  • Coverage
  • 100%
    41 out of 41 items documented0 out of 21 items with examples
  • Size
  • Source code size: 15.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 448.0 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hidenoriuehara-art

train-kouts

train-kouts is a dependency-free Rust library for explainable decisions where railways and roads meet. It reviews a plan through six principles:

  • safety at crossings and interfaces;
  • continuous, legible transfers;
  • universal access;
  • balanced flow and reliability;
  • environmental care;
  • alternatives during disruption.

Every principle requires non-empty evidence. Known interface-safety harm is a veto and cannot be offset by faster travel or another benefit.

Example

use train_kouts::{Impact, IntegratedPolicy, TransportPlan, TransportPrinciple as P};

let plan = TransportPlan::new("station approach")?
    .assess(P::InterfaceSafety, Impact::Improves, "conflicts decrease")?
    .assess(P::ConnectedJourney, Impact::Improves, "transfer is shorter")?
    .assess(P::UniversalAccess, Impact::Improves, "step-free route exists")?
    .assess(P::ReliableFlow, Impact::Neutral, "delay is unchanged")?
    .assess(P::EnvironmentalCare, Impact::Improves, "car trips decrease")?
    .assess(P::NetworkResilience, Impact::Improves, "backup route exists")?;

assert!(matches!(
    IntegratedPolicy::evaluate(&plan).decision(),
    train_kouts::TransportDecision::Integrated
));
# Ok::<(), train_kouts::TransportError>(())

Sources and scope

The principles are informed by Japan's Ministry of Land, Infrastructure, Transport and Tourism material on railway-crossing safety and integrated transport terminals.

This crate is independent and unofficial. It does not calculate signal timing, replace engineering analysis, state legal compliance, or grant approval.