Very low cosntruction and logistic robot speeds prevent them from moving at all

Bugs that are actually features.
Zanthra
Fast Inserter
Fast Inserter
Posts: 232
Joined: Fri Mar 25, 2016 8:18 am
Contact:

Very low cosntruction and logistic robot speeds prevent them from moving at all

Post by Zanthra »

While playing using my GTTS mod targeting 240 UPS, I ran into the issue that some out of power construction and logistics robots were occasionally stuck bobbing in place on the map while there were free roboports available to charge them. I found that this was related to very low robot speeds.

I created a test mod RSM_1.0.0 which simply has:

data.raw["construction-robot"]["construction-robot"]["speed"] = 0.0045

I also set up a game save with a set of construction robots deployed and returning to a nearby roboport. It helps to enable the debug options "show-entity-positions" and "show-directions". It shows they are only able to move orthogonally with this speed if pointed in certain directions, and as they get close to the roboport for docking or charging come to a stop. If you finish the worker robot speed 1 research before they run out of electricity, they will gain the ability to move diagonally, reach the roboport for charging and finally dock.

In discord last night (for me) Bilka said, "the smallest value step for positions should be 1/2^8 = 0.00390625". While I initially didn't think that had anything to do with this as it didn't match the speeds I was seeing the problem at. I this morning after some rest, I realized I had been thinking very one dimensionally... While I am still not sure whether that has anything to do with this, it is suspiciously close to the orthogonal components of the robot speeds which they fail to move in some directions (0.00390625 * sqrt(2) ~= 0.0055).

I have a workaround for GTTS by boosting the out of energy robot speed multiplier if the potential minimum robot speed gets too low, and only occurs at scaling for the very highest UPS targets, but I figure that should not stop me from still reporting the issues that seem like bugs in the engine.
Attachments
Robot Speed Demo.zip
Save game with robots returning to roboport.
(10.06 MiB) Downloaded 17 times
RSM_1.0.0.zip
Mod that changes construction robot speed.
(752 Bytes) Downloaded 21 times
Last edited by Zanthra on Wed Oct 23, 2024 7:48 pm, edited 1 time in total.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Very low cosntruction and logistic robot speeds prevent them from moving at all

Post by kovarex »

Hello, the precision of map position bilka was mentioning is really present.
The direct implication is that if you move less than that per a single tick, you just don't move at all, this is a tradeoff we chose to do long time ago when deciding memory performant data structures.
And yes, we could program some workaround for cases like this, but I perfer not, and call it the limitation of the engine.
Zanthra
Fast Inserter
Fast Inserter
Posts: 232
Joined: Fri Mar 25, 2016 8:18 am
Contact:

Re: Very low cosntruction and logistic robot speeds prevent them from moving at all

Post by Zanthra »

I understand entirely. Thanks. I'll work around it.
Post Reply

Return to “Not a bug”