Tutorial 01: Railway interface
Preliminaries
Administrative stuff
Get all administrative things out of the way. Read the Introduction and the Technical Information chapters and set up your working environment. Do this carefully! You do not want to waste time with this kind of stuff later on.
To get yourself running create a stash account and check out the git repository of the railway project (summer term 2014). Remember that you need a valid ssh key to work with stash. Add your public key to your stash/confluence account.
If you have trouble using git ask a supervisor for help!
Railway layout
Get familiar with the railway. Read the technical documentation and understand the track layout scheme.
- Technical Documentation: http://www.informatik.uni-kiel.de/~railway/
- Railway Lecture Summary: http://rtsys.informatik.uni-kiel.de/~rt-teach/ws11/v-synch/lectures/lecture05a-handout4.pdf (slides 24-48)
- Kickoff Talk: Slides
Tasks - DEADLINE 22.04.2014
(Submission via Confluence)
T1A1: Important Thoughts
Write down in own words why the railway installation is a) a real-time system, b) an embedded system, and c) a safety-critical system.
T1A2: C Interface
Since you have already checked out the project's repository, you also downloaded the c interface of the railway installation. Look inside the railway folder inside your local repository clone. You will find the example controller presented at the kickoff meeting the RailwayControllerC folder. Use this stub to create your own railway controller.
Write a .c program that implements a simple railway controler. Use the interface for the simulation and start your control with the modelGUI. The controler should work as follows:
- The train stationed at KH_ST_1 should travel to IC_ST_1 with a speed of 60 and against the main travel direction.
- Upon entering the IC station the speed should be reduced to 20.
- Once the train reached its target platform, stop it (with brakes) and wait for 5 seconds.
- Subsequently, the train should return to its home platform at KH_ST_1 (without changing its direction) with a speed of 60.
- Equivalent to the IC station the train should reduce its speed when entering the KH station and wait for 5 seconds when its platform is reached.
- Eventually, the cycle starts again.
Before writing the c code make a plan how to achieve the task. Which tracks and point switches must be set when. Write down your plan briefly and program your controller. Eventually, test your controller with the simulation environment and the modelGUI.
IMPORTANT: In order to run the controller properly (with its configuration file) you must execute it from its parent directory, i.e., ./Executables/SampleController!
T1A3: Reality vs. Simulation
Subsequent to fixing superflous bugs (in A2), what can you observe? Write down all things that differ from your initial expectations and explain why the railway/simulation did behave in a different way. Additionally list all differences that you expect to exist between the simulation and the real model railway. Therefore inspect the railway documentation and experiment with the simulation (sources).