Update: I'm putting a schematics documentation work in progress in my dfwiki user page at http://dwarffortresswiki.org/index.php/User:GnidanSo I decided to make a minecart router using logic circuits and bit storage.
I figured out a scheme that vaguely works as follows:
- There are sections of "shared track"
- Each shared track segment has exactly two ways in and one way out.
- Shared track segments are typically in pairs, for both directions.
- Each shared track segment has 1 bit for "in use", and 1 bit for each hauling route that uses the segment
- Shared track segment entrances have rollers and doors, along with 2 more bits for the two entrances, to indicate that a cart is waiting.
- A simple AND circuit determines if a cart has permission to enter the shared track, triggering an open door.
Let's see it!
Overview:
Follow a cart as it travels a full loop.
Waiting Area:
There are two minecart waiting bits on each end of the track:
- Route 1 Waiting
- Route 2 Waiting
These are used, along with the appropriate "Track use bit", to provide input to the waiting circuit (left of armor stockpile). The pressure plates in the waiting circuit trigger the corresponding doors to open, allowing a waiting cart through.
Basically, a cart waits if the track is in use, or if another cart is already waiting. When neither of those are true, the door opens, and the cart is off!
Track Use Storage:
There are 6 "track use" bits, in two rows. The top row of bits is for westbound, the bottom for eastbound. From left to right, the bits are used for:
- Track in Use
- Route 1 Active
- Route 2 Active
The active route bits are used for roller switching. Track use bits are used for waiting carts.
Conclusion:
This has been a ton of fun! I've got a ton of next steps to complete to get it fully the way I want it (removing a couple extraneous bits, then adding support for more than two routes), but overall I'm super excited to build a vast network of minecarts zooming at high speeds around my fort.
EDIT: Here's the imgur album link https://imgur.com/a/0fL5E