Trying to create a station based stacker

Post all other topics which do not belong to any other category.
Post Reply
Miravlix
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Jun 01, 2016 8:48 am
Contact:

Trying to create a station based stacker

Post by Miravlix »

As I understand it stackers using signals runs into an issue of all the trains in the stacker never truly idle, but will constantly retry pathing to it's destination, so I changed each tracker to use a train stop all extremely originally named Stacker and using a signal to make the train leave the station.

Each destination station has a decider combinator that checks if the rail signal for the station is green, if it is it generate a signal, so the type of train that would use that station is released from the tracker.

The first issue is that if I have two train's waiting in the stacker that want to go to the same station, they both get released, so I created a counter, and a decider combinator at each train stop, that forwards the signal if counter = value, so two stations won't release at the same time.

Second issue is with having multiple types of destination stations, so while the counter prevents all the iron trains from being released at the same time, it can release one iron train and while it's working on getting to it's destination it can release other types of trains. Writing this post, finally made me think of a solution, I check all stations signals and if any is yellow, I block all release signals, that way only when a train can reserve it's destination, will it be released.

I accidently created a prioritizer, I convert the four possible stations type to binary, 1 = iron, 2 = copper, 4 = coal, 8 = stone. I have eight decider combinators check for 15, 13, 11, 9, 7, 5, 3 and 1 and output iron, then four combinator to check for copper, two for coal and one for stone, so it will prioritize releasing trains in that order, potentially creating a situation where the least prioritized trains never get released (doh). Now to make it prioritize based on what the base needs instead.

1 combinator for each stacker lane, 1 combinator for each unloading station. a counter and 1 combinator to block signals if any lane is yellow and the stacker doesn't have to be the only route to the unloading stations. I have my oil, Supply/Trash and work trains going directly and only trains that can block using the stacker.

Post Reply

Return to “General discussion”