1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Simulating Real-world Schedules With Open Rails

Discussion in 'Off Topic' started by trinancrat, Feb 19, 2020.

  1. trinancrat

    trinancrat New Member

    Joined:
    Jul 25, 2018
    Messages:
    9
    Likes Received:
    17
    I have been working on a program that turns digitized transit schedules into timetables for Open Rails. For those who aren't familiar, Open Rails is an open-source Microsoft Train Simulator-compatible sim that includes a timetable mode quite similar to TSW's implementation.

    My program reads General Transit Feed Specification (GTFS) files, which have been made available by an increasing number of transit operators throughout North America and Europe. These data obviously do not specify any rolling stock or track paths, so my program also accepts a "recipe" file that injects this information.

    As an example, here is a recipe I prepared for Amtrak's Saturday services on the Washington-Philadelphia Northeast Corridor:
    Code:
    route: USA1
    date: 2019-08-10
    gtfs:
      - url: https://transitland-gtfs.s3.amazonaws.com/datastore-uploads/feed_version/d2483076c78b6d8b12cf67a1fae7c4f5fa5aaad4.zip
        groups:
            ##
            ## Towards Washington
            ##
    
            # Acela Express
          - selection:
                trip_short_name: '^(2203|2249|2251|2253)$'
            path: philwash
            consist: acela
            note: $dec 2
    
            # Northeast Regional
          - selection:
                trip_short_name: '^(65|131|153|155|195|147|99|161|87|163|159|135|165|167)$'
            path: philwash
            consist: AcelaHHP-8stndrd
            note: $dec 2
    
            # Vermonter
          - selection:
                trip_short_name: '^57$'
            path: philwash
            consist: AcelaHHP-8stndrd
            note: $dec 2
    
            # Palmetto
          - selection:
                trip_short_name: '^89$'
            path: philwash
            consist: AcelaHHP-8stndrd
            note: $dec 2
    
            ##
            ## Towards Philadelphia
            ##
    
            (... snip ...)
    
    And the resulting timetable:

    OR_NEC.png

    And an even briefer recipe for current services on the Settle to Carlisle line:
    Code:
    route: EUROPE1
    date: 2019-12-02
    gtfs:
      - url: https://transitland-gtfs.s3.amazonaws.com/datastore-uploads/feed_version/d9fdfe685f3f476dd45d121098f0d921b26677bc.zip
        groups:
            # Towards Settle
          - selection:
                route_id: '^21049$'
            path: local service
            consist: Class 50, 8 carriages
            note: $dec 2
    
            # Towards Carlisle
          - selection:
                route_id: '^21205$'
            path: settle - carlisle
            consist: Class 50, 8 carriages
            note: $dec 2
    
    And the resulting timetable:

    OR_S+C.png

    As you can see, the result is a full, authentic timetable with minimal effort spent on rote tasks like reading off of tables or keying in times. My current goal is to build a full Northeast Corridor timetable with as many Amtrak, MARC, SEPTA, and NJ Transit services as the sim can handle.

    Perhaps I will be able to produce timetables for TSW, too, when we gain the ability to edit or replace Dovetail's own.
     

Share This Page