The Segregation Model | Variations on the Basic Segregation Model | Agents Can Only Move in their Initial Area at First
- Source Code for Segregation Model Restricted (749 KB)
- Source Code for Basic Segregation model (730 KB)
- Shapefile (12 KB)
Following on from the previous model (segModelNoRandomSearching model), it is assumed that agents move to the nearest location were they will be satisfied with the current neighbourhood. However, as the agents are randomly located within an area based on population information held in the data file associated with the shapefile (see Building the Model in Basic Model), agents on the boarders of two areas often move from the original area to another area in the first iteration. This model (segregationModelRestricted) presumes that if an agent has chosen to live in the area, it is satisfied with that area. Therefore for the first iteration of the model, agents’ movement is restricted just to the area it is located within and not the surrounding areas (Figure 1). For more information compare moveAgentUntilHappy methods in the basic and Restricted Resident Classes. In the restricted model within moveAgentUntilHappy, a new method is called (see moveAgentUntilHappyRestricted) which restricts the agents' movement to within the polygon it resides in initially. This could be considered as initial adjustment or sorting for when the agents are first created, they are placed randomly within the area with no consideration of their neighbourhoods. Therefore restricting their movement to the area they reside in for the first iteration of the model can encourage local clusters to form.
Figure 1: The difference between movement in the restricted and basic/unrestricted segregation models.
While an agent’s movement is restricted in the first instance to the area in which it resides, neighbourhoods calculations are not made (they are the same as in the basic segregation model). Additionally if the agent cannot become satisfied in this area, it can move to any area within the system where it can be satisfied. However, after the first iteration, movement and searching is the same as in the basic segregation model (see Movement in Segregation Model). As with the previous models, an agent wants to live in areas where 50% or more of its neighbours are of the same type as itself and where movement and neighbourhood sizes are set to 100m.
The area used for the simulation consisted of seven wards of varying sizes and shapes (Figure 2). A total of 4200 agents were created (2340 red, 1860 blue) split between the seven areas (each area contained 600 agents, 3 areas had equal numbers of red and blue, 3 areas where composed of 70% red, and one area had 70% blue).
Figure 2: Simulation area with areas labelled based on the initial percentages of reds and blues and area.
Multiple model runs were carried out and compared with the results from the basic segregation model for the same area (Tables 1 and 2). Table 1 presents summary statistics from multiple model runs, specifically the number of areas that are predominantly red, blue or mixed (equal numbers of red and blue) at the end of the simulation and the number of moves that agents made. The effect of restricting the agents’ movement has little influence on the aggregate outcome of the number of red, blue and mixed areas at the end of the simulation. The effect of restricting agents’ movement in the first instance appears that simulations take longer to stabilise and agents move more during the course of a simulation compared to where agents’ movement is not restricted.
Table 1: Summary statistics from multiple model runs for the restricted segregation model.
A more detailed inspection of the model – specifically the average percentage change in composition of each area between the start and the end of the first iteration and end of the simulation for different areas – is presented for the restricted movement and basic segregation models in Table 2. For change between the start and the end of the first iteration, area composition changes least for the restricted model as one might expect. Where agents did move in the restricted model, they only moved from area 2 to areas directly adjacent i.e. to areas 3, 4, 5 and 7 as shown in Figure 2. Why agents moved from this area can be explained by it being the smallest and therefore most densely populated area with 420 (70%) of the original of the population being red. Combined with a neighbourhood search radius of 100m and preferences for 50% of the neighbourhood to be of the same type, it is not surprising that the blue agents move from this area. Area 2 also sees the largest change in population in the basic/non-restricted model for blue agents.
Overall, while the number of agents that did not move is least in the restricted model (see Table 1), the total number of agents that moved during the course of a simulation on average is greater. The change in the composition of the areas is also smallest at the end of the simulation runs when all agents are satisfied when the restricted movement model is used. Figure 3 provides screen captures of the restricted segregation model at the start, the end of the first iteration and at the end of the simulation when all the agents are satisfied. The underlying polygon colour represents the predominant social group of that area. While the images appear to be very different between the start and the end of the first iteration, there is actually very little change in the underlying data as shown in Table 2. However, due to criteria that a mixed area has to contain equal numbers of red and blue agents, the agents that move from area 2 affect the composition of the surrounding areas, therefore turning the mixed areas to blue. Animations highlighting the evolution of the systems for the Restricted and Non-restricted models can be seen below.
Table 2: The comparison of restricted and non restricted segregation models and the average agent composition for different areas.
Figure 3: Screen captures at the start, the end of the first iteration and at the end of the simulation when all the agents are satisfied.