sobisonator/imp19c

Alternative trading simulation

Opened this issue · 2 comments

To avoid performance issues from exchanging stockpiles, it may be wise to use an alterantive trade system.

The system could work like so:

Tradegoods do not have stockpiles, only rates of production. The difference between production and demand in a governorship is the deficit or surplus.

When a governorship has deficit, it loses wealth every quarter to the tune of the tradegood's wholesale price times the deficit.

When a governorship has surplus, it makes wealth every quarter to the tune of the tradegood's wholesale price times the surplus.

The wholesale price of a good is unique to every governorship (effectively, every tradezone within a country). It is derived from the following:

  • The total demand in all governorships in the tradezone (++)
  • The total demand in all governorships in the world (++) <x0.5 unless globalised)
  • The total deficit in all governorships in the world (+) <x0.5 unless globalised>
  • The total deficit in all governorships in the tradezone (+)
  • The total deficit in all governorships in the customs union (+)
  • The total surplus in all governorship in the world (-) <x0.5 unless globalised>
  • The total surplus in all governorship in the tradezone (-)
  • The total surplus in all governorships in the customs union (-)
  • The total surplus in all trade partner countries (-)

International trade income

For every trade good, every country's deficit total (i.e. sum of all deficit minus surplus from governorships) gets totalled up and distributed to all trade partners in a ratio based on the trade partner's total surplus (i.e. sum of all surplus minus deficit from governorships)

This does jeopardise the transport cost simulation, so we would need a way to re-introduce that.

This will need a way of integrating trade infrastructure capacity.

The obvious answer is that trade infrastructure capacity caps the surplus bonus for the purpose of all surplus calculations.

In terms of imports, trade infrastructure capacity which is less than the deficit could result in critical shortage events or modifiers