Skip to content

Commit 12b1a74

Browse files
authored
Merge pull request #1092 from cjakeman/manual-update-timetable
Adds $gradient, $req, depart-early and passing-time to Manual
2 parents cf1e593 + 344634b commit 12b1a74

File tree

2 files changed

+182
-3
lines changed

2 files changed

+182
-3
lines changed

Source/Documentation/Manual/operation.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ AE in the .srv file as "Efficiency".
614614

615615
If the AI train makes station stops, its maxspeed depends from the "Performance"
616616
parameter for every route section, as can be seen and defined in the AI train
617-
timetable (that is maxspeed is the product of the first MAxVelocity parameter by
617+
timetable (that is maxspeed is the product of the first MaxVelocity parameter by
618618
the "Performance" parameter divided by 100).
619619

620620
Such performance parameter list is written (divided by 100) by the AE in
@@ -632,6 +632,8 @@ This corresponds to MSTS behaviour.
632632
Moreover the Efficiency parameter is used also to compute acceleration and
633633
braking curves.
634634

635+
.. _operation-speed:
636+
635637
Calculation of Train Speed Limit
636638
--------------------------------
637639

Source/Documentation/Manual/timetable.rst

Lines changed: 179 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ final location).
237237
If both arrival and departure time are to be defined, these must be separated by
238238
'-'.
239239

240+
A request stop is set in a timetable by placing a 'x' between hours and minutes, e.g. 13x21, or by just
241+
setting an 'x' in the station departure field.
242+
For a request stop to work properly, details for this stop must be specified using :ref:`the '$req' command <timetable-cmd-request-stop>`.
243+
244+
In a timetable, it is indicated that a :ref:`train is allowed to depart early <timetable-depart-early>` by placing a '*'' between hours and
245+
minutes, e.g. 17*23, or by setting just a '*' in the station departure field.
246+
247+
A :ref:`passing time <timetable-passing-time>` can be defined by placing a 'P' between hours and minutes, e.g. 14P53
248+
240249
Additional :ref:`timing commands <timetable-timing>` can be included. Such
241250
commands can also be set for locations where the train does not stop and
242251
therefore has no timing details, but the train must pass through that location
@@ -419,6 +428,8 @@ Special Rows
419428
The #dispose row presently does not affect the end of the run for the player
420429
train.
421430

431+
.. _timetable-train-speed:
432+
422433
- ``#speed`` row
423434

424435
This optional field defines maximum speed for trains, which may restrict the
@@ -429,7 +440,7 @@ Special Rows
429440
If specified, only one ``#speed`` (m/s), ``#speedkph``, or ``#speedmph`` row
430441
can be present in a single timetable file.
431442

432-
This row also accepts a number of :ref:`speed commands <timetable-speed>`.
443+
This row also accepts a number of :ref:`speed commands <timetable-cmd-speed>`.
433444

434445
- ``#restartdelay`` row
435446

@@ -496,6 +507,27 @@ reference is in the form of ``train name:timetable description``, where the
496507
description is the text at the intersection of the first ``#comment`` row and
497508
``#comment`` column in the other timetable file.
498509

510+
Train Commands
511+
''''''''''''''
512+
513+
Gradient
514+
To provide a realistic behaviour on gradients, the gradient command has been introduced.
515+
516+
Syntax
517+
``$gradient /perc=n /speed=s``
518+
519+
The gradient command must be set in the ``#speed`` :ref:`field of a train <timetable-train-speed>`.
520+
521+
Functionality
522+
When gradient is set, forced acceleration is turned off if the leading engine of the train is on a
523+
rising gradient which exceeds n percent.
524+
However, forced acceleration is turned on if the speed of the train drops below speed s.
525+
This is to ensure the train will not stall, and also that the train will restart if it has come to a stop on a
526+
gradient, e.g. due to a signal.
527+
528+
The units of speed (m/s, mph, kph) depend on the definition of :ref:`the speed field<timetable-train-speed>`.
529+
530+
499531
Station Commands
500532
''''''''''''''''
501533

@@ -1077,6 +1109,151 @@ junction somewhere beyond that station.
10771109
Will activate the train as indicated, either when the train starts, when the
10781110
train is at the indicated stop or when it is terminated.
10791111

1112+
.. _timetable-cmd-request-stop:
1113+
1114+
``$req``
1115+
1116+
A request stop is set in a timetable by placing an 'x' between hours and minutes, e.g. 13x21, or by just
1117+
setting an 'x' in the station departure field.
1118+
For a request stop to work properly, details for this stop must be specified using the ``$req`` command.
1119+
This command can be set as command for the station, or as command for each individual train. If set
1120+
for both station and train, the setting for the train will overrule the setting for the station for that
1121+
particular train.
1122+
Also, a special signal is required to set further required details, and also to visualize the requirement
1123+
to stop to pick up passengers for the player train.
1124+
1125+
Definition for ``$req`` command : $req /pu=n /pd=n [/laststop | /approach] [/message | /sound]
1126+
1127+
Details
1128+
``/pu=n`` : probability that stop is required to pick up passengers, n is percentage, 0 <= n <= 99.
1129+
1130+
``/pd=n`` : probability that stop is required to set down passengers, n is percentage, 0 <= n <= 99.
1131+
1132+
``/laststop`` : message is displayed at last fixed stop, indicating if stop at request stop is required
1133+
to set down passengers. Note that message is always displayed, indicating that stop is required, or not.
1134+
1135+
``/approach`` : message is displayed, or sound is played, at preset fixed distance from stop if
1136+
request stop is required to set down passengers. Note that no indication if given if stop is not required.
1137+
1138+
``/message`` : message is displayed on approach if stop is required. Only valid if ``/approach`` is set.
1139+
1140+
``/sound`` : sound is played on approach if stop is required. Only valid if ``/approach`` is set.
1141+
1142+
1143+
Definition for special signal
1144+
Signals must be placed next to the platform. This signal may be any type of signal except NORMAL.
1145+
At least one signal is required for each direction.
1146+
1147+
A special function must be used for this signal in the related script : TRAIN_HAS_REQUEST_STOP()
1148+
1149+
This function will return 'true' if approaching train is to stop at the request stop in order to set down
1150+
passengers, otherwise it returns 'false'.
1151+
Using this function, the state of the signal can be set as required. The signal can be visualized as an
1152+
actual signal, but also, for instance, a passenger figure can be animated to be visual on the plaƞorm
1153+
if the train is to stop, and otherwise not be visual.
1154+
1155+
Apart from this function, the signal must set two variables :
1156+
1157+
``ORTSReqStopVisDistance`` : distance from station at which AI train is assumed to be able to
1158+
'see' if stop is required to pick up passengers.
1159+
1160+
``ORTSReqStopAnnDistance`` : distance from station at which message is displayed or sound is
1161+
played if ``/approach`` is set in ``$req`` command.
1162+
1163+
Functionality
1164+
Based on the values of ``/pu`` and ``/pd``, it is determined if a request stop is required, either to set down
1165+
or to pick up passengers.
1166+
1167+
If the train is stopped and a departure time is set, the train will depart at the defined departure time
1168+
or after the defined station dwell time has passed, whichever is the latest time.
1169+
1170+
If the train is stopped and no departure time is set, the train will depart after the station dwell time
1171+
has passed.
1172+
1173+
Note that if a stop is not required, the train may pass through the station without stopping even if it
1174+
passes before the defined departure time.
1175+
1176+
Player train
1177+
Set down
1178+
If ``/laststop`` is set, a message is shown at the moment of departure from the last fixed stop before
1179+
one or more request stops, which indicate, per stop, if the stop is required to set down passengers.
1180+
Note that the message is always shown.
1181+
1182+
If ``/approach`` is set, a message is shown or a sound is played when the train has reached the distance
1183+
from the request stop as defined in the signal definition using the ``ORTSReqStopAnnDistance``
1184+
variable. Note that in this situation, the message is displayed or the sound is played only if the
1185+
request stop is required.
1186+
1187+
Pick Up
1188+
If a stop is required to pick up, this is visualized by the state of the special signal. It is up to the player
1189+
to approach the station at such a speed that a proper stop can be made in time if required. There is
1190+
no other indication of the state of this signal than the visualization, the state is not shown if the Track
1191+
Monitor window or otherwise.
1192+
1193+
Display in Next Station Window
1194+
A request stop will be shown in the next station window with an 'x' displayed in the arrival and
1195+
departure times. When the stop was required, normal arrival and departure times are shown for
1196+
previous stop. If the stop was not required and the train passed through the station, then when the
1197+
train has indeed cleared the station, that station is shown as previous stop but no arrival time is
1198+
shown, and the departure time is set to 'skipped'.
1199+
1200+
Spoiler
1201+
A 'spoiler' indication which shows if the stop is required to set down or pick up, can be shown if the
1202+
Next Station Window is displayed (normally using key F10), by pressing keys ALT+F10.
1203+
1204+
When ALT+F10 is pressed, and the next station is a request stop, a line is displayed at the boƩom of
1205+
the window showing if stop is required or not.
1206+
1207+
NOTE : this spoiler function is not yet available and will be included later.
1208+
1209+
Sound
1210+
When a sound is to be played on approach, as defined in the ``$req`` command, the definition for this
1211+
sound must be included in the .sms sound file for the cab for the locomotive on the player train.
1212+
1213+
The trigger for this sound is trigger 270.
1214+
1215+
AI Train
1216+
An AI train will approach the station as any normal station. When the stop is required, the train will
1217+
stop as normal. When no stop is required at all, the train will cease to slow down for the approach
1218+
when it has reached the distance from the station as defined in the signal variable
1219+
``ORTSReqStopVisDistance``, and will then start to accelerate again to regain to normal speed.
1220+
1221+
.. _timetable-depart-early:
1222+
1223+
Allow Depart Early
1224+
In a timetable, it is indicated that a train is allowed to depart early by placing a '*' between hours and
1225+
minutes, e.g. 17*23, or by setting just a '*' in the station departure field.
1226+
1227+
Functionality
1228+
Player Train
1229+
When a player train is allowed to depart early, the normal departure indication is given as soon as
1230+
the train has been stopped at the station for the normal required stop time as set for that station,
1231+
and the route ahead is clear.
1232+
1233+
Display in Next Station Window
1234+
When “allow depart early” has been set for a station, a '*' is shown in the departure time. When the
1235+
train has departed, the '*' is also shown in the departure time for previous station stop.
1236+
1237+
AI Train
1238+
When an AI train is allowed to depart early, the train will depart as soon as the train has been
1239+
stopped at the station for the normal required stop time as set for that station, and the route ahead
1240+
is clear.
1241+
1242+
.. _timetable-passing-time:
1243+
1244+
Passing Time
1245+
Passing time can be defined by placing a 'P' between hours and minutes, e.g. 14P53.
1246+
1247+
Functionality
1248+
Player Train
1249+
When a passing time is set, the station will be shown in the NextStationWindow as a normal stop,
1250+
but showing a departure time only. When the station is passed, the actual passing time is also shown
1251+
as normal, but also a departure time only.
1252+
1253+
AI Train
1254+
There is no processing of passing time for AI trains.
1255+
1256+
10801257
.. _timetable-start:
10811258

10821259
Start Commands
@@ -1221,7 +1398,7 @@ A typical value for modern stock for the ``$dec`` command is 2 or 3.
12211398
clear of the reverse position. This is useful when shunting in yards when
12221399
there is no need to fully exit the yard to reverse and the entry signal.
12231400

1224-
.. _timetable-speed:
1401+
.. _timetable-cmd-speed:
12251402

12261403
Speed Commands
12271404
''''''''''''''

0 commit comments

Comments
 (0)