CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Railways & Public Transport

πŸš† Railways & Public Transport Β· Sequence

Metro Smart Card Fare Collection

How a metro fare is charged with a smart card or bank card: tap in at the entry gate, tap out at the exit, fare by distance and balance update.

More Railways & Public Transport templates

Drawing diagram…

What this diagram shows

  • Gates decide offline in under 300 ms
  • The fare is calculated from entry and exit stations
  • Transactions sync to the central system afterwards

Prompt used

Metro fare sequence: at the entry gate the rider taps an NCMC card; the gate reader checks the card offline, writes the entry station and time on the card and opens. At the exit gate the reader reads the entry station, calculates the distance fare, deducts it from the card balance and opens. Both gates send transactions to the station computer, which forwards them to the central clearing system for settlement with the card-issuing bank.

Mermaid code
sequenceDiagram
  actor R as Rider
  participant EG as Entry Gate
  participant XG as Exit Gate
  participant SC as Station Computer
  participant CC as Central Clearing
  participant BK as Card Issuing Bank
  R->>EG: Tap card
  EG->>EG: Check card offline, write entry station
  EG-->>R: Gate opens
  EG->>SC: Entry transaction
  R->>XG: Tap card at exit
  XG->>XG: Read entry, calculate fare, deduct balance
  XG-->>R: Gate opens, balance shown
  XG->>SC: Exit transaction
  SC->>CC: Upload transactions
  CC->>BK: Settle fares

Related templates

C4 ArchitectureProRailways & Public Transport

Train Ticket Reservation System

A railway reservation system in the style of IRCTC: seat inventory per train and class, waitlists, Tatkal quota, payments and e-tickets.

State MachineRailways & Public Transport

Train Ticket (PNR) Status

The states of a train ticket from booking to journey, including RAC and waitlist confirmation and cancellation.

Data FlowRailways & Public Transport

Live Bus Tracking and Arrival Times

How a city bus app shows live bus positions and arrival times: GPS devices on buses, a prediction model and updates to apps and stop displays.

NetworkRailways & Public Transport

Railway Signalling and Train Control Network

How a modern railway signalling network is connected: interlocking at stations, track circuits, train control radio and the central traffic control centre.

C4 ArchitectureProRailways & Public Transport

Multimodal Journey Planner

A journey planner that combines metro, bus, suburban train and last-mile options into one trip plan with a single ticket.

Database ERDRailways & Public Transport

Train Operations Database Schema

Tables for train operations: trains, routes, stations, scheduled stops, coaches and daily running with actual times.