by Haron » Fri Oct 02, 2020 9:57 am
Examples:
Let’s say that the port of Vaasburg has a population of 1B citizens, and is controlled by Spain. Now, I do not presume to be able to give good numbers for “buying levels” or associated prices at this time, so these numbers are purely for illustration purposes. Let’s say a 1B population gives the following “buying levels”:
Minimum level: 10 000
Level 1: 20 000
Level 2: 15 000
Maximum level: Infinite
Whether or not the maximum level should be infinite or an actual number determines if it will always be possible to sell a goods or not. The price for this level should be very low, possibly even selling at a loss, and definitely no more than 1gc above average production price for a good. The number of levels can also be tuned, obviously. As well as the amounts.
Let’s set a price the port is willing to pay for, say, food, at the various levels:
Minimum level: 50 gc (max)
Level 1: 10 gc
Level 2: 8 gc
Maximim level: 6 gc
So far, so good. Now let’s make a list of players selling food at Vaasburg. I’ll just name them A, B and so on, with a (S) for players of Spanish nationality. The list is player name, crates for sale, and selling price.
A 3000 7
B 2000 7
C 5000 8
D 6000 9
E 8000 9
F 4000 11
In this case, the port will first want to buy it’s minimum level, 10 000 crates. It always buys the cheapest first. So it buys 3000 crates from A for 7 gc each, 2000 crates from B for 7 gc each, and 5000 crates from C at 8 gc each. Next, it wants to by up to 20 000 crates, but is only willing to pay a maximum of 10 gc per crate. There are 14 000 crates left for sale for under 10 gc each, so it buys those: It buys 6000 crates from D at 9 gc each, and 8000 crates from E at 9 gc each. Since the next crate would cost more than 10 gc, the port will not buy any more crates of food this hour.
Next example, cotton. Here’s what the port is willing to pay:
Minimum level: 50 gc (max)
Level 1: 10 gc
Level 2: 9 gc
Maximum level: 7 gc
Here are the players selling cotton at Vaasburg:
A 1000 10
B 2000 11
C 5000 40
And that’s it. The port first tries to buy it’s minimum level, 10 000 crates. Since there are less than 10 000 crates for sale, the port will buy all the crates available (it may seem like player C suspected this): It buys 1000 crates from player A for 10 gc each, 2000 crates from player B for 11 gc each, and 5000 crates from player C at 40 gc each. Since this is less than the minimum amount, the port population will drop (slightly – the amount needs to be tuned) this hour. Spain needs to ensure that more cotton becomes available in Vaasburg.
Next example: Rum. Here’s what the port is willing to pay:
Minimum level: 50 gc (max)
Level 1: 15 gc
Level 2: 12 gc
Maximum level: 11 gc
Here’s what is available for sale:
A 5000 12
B 5000 12
C 6000 13
D(S) 6000 14
E 10 000 14
F 6000 14
G(S) 7000 15
So, first the port will buy it’s minimum amount, 10 000 crates. It buys 5000 crates from A at 12 gc each, and 5000 crates from B at 5000 each. Next, it will buy up to 20 000 crates for maximum 15 gc each. Since there are more than 20 000 crates for sale at 15 gc or less, it will buy 20 000 crates – the cheapest first. So, it buys 6000 crates from C at 13 gc each. Since player D is from Spain, the port prefers to buy from player D rather than player E and F, even though they sell at the same price. It therefore buys 6000 crates from player D at 14 gc each. Now, it wants to buy 8000 more crates, and there are 16 000 crates left for sale at the lowest price, 14 gc. It thus will buy 50% of these crates from each player. So it buys 5000 crates from player E for 14 gc each, and 3000 crates from player F at 14 gc each. The port has now filled it’s level 1, and is now only willing to pay 12 gc for any further crates. Since no more crates are available for 12 gc or less, the port buys no more crates.
Final example: Iron. Here’s what the port is willing to pay:
Minimum level: 50 gc (max)
Level 1: 20 gc
Level 2: 16 gc
Maximum level: 14 gc
Here’s what is available for sale:
A 5000 14
B 50 000 14
C 8000 14
D 2000 15
E 3000 16
To fill both its minimum level, level 1 and level 2, the port is willing to buy up to 45 000 crates. Since more goods than this is available for the price the port is willing to pay at it’s maximum level, it will buy all the goods that is available for 14 gc each. Any port will always buy at least all the goods available for this minimum price if the maximum level is set to infinite. It seems like there is too much competition for iron sale in Vaasburg. Perhaps time to sell your iron elsewhere? So the port buys 5000 crates from player A for 14 gc each, 50 000 crates from player B at 14 gc each, and 8000 crates from player C at 14 gc each.
The T'zak Ryn offers Naval Combat Solutions for the Quality Conscious Customer