| Train Director - Schedule File Generation |
English -
Italiano -
Magyar
Western Pacific 805 A at Donner Pass, California
|
How to create the schedule fileThe list of trains for each Train Director scenario is in a file with extension .sch. This file also has the timetable of every single train that will travel on the layout. Since it's very time consuming to enter all this data by hand, Train Director comes with a program, called gentt, which can download the data from the German Railways web site. The program gentt manipulates the HTML pages downloaded from the site. The first step is to download one of these pages. Let's assume we have the following scenario:
![]()
The first step is to go to the German Railways web site, at
http://reiseauskunft.bahn.de/bin/bhftafel.exe/en?protocol=http:.
Enter the name of one of the stations and press "Show".
After having downloaded one page for each station present in your scenario,
we'll have a series of pages on our local disk, for example "B00arr.htm"
(arrivals from midnight at station B), "E09arr.htm" (arrivals from 9 AM at
station E) and "H09dep.htm" (departures from H from 9 AM).
The program will read all the pages with the arrivals and departures from B, E and H for all the hours of the day. It will then read the data for each train and it will create the file BH.sch in the format required by Train Director.C> gentt -a *.htm > BH.sch If all the trains of the B-H line stop both at B and at E, then it will not be necessary to download the schedule page for station E. That is not true for station H. Even when all the trains departing from B towards L stop both at B and H, we still need to download the page with H's schedule to take into account the trains traveling on the F-H-L line. Likewise, it is not enough to request only the page for station H, and ignore the one for station B; the page for station B is needed to take into account all the trains of the A-B-C line. It is more difficult to consider the case of trains that don't stop in any of the stations present on the layout. For these trains it is useless to request the pages for stations A or L (stations which are outside of the scenario) because Train Director wouldn't know when to make the train enter the scenario. For these trains it will be necessary to enter the data by hand. It goes without saying that to use gentt it's necessary to have a connection to the Internet. The program is also capable to work behind a firewall. In this case, it is necessary to provide the name of the proxy system that handles the HTTP requests. To use gentt with a proxy, set the follwing environment variable in a DOS window before running gentt, as in: If you are not behind a firewall, then do not set the PROXY variable.C> set PROXY=http://webcache:8080/ C> gentt -a A.htm > AG.sch Gentt has some sub-functions. The most important is the option -t, as in: This option is useful when the timetable page of every train (the .tr files) are already on the disk, and you want to re-create the .sch file. In this case it is not necessary to be connected to the Internet.C> gentt -t *.tr > BF.sch It is very important to feed gentt with the pages for all the stations where trains originate from. If all the trains originate from stations that are not on the layout, as for instance the stations A and F, it is still possible to give those pages to gentt as long as all the trains stop to at least one of the stations present on the layout. Since version 1.12 of Train Director it is possible to use multiple schedule files. Using the "Include: " command in a .sch file, it is possible to group several schedule files created for different stations, possibly re-using the same timetable files for several different scenarios. The syntax of the Include: command is as follows:
In this example, the file BH.sch has been created with the above procedure. It
will only necessary to add the lines that don't stop in any of the stations,
thus avoiding changing the file BH.sch.Another advantage of this approach is that the file BH.sch can be created every time the schedule changes, for example every six months, without the need to re-enter the trains that don't stop.
Path filesHaving the schedule files for a line is not sufficient to simulate that line. Train Director requires that in the .sch file be specified for each train the entry/exit points and time of entrance/exit.Although entering this data is certainly faster than entering the timetable for every single train, it is still very time consuming. Luckily, since version 1.9 of Train Director it is possible to enter this data only once in a separate file (with extension .pth), and Train Director will automatically compute the enter/exit points and times. The syntax of a .pth file is as follows: Here's an explaination: let's assume that station Z be outside the layout beyond the D station. The first element (that is the first "Path") tells Train Director that all trains that go from B to Z are actually exiting the scenario via D. The exit time is computed by adding 5 minutes to the departure time from station B of type 1 and 2 trains, 6 minutes for trains of type 3, and 7 minutes for trains of type 4.Path: From: B To: Z Times: 5/5/6/7 D Path: From W To: H Times: 2/2/3/4 F # etc. The second path tells Train Director to consider all trains traveling from W to H (assuming W outside the layout, before F) to be entering the layout from F at their arrival time at H minus 2 minutes for type 1 and 2 trains, minus 3 minutes for type 3 trains, and minus 4 minutes for trains of type 4. It is absolutely necessary to specify the travel times for both directions, that is from B to Z (exiting from D) and from Z to B (entering from D). This is because the speed up time of a train is different from the slow down time. Another advantage of this approach is that it becomes possible to extend a scenario without the need to modify the schedule file, that is without changing all the entry and exit points in the .sch file. For example, if initially the scenario only has the stations B, E and H, with stations J and K outside the scenario, it is possible to add J and K simply by modifying the layout and by adding the new paths to the .pth file. No need to change the schedule file! One must take into account every path from the last stop on the layout to the exit point (and viceversa). In our example, if there are trains traveling from B to X exiting from L, and if the only stop is the E station, then it will be necessary to enter the paths E-X and vice-versa, as in the following example:
Path:
From: E
To: X
Times: 8/9/9/10 L
Path:
From: X
To: E
Times: 6/7/7/7 L
Path:
From: H
To: X
Times: 4/5/5/6 L
Path:
From: X
To: H
Times: 3/4/4/4 L
The first simple scenario that uses this feature is the Casale Monferrato station, my hometown. The layout is available for download. Please take a look at the casale.pth file to check how the path feature works. This page is maintained by g_caprino@gmail.com (remove the _ before sending your message). Created on: October 19, 2001
|
|