User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

usage:atlatc:examples:splitting

Splitting Services

Introduction

By splitting a train, one can provide service to multiple different forks from a single train. One example is the HS2, which splits 400 m trains at Crewe to provide services to Liverpool Lime Street and Lecister whilst not filling the Crewe-London Euston tracks with extra trains.

Explanation

The code has two parts; one for splitting trains, the other for coupling trains.

When a train comes into a station, it stops, boards and disboards (relying on station signage) and gets ready to shunt. the train length is divided in two and truncated, giving the index at which to split the train. As soon as the train is split, the text is changed in both trains and they are sent off.

On the return, two tracks exist; a LuaATC track which sets up shunt mode and a maximumm speed of 2 n/s, and a stopping on which stops the train if it reaches the end of the platform (so it can couple with the other one which is coming).

usage/atlatc/examples/splitting.txt · Last modified: 2022-09-10 11:30 by 56independent