v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Gnidan"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 48: Line 48:
 
   O            O
 
   O            O
 
   ╤☼O╟^╢O O╟^╢O☼╤
 
   ╤☼O╟^╢O O╟^╢O☼╤
   ^[#8B4513]│           [#8B4513]│^
+
   ^[#8B4513]│ ☼─☼  ☼─☼ [#8B4513]│^
   ╧☼O        O☼╧
+
   ╨☼O  │  │  O☼╨
 
   O[#8B4513]│╤[#8B4513]─[#8B4513]─[#0FF]☼[#8B4513]─[#FFF]☼[#8B4513]─[#FF0]☼[#8B4513]─[#8B4513]─╤[#8B4513]│O
 
   O[#8B4513]│╤[#8B4513]─[#8B4513]─[#0FF]☼[#8B4513]─[#FFF]☼[#8B4513]─[#FF0]☼[#8B4513]─[#8B4513]─╤[#8B4513]│O
 
   [#8B4513]│[#0FF]^    [#8B4513]│    [#FF0]^[#8B4513]│
 
   [#8B4513]│[#0FF]^    [#8B4513]│    [#FF0]^[#8B4513]│

Revision as of 16:22, 27 January 2016

Minecart Routing

Overview

I've come up with a scheme for getting minecarts to travel from a source to destination automatically using shared track. The scheme ultimately keeps careful control of individual sections of shared track so that only one minecart can be on a single piece of shared track at a given time. Through carefully timed access, a signaling scheme, and stateful record-keeping of how far each minecart is along its way to its destination, I have been able to create a fully automated minecart router.

Shared Track

The design for a segment of shared track comprises two inbound tracks, each with a pressure plate, roller, and door, joining into a single outbound track.


. . . ^ + + ^ . . .
.
.
.
( t o e i t h e r a p r e s s u r e p l a t e o r a n o t h e r s h a r e d t r a c k )

The pressure plates are used to trigger arrival signals, and the doors should be linked to open when the shared track becomes available for that minecart (release). The following track circuit design controls this behavior.


Track Circuit for dual wait/release setups.

The track circuit here is set up to make each arriving minecart wait until the track is empty (and possibly wait until the other side has released and cleared the track, should both carts start waiting at the same time.)

Track

O O
O O O O
O O
O O
O O
O O O O

Furniture

O O
O ^ O O ^ O
^ ^
O O
O O
^ ^
O O
O ^ O ^ O ^ O
- b i t l i n k a g e s t o i n n e r g e a r a s s e m b l i e s s h o w n
- d e n o t e s p o w e r i n p u t
- R i g h t - h a n d s i d e s h o u l d b e d i s e n g a g e d .

Minecarts

O O
O ^ O O ^ O
^ ^
O O
O O
O O
O O ^ O O


Input/Output Signals

Output signals mean an on signal followed by an off signal later. Input signals can be disengaged gear assemblies or power applied briefly. (See Minecart_logic#Techniques_and_Circuits)


Output signals: releasingleft, clearleft, clearright, releasingright

O O
O ^ O O ^ O
^ ^
O O
O O
O O
O O ^ O O

Input Signals: arrivingleft, empty, and arrivingright

arrivingleft
Notifies the circuit that a track is waiting to merge from the left entrance.
arrivingright
Notifies the circuit that a track is waiting to merge from the right entrance.
empty
Notifies the circuit that the shared track is no longer in use.
releasingleft
Sent when the left entrance gains access to the shared track.
releasingright
Sent when the right entrance gains access to the shared track.
clearleft
Sent when the left entrance circuitry has reset and is able to receive another cart.
clearright
Sent when the right entrance circuitry has reset and is able to receive another cart


The basic idea is that an arriving cart sends a signal; this sets the waiting bit. If the waiting bit is set, and the track is not in use, the release signal is sent, and the release bit is set. When the release bit is finished being set, a circuit trips, the release bit is unset, and the clear signal goes out.

Hookup

The track circuit controls access for two entrances onto the shared track. Call one entrance left and one entrance right. On each side, there should be a roller/mechanism-operated door setup restricting access to the merge. In front of the roller should be a pressure plate to signal a minecart has "arrived".

  • Link the two arrival pressure plates to arrivingleft and arrivingright, respectively
  • Link output pressure plates releasingleft and releasingright to the door part of the roller/door setup.
  • Link some signal to empty. This can either be a pressure plate at the far end of the track, or,
  • If a shared track segment leads into another shared track segment as either the left or right arrival point, use either the clearleft or clearright output signal to notify the preceding track that it is empty

Route Circuit

A route represents a single minecart that travels one way from source to destination. Route circuits have n bits, where n is the number of shared track segments the route travels on between its source and destination.

The following diagram is for an example a two-track route circuit. For routes that cover more than two shared tracks, simply add more middle layers.

P < - - I n i t i a l r e l e a s e ( s e t s f i r s t t r a c k b i t )
O ^ O
P < - - S e c o n d t r a c k r e l e a s e t r i g g e r s i f a n d o n l y i f f i r s t t r a c k b i t i s a c t i v e
O ^ O
P < - - R e s e t s i g n a l f r o m p r e s s u r e p l a t e a t d e s t i n a t i o n c l e a r s l a s t t r a c k b i t

The idea is that the track circuit releasedir signals notify all appropriate routes via linkages. Each route keeps track of where it is, so that release signals are ignored unless the minecart released is on the route in question. Appropriate bit pressure plates are then linked to gear assemblies controlling rollers. Route bits turn on the rollers that get the minecart to the correct destination!