uniba-swt / swtbahn-cli

A client-server command line interface for the SWTbahn.
GNU General Public License v3.0
7 stars 3 forks source link

Merge drive route fix #99

Closed BLuedtke closed 1 year ago

BLuedtke commented 1 year ago

Closes #68

Implements a new function for along with a train that drives a route. Sets passed signals to stop without running into the problems described in #68.
Instead of looking for the train appearing at a specific track segment after a signal, looks where the train is, where the signals are, and sets passed signals to stop.

In the process of this PR, we should discuss whether we want to keep the "old" driving function around.

BLuedtke commented 1 year ago

Tested with both long and short routes on SWTbahn-Full, all went well after some fixes.

One open TODO remaining is the issue of segments that appear twice in one route. Once that is tackled, will change to ready-to-review.

BLuedtke commented 1 year ago

Experimental fix for routes with double segments. Needs testing (will do)

2023-01-26: Testing in progress

BLuedtke commented 1 year ago

Tested on SWTbahn Full, worked after most recent commit.

Worked with multiple trains on tracks, short route, long route.