squirrels = squirrels + (survive - deaths + immigration - emigration + immigration - roadkill)
The survival rate is described in the yearling equation section. The death rate of mature squirrels was based on the amount of food present per squirrel ("food level"): 5% of the adults died when the food level was "high" (greater than 1.2 units per squirrel), 40% died when the food level was average (between 0.8 and 1.2 inclusive), and 70% died when the food level was low (less than 0.8).
Immigration and emigration were more complex; they took into account both the food level and area per squirrel. When the food level was high and there was a lot of area (at least 0.6 acre) per squirrel, immigration was highest, defined by:
int(.5 + (.8+.4*random) * (a_sq-.45)*total)
(Note the use of int(.5 + x) to round the values to the nearest integer.) When there was adequate area (0.4 to 0.6 acre) per squirrel, immigration was somewhat less:
int(.5 + (.8+.4*random) * (a_sq-.4)/2*total)
When the food level was not high or the area per squirrel was low (less than 0.4 acre per squirrel), there was no immigration.
Emigration, on the other hand, was highest when there was little food or area. If the food level or area per squirrel was low, emigration was defined as:
min(squirrels-deaths, int(.5 + (.8+random*.4) *
(squirrels-deaths) * ((.8-flev)/.8 + (.4-a_sq)/.4) / 2))
The value "(squirrels-deaths)" had to be used because dead squirrels are
not allowed to emigrate. Under other circumstances (at least adequate
food and area), there was no emigration.Roadkill was based on emigration and the total squirrel population; 60-90% of the emigrating squirrels and 10-30% of the other squirrels became roadkill.