Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: [Programming] Economy Model  (Read 3990 times)

0 Members and 1 Guest are viewing this topic.

Offline tomkeus

[Programming] Economy Model
« on: September 02, 2009, 06:55:54 AM »
Here's my take on the economic model.

We are modeling market based city/region economy. Economy provides our market with consumer products, gives money to city workforce, so it could buy aforementioned products and also supplies money to the city budget by paying taxes. So we should have private entrepreneurs opening new businesses when certain market conditions are met, and, again, when certain other market conditions are met, businesses should go bust. These conditions are in close relation to supply and demand, which are, as we know, basic things that drive free market economy.

This is how I think that should work. If we analyze workings private enterprize we see that it takes inputs (natural resources, services of other enterprizes, human resources etc) from market at one price and then provides certain outputs to the market (finished goods, services and so on) at higher price.

So we should have in-game simulation of markets for different commodities, goods and services. We should take a look how economists categorize real-world economy and then based on that subdivide game economy. For example:

Energy market: oil, coal, natural gas, electric power...

Natural resources: water, arable land, iron ore, aluminium ore, other significant metals ores, raw construction materials...

Low finalization products: construction materials, iron, steel, aluminium, agricultural products, fuels...

Medium finalization products: food products, clothes, furniture...

High finalization products: electronic devices, software, cars...

Services: banking, health, education, transportation...

I gave this list only as an illustration to what I had in mind. It needs more serious work. We should look carefully what are the most important branches of real-world economy and put them into the game.

Game shall simulate markets of external world. So city shouldn't be isolated island like in the SC4. It will boom, stagnate or contract, based on external economic conditions and resilience of internal economy.

Each market sector will have supply and demand. So when there is enough demand for certain product, and there is enough money for investments floating around (businesses are working profitable) new enterprizes will open, existing will expand, in order to satisfy that demand. Similarly, when there is too much supply of certain product enterprizes will go bust. Another thing that should be taken care of is from whom are products bought. So in-game businesses will be tied into interconnected network. When one large business goes down, it could take down a bunch of smaller businesses with itself. The same thing is for products sale.

So, how would simulated business look like? Here's rough sketch:

Code: [Select]
Business
{
%These are things company consumes in order to make it's products.%
%Each one has provider%
Inputs = {{Commodity1, ExternalWorld}, {Product1, Company1},
{Product2, Company2}, {Service1, Company3}...}

    %These are things company produces. Each one has it's buyer%
    Outputs = {{Product4, RetailMarket}, {Service5, Company3}...}

    %List of employees%
    Workers = {Citizen1, Citizen2, ...}

    %Update is function that implements company's work. It will take%
%market prices of Inputs and based on market conditions decide on%
%prices of Outputs and worker's salaries. This function will also%
%make planning decisions, like from whom are products bought and whether%
%to employ more workers. Value added tax is also implemented here.%
    Update()
}

Let me make a picture to illustrate this:



As you can see, there are two company-like entities ExternalWorld and RetailMarket. I've already explained the role of external world an RetailMarket is endpoint of in-city economy. Because when we have retail companies, their outputs dont go to other companies but to consumers. In this way unified framework is provided to represent interactions within economy. Update() function of ExternalWorld would be used to simulate external economy, and Update() of RetailMarket would be used to simulate demand for consumer products within city.

I hope you will find, same sa I have, that this is very powerful way to simulate economy. Almost limitless varieties of businesses could be modeled from this prototype. Players could easily script new companies just by inheriting class of existing company and overriding Update() method or by modifying Inputs or Outputs or All.

This is just my first take on economy. It needs lot of work but I hope you understand the basic idea.
« Last Edit: September 03, 2009, 11:41:28 AM by Nique »
#define TRUE FALSE /*Happy debugging suckers*/

Offline Nique

  • Moderator
  • Forums Governor
  • *
  • Posts: 288
  • Total likes: 0
  • Reputation: 6
  • The dutch will do it ;)
[Programming] Economy Model
« Reply #1 on: September 02, 2009, 07:13:28 AM »
Do i understand correctly that the 'external' economy is 'simulated'.. and does not really need to exist physically? (i mean, we shouldn't make the city depend on it's own resources.. or trading. The mayor's job is not to 'trade', that's the companies job. The only thing a mayor should decide, is to import / export city production / needs. ex. power, water, waste) The economy (industrial / commercial companies in your city) should trade on it's own?
« Last Edit: September 02, 2009, 07:28:17 AM by Nique »
Proudly developer of

Offline tomkeus

[Programming] Economy Model
« Reply #2 on: September 02, 2009, 07:37:45 AM »
Do i understand correctly that the 'external' economy is 'simulated'.. and does not really need to exist physically? (i mean, we shouldn't make the city depend on it's own resources.. or trading. The mayor's job is not to 'trade', that's the companies job. The only thing a mayor should decide, is to import / export city production / needs. ex. power, water, waste) The economy (industrial / commercial companies in your city) should trade on it's own?

External economy is simulated so some level of unpredictability would be introduced in gameplay. SC4 allowed for relatively simple linear strategies for development because city/region economy was self-sufficient.

It is much more interesting when, for example, you have just planned for lush new expansion, but suddenly external markets crashed creating economic mayhem in your city. You would then really have to put your mayor skills at work.

One of the first things I've said is that economy is free market oriented. Companies trade between them and with outer world. So city will have real exports and real imports which could be tracked. For example, player will have stats available on how much consumer electronics city exported, how much fuel was imported etc.
#define TRUE FALSE /*Happy debugging suckers*/

Offline Atomius

Re: [Programming] Economy Model
« Reply #3 on: September 30, 2009, 03:42:49 PM »
External economy is nonexistant in Simcity, and a mayor doesn't need to zone for farms to get residents for instance. For a realistic economy the external economy variables would be of importance, and i suppose if one made a region with lots of farms that should have some economic affect, as should a drought that effects said farms. Just how self sufficient a region is should be considered... I imagine this could be done similar to the 'easy,medium,hard' menu in Simcity, i.e playing a 'hard' city would require you to grow your own crops for your people, i.e make a self sufficient region/nation/state, whereas selecting 'easy' would allow you to build your city in the 20th century with already existing trade links to simcounties/states around your region.

What would be best imo is to choose this as part of the region class/type. The region could be a country,state or single administrative city area, and be self sufficient, or only semi self sufficient (i.e realistically relying upon both imports/exports). There could also be controls for what nation the region was inspired by/located in (think tilesets in 2000 but set to 'America' or 'Australia etc) and what year/technology level (i.e 1990,1300 etc)

But of course that's all way in the future.

back to the economic model, say you did use this outside economy setting system, if the region was self sufficient its farms would be of importance much more, and perhaps exporting would be set up gradually and realistically like in say a colony like New South Wales in the 1700s, whereas if you set 'easy' the country/state is set up in a world economy already with links, like that city in America in Tintin in America.

Import/export to me is really important and an integral and realistic element of any successor to 4. Most real cities have this system and ports and airports/railways etc finally serve a more important purpose.

Internally i like the idea of individual businesses/individual workers being simulated rather than by bulk simulation (this shop has 40 workers etc) and also of an effect of say a bankruptcy of unemployment spiking.

Unemployment should also be more realistically simulated and be of higher importance as it leads to crime, juvenile delinquency, drug usage, lower land value, lower city 'aura' etc... And unemployment imo should be as important an area for development in the simulator as say rioting/citizen unrest or crime.

Offline Djohaal

Re: [Programming] Economy Model
« Reply #4 on: December 28, 2009, 11:07:13 PM »

Unemployment should also be more realistically simulated and be of higher importance as it leads to crime, juvenile delinquency, drug usage, lower land value, lower city 'aura' etc... And unemployment imo should be as important an area for development in the simulator as say rioting/citizen unrest or crime.

Yes, and the unemployment sim should be very sensitive, in real life an increase of 1% on unemployment is often catastrophic...

Offline colonyan

Re: [Programming] Economy Model
« Reply #5 on: February 08, 2010, 09:44:58 AM »
I'd like to post my first rough idea.

I applied idea of industry chain from raw resource extraction to final products where each step
assigned to each sub category of industry type(~9). Where those final products are 
categorized in 3 final product types to be consumed at all stage of growth and construction.

CM for construction material, CS for consumer goods and PD for products.

Thus industry production capacity becomes important since it determines how fast cities/whole region can grow.
So player will be required to manage industry sector depending on the magnitude of game difficulty setting.

It will be also required that freight transportation infra(road, highway, railroad, seaports, ware house) be sufficient
inside the whole region.

Above mentioned industry type is different from industry zone type(agriculture, medium, dense density).
Those industry type have each specific role in the industry chain.
Such as construction material factory consumes heavy material produced in foundry.
So construction material factory and foundry will be example of industry types.
In game, there will be different size/capacity/efficiency of those factory types.

Later, I want cities to have some kind of specialization in industry type so there will be feel of freight movement
among the cities. But of course, mayor only need to worry about transportation infrastructure.
Mayor could encourage certain type of industry through taxation.

Also, propagation and price map of each product and its ingredients must computed.
I believe if we can have economy grid layer which determine the price map, doesn't seems to become too much of burden.

[1st stage]_RESOURCE_EXTRACTION_______________________________________________________
Water-Pump :almost all terrain
RawFuel-Extraction Site (zoneing)  :Fairly Abundant, Concentrated location
RawOre-Extraction Site  (zoneing)  :Abundant, Disperse location
Nat.Gas-Extraction Site  (zoneing)  :Variable *electricity purpose only

[2nd stage]_RESOURCE_PROCESS_water and fuel consumed____________________________________
Agriculture
             Farm:  Water > Crop                       / self extracting water

BaseIndustry(Dirty In dusty)
   Refinery:                    RawFuel > Fuel                 / heavy pollution
  Foundry:           RawOre +Fuel > HeavyMaterial (hm)   / heavy pollution, Higher Fuel Use
Processor:Crop + RawOre + Fuel > LightMaterial   (lm)        / medium pollution, light Fuel Use 
         Mill:                       Crop > RawCommodity(rc)           / light pollution, Water Heavy

[3rd stage]_Production___________________________________________________________________
Manufacture(HighTech)*
CM factory:              hm       > CM         / Water & Electricity Heavy
CG factory:                 rc + Crop   > CG         / Water Heavy
PD factory:             hm  + lm    > PD              / Electricity Heavy, light material dominant

*(HighTech)
High Tech Version available upon condition met > lower pollution, efficient resource use

[Power plant]
Fuel Power Plant + RawFuel > Electricity (large only)
Coal Power Plant + RawOre > Electricity (small, large)
Nat. Gas Pow.Pl.  + Nat>Gas > Electricity (small, large)
Fiss. Pow. Plant   +  lightMat > Electricity  (large only)
Wind, Solar, Fusion

_General Idea_________________________________________________________________________
Construction Material (CM) = Steel,Concrete,Tile,Paint, etc
 Required for all structure

Consumer Goods (CG) = Food,Cloth,Paper,etc
 Essential for all residents

Products (PD) = Furniture,Car,Electronic,HomeAppliance, etc
 Higher income level RES/COM demand those more, Required for IND construction

At early stage, CM & CG are more required
As Population grows, CG needs expands proportionally
As Income grows, PD&CM demand skyrockets
As both population and income growth stagnates, CM & PD dwindles too

_Busisness Sector_______________________________________________________________________
PD,CG,CM,Fuel&Electricity (in order of importance) production  >>demand>> Retail
Retail and MidWealth & Up  >>demand>> Office

_Rough Mechanic________________________________________________________________________
-industry develop according to population, product demand and its growth
-city warehouse(s) play as storage/transfer point.
-factories stops production as stock pile reach threshold
-city exports excess/import if there is room for stock
  -road/boulevard/highway: from  3/5/7 radius respectively
  -railroad: from up to 8 radius
  -seaport: from up to 20 radius with another seaport

-CM-Stock indefinitely proportion to CM factory scale
-CG-Shorter Stock period/quantity
-PD-Medium Stock period/quantity
-population and its wealth proportion reflects CG,PD demand to city warehouse
-growth/new construction substrates CM from city warehouse
-game start with CM & CG reserve
    (whole map common CM & CG pool, stock pile depletes as time progress)
    (External World replenish it as it depletes with some kind of price)
-start with agriculture, $resident and dirty industry demand(same as sc4)
    (have tendency to want to replenish CMCG pool)
_______