
I've seen a couple posts about how trade is going around Africa instead of going through the Suez, and I think I've found out why. I'm not a modder so I could be wrong, but here's how I understand it.
The distance divider for trade is being calculated based on the number of nodes, and not the actual physical distance between the route:
TRADE_CENTER_PREFERENCE_DISTANCE_DIVISOR = 0.25 #Weight is divided by 1 + ( distance in sea nodes * this ) between the two Trade Centers' hubs, this is done last after other multipliers/divisors
Same for the Merchant Marine Cost, it is also scaled by node and not distance:SHIPPING_LANE_MERCHANT_MARINE_COST_SCALING = 0.1 # The cost for a shipping lane for each node beyond the first. So at 0.1 it goes 1.0, 1.1, 1.2 and so on.
The tolls also scale hard for each increase in cost:TRADE_CENTER_PREFERENCE_TOLL_DIVISOR = 0.05 #Weight is divided by 1 + ( toll rate in whole percent * this ) for strait tolls along the route between two Trade Centers' hubs
Since sea state regions are not uniform in size and vary wildly, this leads to two separate routes having the same distance cost despite being much shorter. Take this Diagram:
Both going around Africa and going through the Suez Canal have the same number of sea nodes.
Both the blue and red routes have the same number of nodes, despite the Suez route having a much shorter distance, leading them to having the same distance cost. And on top of this, because the Suez route has up to 3 tolls, the British market chooses to trade around it.
To fix this Paradox should actually factor in the distance of each connection, or add some other multiplier to fix it.