What is the formula for converting population to residential agents (workers, shoppers, students)?

The calculation you're asking for actually works the other way around in SimCity, the number of agents is taken and then run through a function to return a 'fudged' population figure.

The function in game that returns the population is as follows;

simcity.GetFudgedPopulation = function (a) {
    a = "undefined" !== typeof a ? a : simcity.gGlobalUIHandler.mLastPopulation;
    if (500 >= a)
        return a;
    if (40845 < a)
        return Math.floor(8.25 * a);
    a = Math.pow(a - 500, 1.2) + 500;
    return Math.floor(a)
};

This works out as follows;

  • if a is less than/equal to 500, return a
  • if a is greater than 501 but less than 40845, return (a-500)^1.2 + 500
  • if a is greater than 40845, return 8.25 * a

Here is a graph of how the actual population relates to the displayed population;

graph

To work out the number of agents that makes up your displayed population, you would use one the following formula (courtesy of OrigamiRobot@The Bridge), depending on the size of your population;

if population is:

  • less than/equal to 500, the population value is the number of agents active in the city
  • greater than 501 but less than 336971, use (population - 500)^(5/6) + 500 = a
  • greater than 336971, use population/8.25

This would return the number of actual agents present for your current population.