fork download
  1. Documentation (de)coupling
  3. Goal: To be able to change two train configurations by having them exchange units (either sequences of single cars or a whole multiple unit).
  5. Requirements:
  6. - Ordering of cars does not change during coupling or decoupling. In order to add a specific car to the current train, all cars between the current train and the desired car will be coupled to the current train as well.
  7. - Coupling and decoupling only happens at safe speeds. Such speeds are typically in single digits MPH.
  8. - Coupling and decoupling only happens at safe locations. Safe locations include (but are not necessarily limited to) depots and stations. Desired is to be able to designate track as yards, which is another safe location.
  9. - Coupling and decoupling only happens at locations where the coupled trains together do not produce a train that otherwise could not have reached that location. This includes not allowing corners greater than 45/90 degrees (depending on settings) when coupling. This is only a concern when coupling/decoupling can happen on normal track, not in depots or stations.
  10. - A train needs to be able to decouple into two trains through an order. This can be by decoupling a specific amount of cars or MU’s at the end of the train or when the train consists of two trains coupled, decouples the second train.
  11. - When a train gets decoupled, it can receive orders. Those orders are not part of the old consist of the two coupled trains. (This might require being able to create orders schemes consisting of multiple order schemes).
  12. - A train that gets coupled can keep the original orders and resume the orders after coupling.
  13. - A train needs to be able to wait at a specific point to be coupled with another train.
  14. - A train needs to be able to couple with another train that is waiting to be coupled. There needs to be a way to define which trains are allowed to couple with this train. Pathfinder needs to be able to route the train towards the waiting train, in case of PBS ignoring the requirement for a safe waiting place for the original train and in case of block signaling ignoring the fact that the block is occupied by the waiting train. (Reason: By not doing this we essentially are forcing the player to choose between letting the trains choose any free platform without (de)coupling or have (de)coupling available but trains at stations with decoupling cannot choose any free platform)
  15. - Ordering trains to couple does not have to depend on order of arrival. When a train that is ordered to couple with another train arrives while the another train has not arrived yet, the train waits on the other train and the other train will attempt to couple with the train upon arrival.
  16. - Trains only couple with other trains that are waiting to be coupled.
  17. - Trains that are required to couple with another train can choose for a specific train, a train that matches certain requirements (such as next order, length, cargo etc..., being able to choose multiple requirements), a group of trains or any train that is waiting to be coupled.
  19. Train (de)coupling examples
  20. Legenda:
  21. - L# Locomotive with id #
  22. - P# Passengers coach with id #
  23. - C# Cargo car with id #
  24. - MU$# Multiple Unit existing of $ units (MU6 is a six unit long train) with id #
  26. Trains are always listed with the head of train being left and tail of train right, so LPPLL is a train with a locomotive at the head of train, two passenger coaches behind that and two locomotives at the rear pushing the train.
  27. All examples assume that there are no special shunting operations to change the ordering of specific cars (looping around or so). The focus here is on giving examples for various mechanics of coupling and decoupling, in order to remove any confusion that might appear.
  28. All actions in a single sentence, joined by commas, are done on one location. Actions in different sentences usually are in different (possibly new) locations unless specified otherwise.
  29. When saying “A couples B” this means that the tail of A couples to the head of B, thus for two trains with the configuration LCC the result becomes LCCLCC. The resulting train then takes the name of the first train (in this case, A). In OpenTTD this would mean that B would be driving towards the tail of A, rather than A reversing to B since that is currently impossible. However, those examples only serve as a way to clarify the intended mechanics and not situations that have to be possible in OpenTTD.
  31. Example 1
  32. Starting situation:
  33. Train A L0P1P2P3P4P5P6
  34. Train B MU47
  35. A couples with B
  36. End situation:
  37. Train A L0P1P2P3P4P5P6MU47
  39. Example 2
  40. Train A L0
  41. Train B C1C2C3
  42. Train C C4C5
  44. Two possible scenarios:
  46. A couples B, A couples C giving: L0C1C2C3C4C5
  47. A couples C, A couples B giving: L0C4C5C1C2C3
  49. Example 3
  50. Train A L0C1C2C3
  51. Train B L9C4C5
  53. B decouples C5, C5 becomes C
  54. A couples C
  56. End situation:
  57. Train A L0C1C2C3C5
  58. Train B L9C4
  60. Example 4
  61. Train A L0C1C2C3
  62. Train B C4C5C6
  63. Train A needs car C5.
  65. Steps:
  66. A couples with B, decoupling C5C6
  67. A decouples C4 (C4 becomes train C)
  68. A couples with B, decoupling C6
  69. A couples with C
  70. A couples with B, decoupling C4
  72. End situation:
  73. Train A L0C1C2C3C5
  74. Train B C4C6
  76. Example 5, orders
  77. Train A L0P1P2 Starting at station Z
  78. Train B L3P4P5 Starting at station Y
  80. Orders A:
  81. - Go to Z | Current
  82. - Go to X and couple with B
  84. Orders B:
  85. - Go to Y | Current
  86. - Go to X and couple with A
  87. - Go to W and decouple A with orders [Go to U]
  88. - Go to V
  90. After station X (assuming A arrives first):
  91. Train A L0P1P2L3P4P5
  93. After station W:
  94. Train A L0P1P2
  95. Train B L3P4P5
  97. Example 6, orders
  98. Train A MU06MU14 Starting at station Z
  100. Orders A:
  101. - Go to Z | Current
  102. - Go to Y and decouple [Second train unit] with orders [Go to X, Go to Y]
  103. - Go to W
  104. - Go to Y and couple with any [Passenger Train][Length 4]
  105. - Go to Z and decouple [Second train unit] with orders [Go to V, Go to Z]
  106. - Go to U
Not running #stdin #stdout 0s 0KB
Standard input is empty
Standard output is empty