The previous models (e.g. Location Model, Location Model Same Income and Location Model No Geography) have explored how the spatial distribution of agents is influenced by the desire for space and how this in turn is affected by income. The model now moves to how density can additionally affect the choice of location and the spatial distribution of agents. Within the previous models there was no maximum number of agents per unit area which sometimes resulted in a large number of agents in a small area and other areas unoccupied. The introduction of density attempts to alleviate this problem. Therefore in this model (see Location Model Density), agents not only have a preference for space which is influenced by income, but also an impact on the density of other agents in their local neighbourhood. For example, industrial firms might be driven by the need for large amounts of land in low density areas while financial services may need less land but desire a more densely populated area in a central location.
Before describing the effect density has on the spatial pattern of agents, it is felt important to explain how density has been incorporated into the location model and why some of the assumptions were made. To add density into the model, each type of agent (e.g. of type resident or employer) is given three new attributes - ‘current density’, ‘maximum density’ and ‘current density for the other type’ of agents as highlighted in Figure 1 (see for example, the fields currentResidentDensity, maxDensity, and currentEmploymentDensity and the respective methods getCurrentPopulationDensity, getMaxDensity and getCurrentEmplotmentDensity for type Resident Agent).
Current density refers to the density of agents of the same type in the agents local neighbourhood, maximum density refers to the maximum density for that agent will be satisfied with (see below) while current density for the other type relates to the current density of the other type of agents within the local neighbourhood. For example for type resident, this would be the density of employers within its local area as highlighted in Figure 1 under ‘EmpDen’. The other agent’s attributes are the same as in the previous versions of the location model. Each agent knows its location (see getLatLon and getGeometryResdient in Resident Class for an example), its age (getAge), has a space requirement (set in setOriginalMinSpaceWanted), an income (e.g. setRandomIncome) and stores the number of times it has moved as already discussed in the Agents and their Environment section of the Location Model.
‘Current density’ refers to the density of agents of the same type in the agent’s local neighbourhood, ‘maximum density’ refers to the maximum density which that agent will be satisfied with (see below), while ‘current density for the other type’ relates to the current density of the other type of agents within the local neighbourhood. For example, for type resident, this would be the density of employers within its local area as highlighted in Figure 1 under ‘EmpDen’. The other agent’s attributes are the same as in the previous versions of the location model. Each agent knows its location (see getLatLon and getGeometryResdient in Resident Class for an example), its age (getAge), has a space requirement (set in setOriginalMinSpaceWanted), an income (e.g. setRandomIncome) and stores the number of times it has moved as already discussed in the Agents and their Environment section of the Location Model.
Figure 1: An example of a resident agent of group ‘service’ with new attributes for current density, maximum density and employment density; and the panel for user interaction.
Agents are first assigned their three densities after all the agents have been created (this is called in the buildModel method of the LocationModel, which calls setInitialDensityThresholds which inturn calls the setOriginalDensity methods in the Employer and Resident Classes).. For ‘current’ and ‘other group’ density values, these are calculated using the local neighbourhood of the agent which is used when the agent is searching (see Local Searching in the Location Model), calculating the total number of agents of the same and opposite groups and dividing this by the area of the local neighbourhood.
Assigning the maximum density value of each agent is calculated differently (see getAttribGeomStatisticsForTypesOfClass from the LocationModel class). The program calculates the densities of each group of agents for every small overlapping area which divide up the entire area (i.e. the sum of all the agents of the same type within each small area divided by the area of the small area). Once this has been done, the program stores the lower (25%), medium (50%), and upper quartiles (75%) and the maximum density values utilzing the BasicStatistics class. The agent is then assigned a maximum density value between these ranges, where the ranges chosen are specified by the user (see setup method in the LocationModel class for the list of property descriptors for agent density preferences). For instance, the user may wish all residents of group commerce to have a maximum density value between the medium and upper quartile ranges. This is highlighted in Figure 2 where a type resident agent aged between 35 and 65 and of group commerce is assigned a maximum density value (see setOriginalDensity methods in the Employer and Resident Classes for more details).
The reason for calculating maximum density differently to current density is due to the desire to give the agents of the same type similar density values, thus encouraging competition for space. However, it needs to be noted that the initial placement of agents will affect their density tolerances. For example if the agents fall within one small area and all the other small areas are empty, the maximum and minimum density values will have a greater range than if the agents are evenly spread throughout the entire area.
Figure 2: Pseudo-code for setting the maximum density value for an agent of type resident and of group commerce aged between 35 and 65 (see setOriginalDensity method in Resident class for more details ).
As in the previous simulations, agents still desire to be located in the most accessible area they can afford (see the Choice of Location section in the Location Model). However, this choice of location is now not only governed by the price of land (i.e. total income of the area based on the sum of all the income of all the agents divided by the area), but it has an extra element, that of maximum density which the agent does not want to cross, as highlighted by the pseudo-code in Figure 3 (see calculateAttractiveAreas and evaluateAndSetHappiness methods in the Resident and Employer classes). Thus the agent’s searching mechanism is still the same as described in Choice of Location section in the Location Model. If the agent cannot afford the land or the density is too great, it continues to search. If after searching the entire area with the agent not finding a suitable location be it too expensive or densely populated, it leaves the system.
Figure 3: Comparison of pseudo-code before and after density constraints have been introduced based on employer agent of type industry (see the evaluateAndSetHappiness method in Employer class for more details).
As highlighted above, the addition of density has resulted in some changes to the basic location model. The final part of this section will explore how these changes affect the structure of the model. Steps within the location model when density is introduced are similar to those described in Steps within the Location Model although there a few differences. For example, compare Figure 4 which outlines the steps within the location model when density is introduced with Figure 13 from Steps within the Location Model which shows the steps within the location model when there is no density constraint. These differences between the two models will now be outlined.
When the model is being built after all the agents have been created, density tolerances are calculated as highlighted in Figure 2 and discussed above. Additionally the agents’ ‘current density’ and the density of ‘other type’ of agent are calculated. Once the model has been built, alterations were made in the Step method. Specifically if the agent is of type resident and it has reached a new age group, not only will its space requirements change as in the previous models (see Residential Agents section in Location Model) but so will its density as shown in Figure 5 (see setNewDensityThresholdDueToAgeing method in Resident Class). Agents are given a new ‘maximum density’ value which is chosen by the program based on density ranges specified by the user. The program goes through a list of agents of the same type and group as the agent in question and who are also in the same new age range. For each agent which matches the above criteria, the program stores the maximum density value. Once this has been done, the program then chooses a value between the minimum and maximum value and assigns this as the agent’s new maximum density value. The model assumes that all agents within the same group and age ranges have the same space and density preferences.
Additionally when the agent is searching for a new location, the agent is not just searching for an area which it can afford based on its space requirements but also where its density tolerance is not exceeded as highlighted in Figure 3. In post-Step if a new agent is added, its maximum density is set the same way as if the agent had entered a new age range. While this will stop areas becoming too densely populated, if the number of agents grows, it will also cause competition for less densely populated land. Additionally in post-Step, the agents record their ‘current density’, as well as evaluating whether or not they can afford their current area based on other agents within their local neighbourhood buffers (see Local Searching section in Location Model). If either the agent cannot afford the price or density is too high, the agent is classed as still searching.
Figure 4: Flow diagram of the key processes within the location model when density constraints are introduced.
Figure 5: Pseudo-code for setting new space and density values for resident of type service if they enter a new age group.
The influence of density and how it affects the distribution of agents has already been explored in relation to the segregation model (see The Density Model). Within this model, the aim is to see how density influences the spatial distribution of agents when they are competing for land. As discussed above, agents still have a space requirement; however, this is no longer just determined by whether or not the agent can afford a certain amount of space but also when the population density is below a certain threshold. The following section will explore several scenarios where different groups of agents have different density tolerances as highlighted in Table 1. As with simulations presented in Varying Income, agents are given the same space requirements and income ranges and the same area is used. This area contains 1389 residents (478 (35%) of group commerce, 201 (14%) of industry, and 710 (51%) of service) and 105 employers (46 (44%) of group commerce, 13 (12%) of industry, and 46 (44%) of service) distributed over the 6 most accessible areas as highlighted in Figure 6. Additionally, Figure 6 highlights the density of agents based on the population of the area and based on points (i.e. the agents) broken down into quartile ranges (calculated using a density function with a search radius of 75m, whereby points that fall within the search area are summed, then divided by the search area size to get each cell’s density value ). The latter highlights the variation in density within areas.
Table 1: Space, income and density ranges for different types and groups of agents.
Several simulations were run for each experiment, with small areas and neighbourhood sizes at 75m for all simulations and experiments. Table 2 presents the average number of agents in different zones at 100 iterations for these experiments. Experiments 1 (click here to see a selection of animations) and 2 (click here to see a selection of animations) use the same density ranges for employers but reverses the pattern for residents (see Table 1). This change in density preferences clearly alters the distribution of agents in different zones by 100 iterations. Commerce residents occupy the outer less populated zones in experiment 1 while industrial residents occupy the more densely populated inner zones in experiment 1. These preferences are reversed in experiment 2 where the two groups switch positions. Figure 7 highlights these typical distributions of agents at 100 iterations with different density preferences. A selection of animations pertaining to these experiments can be found below.
Figure 6: Typical initial distribution of agents at the start of a simulation.
Table 2 : Average number of agents in different zones from different density tolerances.
Figure 7: Typical distribution of agents at 100 iterations with different density preferences.
In experiment 3 (click here to see a selection of animations), all agents’ tolerances are set between the upper quartile and maximum density values, agents’ distributions are similar to the distribution when there are no density constraints, and agents of different groups have different income ranges (see Varying Income section, Table 2 and Figure 1 ). Specifically, all agents occupy the four most accessible areas (see Table 2). Experiment 4 (click here to see a selection of animations) restricts all agents’ densities to the medium and upper quartile ranges while experiment 5 (click here to see a selection of animations) to the lower and medium quartiles. These restrictions see agents being more evenly distributed and mixed throughout the area. Restricting the agents’ location to the lower and medium density quartiles generates the greatest reduction in the number of agents throughout the simulation runs (Figure 8), when agents were removed in all experiments except in experiment 3. This removal occurred during the initial stages of the simulations as they compete for locations where their preferences are matched. Agents that were removed from the system were a result of their maximum density tolerances being exceeded and not because they could not afford an area. In no instances were employer agents removed from the system.
The experiments presented above illustrate that the introduction of density cannot only reduce the number of agents in an area but that different density preferences result in different spatial patterns of land-use within the system.
Figure 8: Total number of residential agents over time.
Experiments 1 and 2
Experiments 3, 4 and 5