How do (construction) robots select the Roboport where they recharge?

I can't figure out, how my robots select the recharge Roboport.

Let's say i have 200 construction robots and they have to travel ~150 tiles crossing other roboports. All of them just use just the 3 closest ports to the construction area. So sometimes 20 of them wait for a free charging spot, because only 3 ports are used to recharge. I'd say it would be more efficient if some of them fly back to a more distant port to recharge.

I know i can place more ports near the construction area, but how can i figure out the range they use to recharge? Is the condition, that the recharge ports area covers the build/delivery area?


The penalty is calculated for every roboport in the network this way:

distanceToTheRoboportInTiles * 2 +
countOfOtherRobotsWaitingToChargeThere +
countOfOtherRobotsWaitingToStationThere

The roboport with smallest penalty is chosen. This means, that for every extra tile of distance, there needs to be 2 less robots waiting for charge to make it worth to fly there. To be honest I'm not really sure if the constant of 2 is proper and we might change it in the future.


For any robot, it knows each roboport's current recharge queue and distance. From that:

<distance to different roboport in tiles> / <queue size of robots waiting> -> min

See: Choosing the post for charging