Model Railroad System
2.2.1
Overall User Manaual
|
The Time Table (V2) program is a hybrid program, consisting of a Tcl/Tk GUI on top of a C++ class library. The GUI provides the user interface to the algorithms and data structures contained in the C++ class library. This program was inspired by chapter 8 of the book How to Operate Your Model Railroad by Bruce A. Chubb. I strongly recommend reading this chapter fully before using this program. This program implements the methods described in this chapter, in an automated fashion.
There are two formats for the TimeTable program's command line. The command line can either have a single file name, the name of an existing time table file or it can have two options (-totaltime
and -timeincrement
) and the name of a new time table. The first form loads an existing time table (see Section Loading an Exiting Time Table File and the second form creates a new time table (see Section Creating a New Time Table. These two command line formats are shown here:
The main GUI window is shown here:
It contains a menu bar, a toolbar, a time table chart, and a button menu. The toolbar is shown here:
The button menu is shown here:
Creating a new time table can be done from the command line by specifying a total time (in minutes) value with the -totaltime
option and a time increment value (in minutes) value with the -timeincrement
option and a name for the new time table (as shown in the second line above). A new time table can also be created with the New
menu item of the File
menu or the
toolbar button. These later two methods use the "Create a New Time Table" dialog, shown below, to get the total time, time increment, and the name of the new time table. If there is a time table file already loaded, a confirmation dialog will be displayed.
A simple chart with three stations, four cabs (labeled "Crew 1" through "Crew 4"), and two storage tracks is shown below.
Stations for a time table must all be created when the time table is created. Stations cannot be added or removed later. When a new time table is created the "Create All Stations Dialog", shown below, is displayed to create all of the station stops.
Once the stations have been created, an initial set of "cabs" can be created. Commonly, cabs are only used on block switch DC layouts, but the cabs can be used as with a DCC layout as a way to associate trains with different operating "crews" (operators) or just to identify different classes of trains by color, etc. The "Create All Cabs" dialog, shown below, is used to bulk create an initial set of cabs.
An existing time table file can be loaded from the command line (as shown in the first line of the CLI usage, with the Open
... menu item of the File
menu or the
toolbar button. If there is a time table file already loaded, a confirmation dialog will be displayed.
The currently loaded time table can be saved with either the Save
(or Save
As...) menu item of the File
menu or the
toolbar button.
Trains are added using the either the Add
Train
menu item of the Trains
menu, clicking on the add train (
) toolbar button or the
Add
a
new
train
button. All of these display the "Create New Train Dialog", described in Section Create New Train Dialog.
The "Create New Train Dialog" first collects some basic information about the new train, as shown below. The basic train information consists of the train's common name, its number (or symbol), its class number, its average speed, its scheduled departure time, and the two stations it travels between.
The train's number (or symbol) needs to be a unique identification of the train. The common name need not be unique. The class is a whole number, with smaller numbers generally being the "higher" class. The class is used to indicate a train's priority and is also used to group similar trains together. The speed is the (scale) speed the train will be traveling between stops. The scheduled departure time is the time the train is scheduled to leave its origin station. The origin and termination stations are the station end points the train travels between.
The Schedule
button selects the scheduling page of the "Create a
@addindex "train, adding a schedule"
New Train Dialog", as shown below. On this page, the cab can be selected and layover periods at intermediate stations can be set. The Update
buttons propagate the cab settings and adjust the times to allow for the layovers.
The Storage
button selects the storage track allocation page of the "Create a New Train Dialog", as shown below. This page lists those stations that have storage tracks available. It only makes sense to select storage tracks for intermediate stops if there is a layover or for originating or terminating stops.
Trains are deleted using the Delete
Train
menu item of the Trains
menu, clicking on the delete train (
) toolbar button or the
Delete
an
Existing
train
button. All of these display the "Select One Train Dialog", described in Section Select One Train Dialog. A delete confirmation dialog will also be displayed.
Duplicate stations occur mostly with "out and back" type layouts where the opposite ends of the line are modeled with the same trackage (usually a yard). Duplicate stations also occur with reverse loops. In all cases, these are stations which are logically different, but which use the same tracks.
There is an example in Figure 8-4 on page 86 of
How to Operate Your Model Railroad.
It is necessary to keep track of this trackage in the schedule. The duplicate station linking handles this. Duplicate stations need to be setup before trains have been added. The Set
Duplicate
Station
and Clear
Duplicate
Station
menu items of the Stations
menu, the
and
toolbar buttons, and the
Set
Duplicate
Station
and Clear
Duplicate
Station
buttons set and clear duplicate stations.
Storage tracks are sidings where whole trains can be stored, either during a long layover or between trips. The Add
Storage
Track
menu item of the Stations
menu, the
toolbar button, or the
Add
Storage
Track
button are used to add a storage track to a station.
Generally "Cabs" refer to the separate throttle controls on a block switched DC layout. They are generally non-existent with a DCC layout, but virtual cabs might be used as a way of assigning crews (operators) to a train or to a segment of a train's run. Cabs are added with the Add
A
Cab
menu item of the Cabs
menu, the
toolbar button or the
Add
A
Cab
button.
Notes are brief memos about the operating rules in effect. There is a
Notes are created and edited the Create
New
Note
and Edit
Existing
Note
menu items of the Notes
menu, the
and
toolbar buttons, or the
Create
New
Note
and Edit
Existing
Note
buttons. The the "Note editor dialog", shown below is used to create or edit the note. Notes are numbered consecutively starting with 1.
Notes are added to trains or removed from trains with Notes
menu items Add
note
to
train
, Add
note
to
train
at
station
stop
, Remove
note
from
train
, and Remove
note
from
train
at
station
stop
; the
,
,
, and
; or the
Add
note
to
train
, Add
note
to
train
at
station
stop
, Remove
note
from
train
, and Remove
note
from
train
at
station
stop
buttons. All of these display the "Add (or Remove) Note dialog", shown below.
"Printing" a time table actually means creating a LaTeX file and then processing that LaTeX file through a LaTeX processing program (typically pdflatex
). LaTeX provides the means to produce a professionally formatted document and has the means to provide things like table of contents and the creation of a final document in a selection of different final formats, including PDF (via pdflatex
), PostScript (via latex
and dvips
) or HTML (via the htlatex
script from tex4ht
package).
Much of the formatting is customizable through the insertion of LaTeX code fragments as well as through various parameter settings. It is also possible to edit the LaTeX style file that comes with the Time Table program (TimeTable.sty
) to tweak some of the fine details of the formatting as well.
The Print
menu item of the File
menu or the
toolbar button initiate the print process by displaying the "Print Timetable" dialog, described in Section Print Timetable Dialog.
The "Print Timetable" dialog, shown below, collects the basic information needed to generate and process a LaTeX source file from the time table data structure. This information consists of the name of the name of the LaTeX source file to create, the LaTeX processing program (pdflatex
by default), whether to run the LaTeX processing three times (to get the table of contents right), the name of any post processing command (such as dvips
if using plain latex
). Most of the time, this is enough for a standard, basic time table. The Configure
button can be used to configure a selection of options using a "Print Configuration" dialog, described in Section Print Configuration Dialog.
Once the settings and configuration have been set, the Print
initiates the process. First a LaTeX source file is generated, then the LaTeX processing program is run once or three times. The output from these runs are displayed in a process log window (LaTeX outputs a fair amount of diagnostic output, most of which can be ignored). If you are using the default processor (pdflatex
), you should now have a PDF file which can be viewed or printed with the PDF viewer of your choice.
The Print Configuration Dialog, shown below, provide for the setting of many print configuration options. The general settings, provide for setting the title, subtitle, the date, whether to have LaTeX format for double sided printing, setting the time format, setting the logical direction of trains, column widths, and including additional commands in the LaTeX preamble (usually including additional style packages and style settings). The multi-table settings, provide for settings relating to time tables using multiple tables. These settings include whether to create a table of contents, whether to use multiple tables at all, LaTeX code to precede the table of contents, LaTeX code to precede notes section, the header to use if a single "All Trains" table is generated, and LaTeX code to precede this single "All Trains" table. The groups settings, provide for settings for each group. This includes whether to group by class or to manually group trains and provides for setting the class or group heading and for LaTeX code to precede the group table, and if grouping manually, selecting the trains in the group.
The Exit
(or Close
) menu item of the File
menu, the
toolbar button, or the
Quit
–
Exit
NOW
button exit the program. A confirmation dialog is displayed to get confirmation.
The "Select One Train dialog", shown below, is used to select a train either for deletion (Section Deleting Trains) or for viewing (Section Trains).
The view menu contains menu items for viewing detailed information about various things, including trains (Section Trains, stations (Section Stations), and notes (Section Notes).
There are two menu items for viewing trains, View
One
Train
and View
All
Trains
. The View
One
Train
uses the "Select
One Train dialog" (Section Select One Train Dialog) to select a train to display detailed information about and the View
All
Trains
menu item displays a dialog listing all of the trains, by number and name, with buttons to get more detailed information.
There are two menu items for viewing stations, View
One
Station
and View
All
Stations
. The View
One
Station
uses the "Select One Station dialog" to select a station to display detailed information about and the View
All
Stations
menu item displays a dialog listing all of the stations, by name and scale mile, with buttons to get more detailed information.
There are two menu items for viewing notes, View
One
Note
and View
All
Notes
. The View
One
Note
uses the "Select
One Note dialog" to select a note to display detailed information about and the View
All
Notes
menu item displays a dialog listing all of the notes, by number and beginning text, with buttons to get more detailed information.
The Time Table program has a small number of global configuration options. These are stored in a file named .timeTable (
TimeTable.rc
under MS-Windows) in the current user's HOME directory. These configuration options are:
pdflatex
executable. The system configuration file is read at program start up. If the configuration does not exist, a default one is created the first time the program is run.
The Options
menu manages the system configuration, with menu items to edit the system configuration, save it and reload it.