Yes, my model is an agent-based model. I would explain it to you in more detail but it is quite complicated. If you are interested I just updated the game the new version showcases a bit more information.
Viewing post in GeoEconomic Simulator jam comments
Okay in that case let me take a deep dive into the programming. In the Simulation there are basically two objects people and land. Lets start with the people, the people have 3 Skills, because the simulation has 3 different types of work (Agriculture, Industry, Office). In random intervalls the people will call a function find_job and a function find_home. These functions loop through all available jobs and homes that are provided through the land and find the one with the best payment/livelihood. It is possible for people to become unemployed if the payment for the job is below the unemployment benefit and it is also possible for someone to become homeless (live in another city) if some threshold of livelihood is not met or if there is not sufficient housing available. The Livelihood is calculated like this:
livelihood=location(x,y)+space-travelling_cost+10*sqrt(person.income-rent)
-location is just the bonus some buildings give around them
-the traveling cost is the manhattan distance between the workplace and the home
-and then I used the squareroot as a concave function for the deminishing return of available income
while the payment is just:
payment=person.skill[field_of_work]*wage
the wage term is calculated indepent:
wage=(profit(worktalent+100,maintenance,maxrevenue,saturation)-profit(worktalent,maintenance,maxrevenue,saturation))/(100)-maintenance/expected_number_of_workers/50
the profit that is added to the company per worker declines the more workers already work there:
profit(WT,M,MR,S)=MR*WT/(WT+S)-M
why do I calculate the wage as I do?
The first part is to make sure that the wage (the payment per Skill) is so low that the company always profits from hiring someone for this wage. And the second part is to insure that also the maintenance cost is covered by the profit.
Now to the Land:
The land can host a variety of buildings these buildings can make a profit. This profit then influences the price of the neighboring land.
I showed you the formula how I calculate the profit of companies but land can also host housing for this it works very different. The profit for housing is just the accumulated rent from the tenants, minus the maintenance cost. Now an import part is how the rent is determined. For this I have 5 metrics that are either true, false or neutral. True values increase the rent while false values reduce the rent.
1.more liveable than average housing?
2.fuller than average housing?
3.profit lower than land price?
4.house full?
5.less housing than people?
Okay and the last important point is that if a land accumulates a loss greater than 10 times its maintenance cost the land declares bancrupcy and the building on the land is replaced by a random other structure. All workers are fired all tenants are evicted.
I hope I was able to help you with this overview, if you have more specific questions feel free to ask.
Best wishes
Dominik Eifler