CS 452/652 Winter 2022 - Lecture 31
March 25, 2022
prev next
TC2 Demo Review
Observations and clarifications for those still completing TC2, as well as the final demo.
Demo Execution
- have a reliable reset procedure! execute at start and end of program
- it should not be necessary to fidget much with the Märklin box
- press Stop+Go for a few seconds to reset the box
- use train lights and init command to determine initial direction
- think about commands useful for the demo, such as:
- 'dest' to record a destination, but don't start yet
- 'loop' to send a train along a particular loop
- features vs. automation vs. control interface
- most importantly, make a plan for the demo!
Separation of Concerns
- run train without destination or route
- determine location and reserve track segments
- stop/reverse at entry/exit points
- do something about conflicts
Conflict Resolution
- type of conflicts
- same direction: stop/start (or slow)
- opposite direction: stop/start (or slow) or reroute (or reverse)
- stationary obstacle: reroute
- reroute
- determine new path in other direction without reverse
- determine new path using full graph excluding current reservation
- determine alternative path using Dijkstra previous hop table
- deadlock should be impossible (at least for 2 trains) assuming:
- all turnouts intact
- routing includes reverse direction
Turnout Blocking
- block turnout switching based on estimated train location (+ error margin)
- treat blocked turnout as (transiently) failed turnout and continue...
Test/Demo Case
- preconfigure loop
- run two trains in same direction
- test/show location, sensors, reservation without routing!
Student Course Perception Surveys