An accurate formula for trade

How much gold does a single trade produce?
I determined a perfect formula, whose deviation is less than 0.01%! (could be tested in game)
The map size is m, the trade distance is d,
Trade unit work rate is w, the speed of trade unit is v,
The radius of trade building is R, the radius of trade unit is r,
Horizontal coordinate difference of the center points of the farthest trade buildings is Δx, and their vertical coordinate difference is Δy.


Explanations:
[★] is applicable to trade carts and cogs, suitable for all sizes of maps.
Parameters:
Trade carts’ radius 0.25, work rate 0.23, speed 1
Trade cogs’ radius 0.5, work rate 0.299, speed 1.32
image
image

*As a non-native speaker, it’s the best English I could use. Some words might be confusing.

1 Like

Does the deviation take into account obstacles on the trade route?

Well, gold for single trade has nothing to do with time, the game automatically calcutates the Horizontal coordinate difference of the center points of the farthest trade buildings is Δx, and their vertical coordinate difference. It has nothing to do with the real distance of the route of a trade unit goes through.