Simplify roboport charging without repathing by linking touching/contiguous roboports

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 561
Joined: Tue May 10, 2016 3:39 pm
Contact:

Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by Jon8RFC »

TL;DR
Bots often queue up for a single roboport when others immediately nearby are available. Have the game see them as one, big, virtual port if they're touching/contiguous.

What ?
Situations like this seem to happen very often:
roboport.jpg
roboport.jpg (226.42 KiB) Viewed 1504 times
It just gets worse with more bots.

Link them together, similarly to how nuclear reactors get boosts from other nuclear reactors. This could make more charging ports available.

Because visual feedback is king, something like an outline could be used to signify linked roboports, when viewing or placing a new ghost. A coloring system similar to rail segments could distinguish between nearby linked ports so that it's not green all over:
outline.jpg
outline.jpg (206.4 KiB) Viewed 1504 times
Why ?
Roboports not being used are a waste resources, power, and bots, but there's no way for the player to control this. Repathing bots is a waste of computing resources.

Linking touching/contiguous roboports as one, big virtual roboport entity could allow for readily using open charging ports without any repathing at all, right?
Image
mrvn
Smart Inserter
Smart Inserter
Posts: 5999
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by mrvn »

And have all the bots wait in a large circle around all the roboports? That would greatly increase the way from the waiting position to the next free recharging port and therefore increase the recharge time. So I guess merging roboports would have diminishing returns quickly.

Maybe a better algorithm would be a work stealing queue. If two roboports are touching (or just near) and one of them runs out of bots to recharge it steals half the bots from the other roboport so the workload is balanced better.
User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 561
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by Jon8RFC »

I wouldn't think there would be more than a negligible increase in distance, or diminishing returns. Sure, if there are 500 contiguous roboports setup in a straight line away from center that could certainly be a nuisance, but that's up to the user to do how they see fit.

I couldn't happen to find one of the situations when 50+ bots get queued to a single roboport with empty roboports right next to it. That's a situation in which I can't possibly imagine the proposed idea being anywhere close to inferior.

I guess a better way to think of things like these, or anything for that matter, is to apply the counter-argument, and get a new perspective. Change the roboports to have just one charging port in a 2x2 square (roboport is 4x4 for 4 ports, 4 squares per port, effectively), and have 4 bots queued up to charge to that one port, while the three other roboports right next to it remain unused, because of the current system. I can't imagine that a 2x2, 1-port system would then be superior while all 3 bots queue up one at a time, yet the current 4x4 roboports would provide diminishing returns because they charge all four bots within a larger 4x4 grid simultaneously instead.

There are extreme cases for everything, and that's where the 500 linear roboports are where it's up to the user. It could even be an expensive research unlock so that users decide to go look at the wiki and better understand what it is, and find that a long line of roboports may cause them more harm than good.

If the reason not to do something to improve gameplay in Factorio is because of potentially worse performance, then my suggestion is one which may not allow for that to be a reason not to do it. I wonder if it may even improve performance if bot pathfinding is no longer done to 500 roboports to find which is closest, and because of virtual "big" roboports, it pathfinds to just 25 instead.
Image
mrvn
Smart Inserter
Smart Inserter
Posts: 5999
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by mrvn »

Jon8RFC wrote: Mon Jun 24, 2019 12:56 pm I wouldn't think there would be more than a negligible increase in distance, or diminishing returns. Sure, if there are 500 contiguous roboports setup in a straight line away from center that could certainly be a nuisance, but that's up to the user to do how they see fit.

I couldn't happen to find one of the situations when 50+ bots get queued to a single roboport with empty roboports right next to it. That's a situation in which I can't possibly imagine the proposed idea being anywhere close to inferior.

I guess a better way to think of things like these, or anything for that matter, is to apply the counter-argument, and get a new perspective. Change the roboports to have just one charging port in a 2x2 square (roboport is 4x4 for 4 ports, 4 squares per port, effectively), and have 4 bots queued up to charge to that one port, while the three other roboports right next to it remain unused, because of the current system. I can't imagine that a 2x2, 1-port system would then be superior while all 3 bots queue up one at a time, yet the current 4x4 roboports would provide diminishing returns because they charge all four bots within a larger 4x4 grid simultaneously instead.

There are extreme cases for everything, and that's where the 500 linear roboports are where it's up to the user. It could even be an expensive research unlock so that users decide to go look at the wiki and better understand what it is, and find that a long line of roboports may cause them more harm than good.

If the reason not to do something to improve gameplay in Factorio is because of potentially worse performance, then my suggestion is one which may not allow for that to be a reason not to do it. I wonder if it may even improve performance if bot pathfinding is no longer done to 500 roboports to find which is closest, and because of virtual "big" roboports, it pathfinds to just 25 instead.
I'm not sure how far away bots wait from the charging port but lets say it's 5m around the circumference of the charging grid. That means for a 2x2 charging port the bots have to fly 5-6.4m without power to start charging. With a 4x4 grid it's 5-9.2m. With 2 roboports its 5-14.9m. With 3 roboports in a row it's 5-20.6m. And the more roboports you have the less bots will wait on the nearest charging port. The extra distance to travel means the charging port remains idle longer between bots and that's a diminishing return.

Note: diminishing returns doesn't prevent improvement. It doesn't mean that combining 2 roboports won't be faster than recharging all bots from one with a second being idle. It means that the improvement going from 2 to 3 is less than going from 1 to 2. In this case though I think the negative effect of a larger waiting distance will quickly overpower the gain from more charging ports. So there would be a maximum number of ports that combined give the best result.

But lets look at your example with my suggestion: The roboport is split into 4 2x2 charging pads with 1 port each. Now 4 bots queue up to one port. One goes to charge leaving 3. Now 3 ports are idle. The second pad steals ceil(3/2) = 2 bots from the first. The third steals ceil(2/2) = 1 bots from the second pad. The fourth steals ceil(1/2) = 1 bots from the first pad. And then all bots are on their way to charge. But that example is to simple.

So lets look at your second example. 500 roboports in a row. And lets say there are 512000 bots coming from the side of the line wanting to charge. So in your example they all form a tiny cloud 1005m away from the middle roboport. Then one bot will fly to each charging port. Once charged the next bot will fly to each charging port and so on. Each bot will have to cross at least 1000m before it starts charging. That is way longer than it takes to charge.

On the other hand in my suggestion the bots would all fly to the middle roboport stopping 5m from it. Then some go right and some left spreading out across all roboports untill all roboports have some bots charging and some waiting to charge 5m from the pads.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by darkfrei »

Why roboports have this power limit?
One bot comes, goes into the roboports and charges inside of it and another bot (the already charged one) goes out and fly away.
Koub
Global Moderator
Global Moderator
Posts: 8116
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Simplify roboport charging without repathing by linking touching/contiguous roboports

Post by Koub »

Because the whole bot system was designed so that a bot can only enter a roboport only when fully charged.
Sure, the devs could change the way it works, but then, how to distinguish the fully charged bot reserve and the charging in progress bots ? Well that could be implemented too. Oh but then time to change that for personal roboports too, and change the way robots charging interact with inventory, as the need for empty slots for robots charging would appear.
And so on.

And the 4 charging slots limit is to help balance the bots vs the other logistic options (belts and trains). Given enough robot speed research, the limiting factor will become the number of roboports you can cram in a given space to feed your power hungry bots.
Koub - Please consider English is not my native language.
Post Reply

Return to “Ideas and Suggestions”