This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
eeadc's profile picture

Computer Interlocking with ComputerCraft and Railcraft

Started by eeadc, 28 August 2014 - 10:28 PM
eeadc #1
Posted 29 August 2014 - 12:28 AM
Hello!

I developed a computer interlocking system for CompterCraft, which incorporates Railcraft to control signals and switches, and to connect them together using Signal (Relay|Controller) Boxes. The whole code was written in ComputerCraft and is usable without Railcraft.

The system consists of multiple small programs, which have a few jobs:
  • The Controller controls all signals, switches and running lines. It also includes a router using Dijkstra's algorithm.
  • The Interface displays the running lines, signal aspects and switch states, and is the main interface for the user
  • Switches, signals and detectors have their own small programs, which can hold a lock and set/receive their states
Configuration is a little bit tricky, because you have to define a Graph of your railway system, and then you have to create a screen for your Interface. You can see a sample controller/interface configuration there: http://paste42.de/7302/

The configuration files for the other components are rather simple and generic due to many abstractions.

Important missing features are Velocity measurements and automatic block signaling.

Control interface:




Overview of the computer room:




Source code: http://git.grimpen.net/fritz/interlocking.git/
Sam_Starfall #2
Posted 21 November 2014 - 03:11 AM
could you make a video describing the system and how to set it up?