Even Stations
Even Stations
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.
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.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Even Stations
wire train signals to the chests. if the station that fills more often is > than the next, give it a red signal.
Re: Even Stations
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.
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.
Re: Even Stations
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.
Re: Even Stations
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....Jap2.0 wrote:increase production.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Even Stations
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.
i'll try and upload a save today.
Re: Even Stations
I'll probably work on a recursive blueprint for expanding territory, then I can expand enough so that hopefully it doesn't matter.
Re: Even Stations
I would suggest instead of disabling/enabling stations, use wired signals cutting acces to said station off.
Re: Even Stations
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?
Re: Even Stations
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.
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.
Re: Even Stations
I think that's not true:leitk wrote:Except that in the pathing discounts red signals that are far away
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);
you can see it discounting for distance with the currently-occupied block penalty, but a wired-red signal adds a straight 1000-tile cost.