#+TITLE: OpenTTD Self Regulating Networks
#+DATE: 2024-01-12
[[file:openttd-srnw/srnw_head.png]]
* Prologue
Every other year or so I decide to play a game or ten of
[[https://openttd.org/][OpenTTD]]. Unfortunately I don't remember most of the things I figured
out in the past so I have to start from first principles.
In this case, first principles means reading the [[https://wiki.openttdcoop.org/Main_Page][openttdcoop Wiki]]
[fn::which is quite dense] and watching a bunch of [[https://www.youtube.com/@LugnutsK][LugnutsK]] videos.
* Self Regulating Passenger Network
The idea of a self regulating passenger network is to grow a city and
transport as many passengers out of the city as possible with the
least amount of train orders.

openttdcoop calls it [[http://wiki.openttdcoop.org/Gametype:ICE_SBahn][Gametype:ICE SBahn]] / [[http://wiki.openttdcoop.org/Self-regulating_SBahn][Self-regulating SBahn]].

The idea is to have (SBahn) stations spread throughout the city that
collect passengers. Once a train is fully loaded with passengers, it
drives outside of the city to a transfer (ICE) station and transfers
passengers to a waiting train that then transports the passengers to a
far away city to make money.

We do not want to deal with each station individually but run the
pick-up trains in a loop that automatically visits a station with
a full load of passengers available.

To make all of this work we have:
1. Inner-city SBahn stations
2. Outside-city waiting loop for the pick-up trains
3. Outside-city exit track to the transfer / ICE station
4. Outside-city transfer / ICE station
5. Injection mechanism from the ICE station to the waiting loop.

[[file:openttd-srnw/overview.png][file:openttd-srnw/overview_small.png]]

The pick-up trains have two orders:
1. Go to transfer / ICE station and transfer passengers.
2. Go to inject way-point.

The inject way-point leads to the waiting loop. From there the only
way to reach the transfer station is through any of the SBahn
stations. We have to arrange the SBahn stations in a way that they are
only accessible when there is a full load of passengers available.

* City Layout
For maximum growth and ease of putting train stations into the city we
are using a 3x3 road grid. A spiral would be even better but it is
annoying to put train stations into a spiral without disrupting the
roads too much and creating dead-ends. Dead-ends are very bad for town
growth.

