Even Stations

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
leitk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Even Stations

Post by leitk »

I'm trying to send trains to multiple stations with the same name, but it always goes to the nearest station.
I've set it up to disable the station if it doesn't have enough to fill or if it is currently busy, but since the loading takes only a few seconds, and my current need is less than that, the trains always go to the closest station.

What I'm hoping to have is that I can name n stations the same thing and when a train is available it goes to the next station that has enough to fill it.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Even Stations

Post by impetus maximus »

wire train signals to the chests. if the station that fills more often is > than the next, give it a red signal.

leitk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Re: Even Stations

Post by leitk »

I don't understand what you're saying.

By greater than the next you mean if it has more in the chests?

I can turn off the stations if there isn't enough in the loading chests, but that doesn't happen often, and even so greatly favors the closest station.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2081
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Even Stations

Post by Jap2.0 »

Yes - if there isn't enough in the chests for another train, disable the station. If that rarely happens then you need more and bigger trains, and if your base can't use that many resources, increase production.
There are 10 types of people: those who get this joke and those who don't.

leitk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Re: Even Stations

Post by leitk »

Jap2.0 wrote:increase production.
Well in order to do that I'd have to grab some additional territory, and while that would just mean pasting more laser turrets, I've done that a few dozen times and it's gotten old....

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Even Stations

Post by impetus maximus »

sorry i haven't given you an example build/save. i've been working on my blueprint library.
i'll try and upload a save today.

leitk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Re: Even Stations

Post by leitk »

I'll probably work on a recursive blueprint for expanding territory, then I can expand enough so that hopefully it doesn't matter.

Avezo
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Apr 01, 2016 3:53 pm
Contact:

Re: Even Stations

Post by Avezo »

I would suggest instead of disabling/enabling stations, use wired signals cutting acces to said station off.

leitk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Re: Even Stations

Post by leitk »

I could do that, but I don't understand the difference really. Except that in the pathing discounts red signals that are far away, so it could still send a train to the station that is distant. A red signal where the train can reroute to the other station would still work, but why is that better than just turning off the station?

tuplex
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri May 27, 2016 6:22 pm
Contact:

Re: Even Stations

Post by tuplex »

Turning off stations can cause problems sometimes. Like if all of the destination stations are turned off, where are your trains going to stop? Just something to watch out for.

You might try connecting the inventory of all of your like stations together with a circuit network, and then set it up so that the station with the most items is turned on. That way you will get the load balancing that you seem to be looking for.

For example, if you have three iron stations, at each station, use a arithmetic combinator to calculate the average iron content (total / 3). Then check each station's contents against the average. If it is greater than the average, enable that station, otherwise disable it. That way at least one station will always be active, so your trains will always have someplace to go, and it will always be station(s) that have the most material.

quyxkh
Filter Inserter
Filter Inserter
Posts: 801
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Even Stations

Post by quyxkh »

leitk wrote:Except that in the pathing discounts red signals that are far away
I think that's not true:

Code: Select all


        if ((outSignal && outSignal->getReservedByCircuitNetwork())
            || (neighborInSignal && neighborInSignal->getReservedByCircuitNetwork()))
          costFromStart += 1000;

        if (!neighbor->getBlock()->isFree(request.train))
          costFromStart += (2 * neighbor->getLength()) / (currentNode->blockDistanceFromStart + 1);

[/url]

you can see it discounting for distance with the currently-occupied block penalty, but a wired-red signal adds a straight 1000-tile cost.

Post Reply

Return to “Gameplay Help”

Who is online

Users browsing this forum: No registered users