Topic: request-supply logic

PointLuck
Avatar
Topic Opener
Joined: 2021-07-07, 19:21 UTC+2.0
Posts: 3
Ranking
Just found this site
Posted at: 2026-04-11, 13:26 UTC+2.0

Hi,

I'm playing 1.3 and was trying to understand how goods are distributed, especially when there is less supply than demand. I made the following test, playing the frisians:

1 well for water, many many farms for an abundance of barley, then 1 bakery, 1 brewery, and 1 donkey farm. They all only need 1 barley and 1 water for a single production cycle. They are all set to the same "normal" priority. I isolate that economy with an added warehouse and set the economy to infinite for the wares in question.

When running this for a long time (high game speed) to get it into the steady state, I'm surprised to see that the brewery is at 100%, and the bakery and donkey farm are at 0%.

Brewery, bakery, and donkey farm are all next to the well, but in fact, the brewery needs 2 hops to deliver the water, the other two buildings need only 1 hop. Yet, the brewery is the only one that gets all the water.

I found void Economy::process_requests in src/economy/economy.cc and had a superficial look. It's not very clear to me how supply and demand are matched.

Does anyone have any insight, is there a simple "mental model" I can apply? Or maybe someone can point me at the right piece of code to try and understand it.

I'm not trying to argue for a code change: It is surprising to me that in my test it didn't more uniformly distribute the water. Do you think I made a mistake in my setup? What would you expect?

/PointLuck


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10 UTC+2.0
Posts: 2167
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2026-04-13, 09:27 UTC+2.0

Hi,

as far as I know, in this case the ware goes to the closest target. If several targets have the same distance, it might be about the direction (or something else?). If that does not match with your observation, let me know. I think the direction rather matters, not the building type.

PointLuck wrote

Hi,

I'm playing 1.3 and was trying to understand how goods are distributed, especially when there is less supply than demand. I made the following test, playing the frisians:

1 well for water, many many farms for an abundance of barley, then 1 bakery, 1 brewery, and 1 donkey farm. They all only need 1 barley and 1 water for a single production cycle. They are all set to the same "normal" priority. I isolate that economy with an added warehouse and set the economy to infinite for the wares in question.

When running this for a long time (high game speed) to get it into the steady state, I'm surprised to see that the brewery is at 100%, and the bakery and donkey farm are at 0%.

Brewery, bakery, and donkey farm are all next to the well, but in fact, the brewery needs 2 hops to deliver the water, the other two buildings need only 1 hop. Yet, the brewery is the only one that gets all the water.

I found void Economy::process_requests in src/economy/economy.cc and had a superficial look. It's not very clear to me how supply and demand are matched.

Does anyone have any insight, is there a simple "mental model" I can apply? Or maybe someone can point me at the right piece of code to try and understand it.

I'm not trying to argue for a code change: It is surprising to me that in my test it didn't more uniformly distribute the water. Do you think I made a mistake in my setup? What would you expect?

/PointLuck


Wanted to save the world, then I got widetracked

Top Quote