CAU

- The Model Railway
- - People involved
- - Track System
- - Components
- - Petri Net Model
- - Hardware
- - Software
- - - libRailControl
- - - trainctrl
- - - db/dbplan
- - - railctrl
- - Teaching
- - Links
- - Kicking Horse Pass
- - Photos

Software

enginecarcar
libRailControl
is a library which provides basic operations to control the model railway. These allow application programs for example to switch a point, to set a signal, or to turn power on or off within a specific block section. The library itself ensures that the required data is transmitted to and from the electronic interface. So, using this library frees the application programmer from the burden of low-level interface programming and lets him concentrate on the far more interesting organizational aspects of controlling the model railway. A prototype implementation of libRailControl was written in C by Sven Bruns and is now maintained by Clemens Grelck.

trainctrl
is a simple interactive control program based on libRailControl. It provides a command interpreter which allows the user to issue simple commands similar to those provided by the library itself. In addition to these, some more complex commands display routes between arbitrary blocks, trace specific velocity meters, or run a train on a specified route. This application program knows the structure of the track system, but it has absolutely no knowledge about the positions of the trains. So, when running a train, the user himself is responsible that the specified route is free of other trains. This manual form of control is the most important difference to the more elaborate programs offering automatic control. trainctrl was written in C by Clemens Grelck.

db / dbplan
are two different front-ends to a prototype implementation of an application program which offers the desired automatic control of the model railway. While db allows for interactive control, dbplan processes a given schedule. When running db the user is required to enter the initial positions of each train before he may issue commands to drive trains to other destinations. This allows db to keep track of each train's position while running. In contrast to db, dbplan requires the name of a file containing a schedule as command line argument. This schedule provides dbplan with the initial position of each train along with a list of destinations. db and dbplan were written in C by Jörg Schwarzwälder.

railctrl
is a control program (based on libRailControl) designed to concurrently execute the schedules of up to 11 trains. (The limitation of 11 trains arises from the number of 11 station sidings.) Besides the elementary task of avoiding collisions and derailing of trains, railctrl satisfies all organisational aspects, like fairness or deadlock prevention, resulting from establishing an ordered behavior in a system with cyclic concurrent activities. The therefor needed mechanisms are mainly derived from the Petri net model. Furthermore railctrl accelerates and slows down the trains smoothly and adjustes the speed on uphill or downhill passages. This services can be set up for each controlled train individually. railctrl was written in C by Wolfgang Hielscher.


Clemens Grelck
generated on: Tue Jul 13 13:31:48 MET DST 1999