User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:proposals:newroute

Interlocking Route Programming Rework

Collection of goals and things to keep in mind working on route_prog_rework

General action plan (steps):

  1. Create a new, better formspec railway map (like itrainmap) with extension points
  2. Create a new route programming and editing procedure
  3. (later) Signalbox view (Example)

Formspec railmap

Current plan is to use a grid of label[ elements containing the asterisk * or hashtag # character in different colors to render the tracks.

  • To not overcrowd the renderings and limit resources, will only draw tracks connected to a given “start point”, and up to a defined limit (e.g. max. n track sections, out of image, specific “stop markers” etc.).
  • For purposes of route programming, will display only the already-selected sections of the route and 1 TS ahead, with current segment being in focus
  • Signals, TCBs and/or trains can be represented by image buttons. Only the buttons that are needed are displayed.

New route programming

With the reworked system, it must be possible to edit routes after creation. Also, the process should be less manual.

  • Turnout locks are no longer programmed into individual routes. The routes are only determined by a series of TCBs by which the route goes.
  • TS (track sections) maintain a cache: for each entry-exit combination, which turnouts need to be positioned how. The cache is deleted when changes are made in the section. This allows for easy addition of more sidings without invalidating existing routes
  • Additional things to lock (esp. level crossing switches) can be added to each track section if desired
  • (Later) There may be special situations where you still want to add manual turnout locks. To be decided later.
    • Suggest using ATC-like syntax to edit individual turnout locks: cr | st | l | s |r

Autorouter

Most routes (esp. main routes) follow a simple pattern: signal to signal. It would make sense to search and add useful routes automatically.

  • If it is clear from the interlocking setting that a signal is a plain block signal, automatically add one auto-working route. If this is wrong, user can still delete the automatically-created route again.
  • With few clicks it should be possible to auto-search and add all routes up to the next main signals.
  • A field in the auto-generated routes should mark them as such, so that a subsequent autorouter run can update the existing routes instead of replacing them (so that ARS rules and signal aspect settings are kept)

Better consistency of track sections

Track section consistency should be taken more seriously, and be automatically enforced. Situations like “same TS on both sides of a TCB” must not occur, and in this case section should be split automatically instead of relying on the user to fix this. Same for track sections that were joined. This can be done by simple walk searches using the new TrackIterator.

Routes should fix up as far as they can. If they cannot, they should be marked as “faulty” and the user can fix them in edit mode. In case of autorouter, there should be an option to autoroute again.

Proper shunt routes

The existing implementation does not allow for real shunt/call-on routes, because a route cannot be set into a section that is blocked.

  • Routes should get a flag allowing them to be set even if a section is blocked.
  • Turnout locks must still be settable, and no part must have a route set.
  • Note on Royston Problem: Occasion workaround by “manually” releasing last route section → add LuaATC function for exceptional route release.

More things to fix along the way

  • Find a solution for the multiple-times-in-same-block issue. Train can enter a section twice or more if it is particularily long, the interlocking must still work. Currently, train entering a section is counted at most once, it must be counted every time it enters.
  • Provision for distant signals and varying aspects along the route

Add more as it appears.

dev/proposals/newroute.txt · Last modified: 2023-02-23 13:25 by maverick2797