Jump to content

City Population Calculations


Totally Hatebi
 Share

Recommended Posts

How far off are you? Could be a rounding error. What is the exact formula you are using and could you give an example where you get the wrong answer?

  • Like 1

Federation of Knox

Enlightened of Chaos, Event Horizon

QA Team and API Team

Link to comment
Share on other sites

  • 6 months later...

I have been having problems with this too. I tried for example running the crime calculations %((103-Commerce)^2+Infrastructure*100/111111)-Police Stations*2,5 and then put real city data to test:

71,89 infrastructure, 79 commerce and 0 stations and ended up with 5,760647010647010647 or 5,76% rounded up, whereas the actual rate shown in the city stats was a mere 0,07%

Link to comment
Share on other sites

20 hours ago, Comrade said:

%((103-Commerce)^2+Infrastructure*100/111111)

This part of your formula is incorrect and that is why you are getting the wrong answer. It should be ((103 - Commerce)^2 + (Infrastructure * 100)) / 111111

  • Like 1
  • Thanks 1

Federation of Knox

Enlightened of Chaos, Event Horizon

QA Team and API Team

Link to comment
Share on other sites

  • 6 months later...

Im running into problems with the population formula as well (Population = (Base Population - ((Disease Rate * 100 * Infra)/100) - MAX((Crime Rate / 10) * (100*Infra) - 25, 0) * (1 + ln(CityAgeInDays)/15)) and where base population = 100*infrastructure).
Im trying to apply it in google spreadsheet as follows: =(K41-((K40*100*F31)/100)-MAX((F35/10)*(100*F31)-25;0)*(1+LN(F36)/15))
I have checked and compared all the inputs with the actual numbers politics and war shows, and am thus 99.99% sure they are right. I end up with a population of 316.742, while it should be 449.954. 

In the translation the , in the original formula has become ; in mine. 

I can't find any other population formula, so this is what I'm working with. But I have completely forgotten where I got this formula and can't find it anymore either. 
 

Link to comment
Share on other sites

I got it. It should be Population = (Base Population - ((Disease Rate * 100 * Infra)/100) - MAX((Crime Rate / 10) * (100*Infra) - 25, 0)) * (1 + ln(CityAgeInDays)/15). Just a dumb bracket mistake. And the disease rate part should also be capped at 0 or above like the crime rate. Which would give:

Population = (Base Population - MAX((Disease Rate * 100 * Infra)/100, 0) - MAX((Crime Rate / 10) * (100*Infra) - 25, 0)) * (1 + ln(CityAgeInDays)/15)
 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.