Acadlore takes over the publication of IJEPM from 2025 Vol. 10, No. 3. The preceding volumes were published under a CC BY 4.0 license by the previous owner, and displayed here as agreed between Acadlore and the previous owner. ✯ : This issue/volume is not published by Acadlore.
Agent-based Modelling of Electricity Access in Informal Settlements in South Africa
Abstract:
In the latter half of the 20th century and the first decades of the 21st century, urbanisation in developing countries has increased dramatically. Across the developing world, urban populations have been rising rapidly, and the capacity of national and municipal governments to service these growing populations has not been able to keep pace with rising demand. This has led to a rise in informal access to services and the development of informal settlements. Defining informal habitation is complex, but some com- mon features are a lack of access to the formal services of the city, be that water, sanitation, electricity, or housing services. Across the developing world, growth in informal settlements has accompanied urban population growth: 1.03 billion people in 2018 lived in informal settlements, according to the United Nations, 233 million of whom live in Sub-Saharan Africa. For the United Nations Sustainable Development Goal 11 (SDG11), to be achieved by 2030, access to urban services needs to be acceler- ated. South African electricity services in urban informal settlements have seen significant development over the past decade, with programs such as the Upgrading Informal Settlements Program (UISP) ‘giv- ing priority to the provision of basic services and functional tenure’. However, access to services is still a challenge in many informal settlement communities, and illegal access to basic services, particularly electricity, remains high. This research uses a novel agent-based modelling methodology to determine which factors affect most strongly the incidences of illegal access to electricity, as well as the main drivers and barriers to greater formal access to electricity in informal settlements in South Africa. Access to capital, political economy barriers, and technical challenges contribute to high incidences of illegal access, and addressing these barriers will lead to higher formal access rates and more reliable electricity services for residents.
1. Introduction
Over the past 50 years, urbanisation rates globally have continued to increase [1]. Since the Industrial Revolution, the tendency for populations to gather in cities for the benefits that they offer has provided a strong incentive for rural populations to move to urban areas. This growth in urban populations has not abated: 21st-century urbanisation trends show that urban populations across the globe have grown significantly and are projected to continue to increase well into the century [1]. However, it is in developing countries, particularly those in the Global South, that this urbanisation trend is projected to apply to the greatest extent. In terms of the global urban population, developing Asian countries, particularly China and SouthEast Asian countries, are projected to have the greatest increase in urban populations anywhere on Earth. However, this trend is not limited to these countries: across the developing world, urban populations are projected to increase dramatically through to the middle of the century. Countries such as Brazil, India, Thailand, and South Africa are all projected to increase in overall urbanisation rate (the percentage of a country’s population residing in urban areas), and a number of developing world cities are projected to become megacities (cities with more than 10 million population) by 2050.
Africa as a whole (including the transition economies of North Africa) is projected to be over 50% urbanised by 2030 [2]. World Bank projections from the turn of this century predicted small and medium-sized urban centres to grow the fastest in terms of population in the coming decades [3], and this trend has been borne out in the more recent analysis of urban population growth [1]. This rapid population growth in small- and medium-sized urban settlements, as well as the comparatively smaller, but still significant, growth in large urban agglomerations, puts a significant strain on the municipal government’s ability to offer residents of the city urban services. These cities typically lack the human, technical, or financial resources to effectively deal with rapid increases in population in localised areas as larger cities may have [4, 5]. Electricity access is one such issue in that, as of 2017, more than 100 million people in Africa live within technically feasible connection distances to the formal grid, but are unable to connect due to prohibitive connection costs [6], and illegal electricity access is a common feature in informal settlements across the continent as residents seek to improve their access to urban services [7]. The UN Sustainable Development Goals (SDGs) 2030 aim to ‘make cities and human settlements inclusive, safe, resilient and sustainable’, with goal 11 and to ‘ensure access to affordable, reliable, sustainable and modern energy for all’ with goal 7, with 11.1 (ensure access for all to adequate, safe, and affordable housing and basic services and upgrade slums) and 7.1 (ensure universal access to affordable, reliable, and modern energy services) being relevant to informal settlements.
There are a number of factors behind the phenomenon of illegal electricity access. Economic factors are perhaps the most obvious; those who cannot afford electricity on a formal basis, but still desire electricity access, may be tempted to bypass the formal system through an informal electricity connection, particularly if enforcement of formality is limited [8]. These connections are routinely removed on the basis of improving revenue recovery by municipal electricity authorities, despite the very low consumption rates typical of households with an illegal electricity connection [9]. There are direct correlations between household income and electricity consumption, and as stated earlier, generalisations regarding the lower economic status of informal settlement inhabitants, while not true in every circumstance, still hold some validity [10–12]. Regulatory factors are another overarching theme identified in the literature; these factors arise from the informal nature of the settlement itself or from the householder’s applying for electricity access. These factors generally prevent access to a formal electricity connection through some prerequisite factors not tied to electricity that informal settlement inhabitants cannot adhere to. Examples of this include the lack of a formal address, the lack of a formal deed of land to a property, or the inability to pass prerequisite safety inspections from the electricity company due to household construction or siting [9, 11, 13–17]. In summary, the literature finds a range of challenges to informal settlement electrification, grouped around financial pressures, insecurity of tenure, and regulatory inflexibility.
2. Constructing an ABM of Informal Settlement Electrification
To construct an agent-based model (ABM), it is necessary to consider three primary factors, namely, the spatial dimensions of the model, the agents themselves, and the methods of interaction of the agents, sometimes referred to as a topology of interaction. Once these factors are determined, the bulk of the model consists of the parameters of the agents and how these agents interact with each other in the world of the model. Agent-based models do not necessarily need a specific spatial dimension to operate within, and aspatial models are common in the social sciences when considering sociological behaviours.
The construction of this model was bounded by several factors, and some assumptions have been made to simplify the operation of the model and the topology of interaction. First, the model will analyse a single informal settlement in South Africa. This analysis has chosen South Africa as a leader in informal settlement electrification programmes, such as the Upgrading Informal Settlements Program (UISP) [18]. Data on informal settlement electricity access and demographics are also available in South Africa through the General Household Survey and other Statistics South Africa projects [19]. Agents in the model will represent households in informal settlements and illegal electricity resellers in informal settlements. Intra-household dynamics are not modelled as a bound of the analysis. The electricity system of the model assumes a 100% reliable formal electricity grid with sufficient capacity to support any number of new formal connections. The model assumes a 100% employment rate for residents and, as such, a consistent and predictable monthly income for residents to spend on electricity and other expenses. These assumptions are made in order to simplify the possibility space of the model and in order to examine the effects of different economic factors in an ideal case. The spatial dimension of the model will be constructed to represent a hypothetical, distributed urban informal settlement in South Africa, with randomly spread residents and resellers.
The model constructed for this project focuses on the economic dimensions of electricity access in urban informal settlements in South Africa. While there is a range of factors affecting informal settlement electrification, such as policy interventions, political economy barriers, and socio-technical barriers, analysing economic factors first allows for the construction of the model backed by real-world data without introducing variables that would require significant calibration, such as variables modelling institutional barriers, at this stage.
The aim of this modelling exercise is to produce an agent-based model of informal settlement electrification in South Africa, focusing on the economic aspects of electrification at the household level. Three research objectives will be met through this exercise:
Analysis of the impacts of household economic attributes on access to reliable, formal electricity,
Analysis of the propagation of illegal electricity connections through an economic lens, and
Investigation of the most impactful household economic metrics in accessing formal/ illegal electricity connections in South Africa. Three research questions will be addressed through interrogation of this model:
What are the economic challenges at a household level to universal electrification of informal settlements on a formal basis in South Africa?
How impactful is the income status of a household in accessing formal or illegal electricity connections in informal settlements?
How can economic policy and programmes increase access to reliable and formal electricity in South African informal settlements?
3. Agent Parameters and Global Parameters
There are two types of agent in the model, namely, residents and resellers. Residents represent informal settlement households as a unit in the model, and resellers represent illegal electricity resellers in informal settlements. Residents and resellers both have nine parameters associated with them.
There are a total of 16 global variables in the model.
4. Modelling Scenarios
Three scenarios will be analysed through simulation runs of this model. The first scenario is a baseline scenario, using data from [19] and [21]. This scenario is simulated to give a baseline status of formal and illegal electrification in the modelled informal settlement using variable conditions accurate to the time. The second scenario simulates a lower zone-ofcontrol for illegal electricity resellers in the model, reducing the “resellerthreshold” variable, in order to determine the sensitivity of the model to this variable, and the economic conditions relating to formal electricity access for residents who are not within the required radius for illegal electrification via a reseller. The final scenario dramatically reduces the cost of a new formal electricity connection (the ‘newformalcost’ variable), to represent government subsidy in increasing electricity access on a formal basis for informal settlements.
Each simulation is run for a total of 1,140 ticks, which represents three 360-day “years”, along with an extra 60 ticks at the beginning of the model for any equilibrium to be established without affecting model results. Independent variables for the scenarios are in Table 3.
The scenario-specific variables for each of the three scenarios are set out in Table 4.
5. Results
The baseline scenario represents the situation as of 2015 for a hypothetical informal settlement in South Africa. Initial conditions of the scenario show zero formal access, 225 agents with no access, and 275 agents with illegal access once the simulation has begun. The results for this scenario are shown in Figure 1 and Figure 2.


Figure 2 explores the evolution of connection status by economic quintile of the resident agents. Unsurprisingly, early in the model, all the formal and more expensive access is confined to the quintile four agents. Interestingly, later in the model (ticks ~900–1000), there is a period where many quintiles three agents move from informal connection to formal. However, this transition is reversed in the following 100 ticks (~1000–1100), perhaps due to depletion of capital due to the higher cost of formal electricity in the model.
This scenario uses the same initial conditions as the baseline scenario, with lower spatial reach for illegal electricity resellers. Reducing the reseller threshold variable represents more stringent efforts to remove illegal connections on the part of the municipal government of the hypothetical informal settlement. The results for this scenario are shown in Figure 3 and Figure 4.


The formal cost subsidy scenario assumes the same initial conditions as the baseline scenario but reduces the cost of a new formal connection by half, to R2,575. This represents a direct subsidy from the municipal/national government to electricity suppliers to reduce barriers to new formal connections. The results for this scenario are shown in Figure 5 and Figure 6.


6. Discussion
The results of these scenarios offer some insights into the economic challenges facing informal settlement residents in accessing formal, reliable electricity services in South Africa. For the baseline scenario, Figure 1 shows the change in access over time by the type of access for all economic quintiles. Illegal access and no access are closely, inversely related, while formal access remains steady until approximately tick 930, where a small increase is seen before returning to the previous level by the end of the simulation run. The inverse relationship between illegal and no access in Figure 1 shows residents moving from no access to illegal access and vice versa, with the formal access rate staying largely stable. This is explained more clearly in Figure 2; quintile 4 residents (the wealthiest) seek illegal electricity access initially, then transition to formal access once sufficient capital has been built up. Quintile 3 residents dominate illegal connections, before switching to formal briefly towards the end of the simulation. Quintiles 1 and 2 residents struggle to maintain an illegal electricity connection, with the majority of no access residents being quintile 1 throughout the simulation, and quintile 2 residents are seeking illegal access, then losing it, before gaining it again with a period of approximately 200 ticks. Residents of these two quintiles never reach a threshold of being able to afford a formal connection over the simulation run.
The low reseller reach scenario shows that affordability for formal electricity connections remains high for quintile 4 residents, and quintile 3 residents access formal electricity in much greater proportions and earlier in the simulation, due to the lack of access to cheaper illegal connections. Quintile 2 residents also begin to seek formal connections later in the simulation, in contrast to the baseline scenario. However, quintile 1 residents continue to be unable to afford formal electricity, and informal access also remains out of reach for the majority. Higher numbers of residents overall gain formal electricity access in this scenario, but no access dominates, with a larger number of quintile 2 residents never having formal access throughout the simulation compared to the baseline.
The formal cost subsidy scenario behaves similarly to the baseline scenario. Quintile 4 residents show almost identical behaviour, with high levels of formal access and full electrification across the quintile via formal and illegal means. Quintile 3 residents show high levels of illegal access, with a similar peak in formal access rates occurring approximately 400 ticks earlier than in the baseline scenario, and a small bump towards the end of the scenario, suggesting that this pattern would be cyclical in a longer simulation run. Quintile 1 and 2 residents exhibit almost identical behaviour to the baseline scenario, suggesting that the reduction in formal cost does not affect residents’ behaviour in accessing electricity in these quintiles. As with Figure 1, Figure 5 shows an inverse relationship between illegal access and no access, suggesting residents are moving to illegal access from no access and vice versa, with formal access rates remaining steady. Total illegal access rates in this scenario peak at over 400 residents, compared to the baseline where the peak occurs much earlier in the simulation, and does not reach 400 residents.
From these scenarios, it is evident that with economic conditions based upon real-world figures from a 2015 baseline in South African informal settlements, residents in quintiles 1 and 2 will struggle to access electricity, even on a less-costly illegal basis. This holds true across the scenarios, although the low reseller reach scenario suggests that some degree of affordability exists for quintile 2 residents if illegal electricity access is not possible. Quintile 1 residents, however, fail to sustain even an illegal electricity connection throughout the scenarios, even with reduced formal electrification costs. Quintile 3 residents show high uptake of formal electricity if illegal access is not available, but predominantly opt for illegal access to satisfy their electricity demands if it is available. Quintile 4 residents show limited sensitivity to the variables examined in these scenarios, with high formal access rates throughout and zero no-access rates.
Significant scope exists to expand this modelling exercise beyond the present scenarios where the sole drivers of model dynamics are economic considerations within the resident agents. While these economic model results reflect established issues with affordability of formal electricity access in South African informal settlements, there are a number of non-economic factors that affect informal settlement residents’ ability to access a new formal electricity connection, including but not limited to institutional reticence to electrify informal settlements due to the potential for increased incidences of electricity theft from easier access to formal infrastructure, the lack of formal address systems in informal settlements, the lack of access to formal banking services, and regulatory barriers such as requirements for wiring safety certificates that informal settlement structures are unlikely to meet without investment. All of these factors contribute to a complex socio-economic and spatial system, with political economic dimensions that need examining to fully capture the issues relating to informal settlement electrification.
7. Conclusions
Urbanisation in Sub-Saharan Africa is rapidly increasing, and the ability of municipal and national governments to serve growing urban populations is unable to keep pace with rapid population growth. This leads to a rise in informality; urban residents creating housing solutions, employment solutions and energy access solutions outside of the formal, legal networks already established. Urban populations in African countries are projected to maintain a rate of growth of over 3% on average through to 2050 (United Nations, 2018), and as such informality is projected to continue to rise.
This article examines the economic dimensions of informal settlement electrification through the use of agent-based modelling. ABM is a well-established methodology in the social and technical sciences, although applications to informal settlements are limited, and electricity access has not been analysed in the literature through the use of ABM. The model used in this paper was constructed to examine the economic barriers to electrification of informal settlements on a formal basis, using existing data on economic quintiles and electricity prices to analyse differential access rates across economic quintiles, and the effects of illegal electricity reselling on formal access rates within settlements. Of the three scenarios examined in this paper, the Low Reseller Reach scenario showed the highest overall formal electrification rate, with the Formal Cost Subsidy scenario allowing residents to afford formal electricity earlier in the simulation run than the baseline. From these preliminary results, it appears that market-based electrification requires additional support in terms of cost subsidy to be affordable for the majority of informal settlement residents.
Poorer residents perform significantly worse in terms of accessing formal electricity than wealthier residents in this model. In all three scenarios, the lowest economic quintile residents struggle to maintain even a lower-cost illegal electricity connection, while the highest quintile residents maintain a formal electricity connection with limited exceptions. Quintiles 2 and 3 residents access illegal connections at a higher rate than formal connections, except in the low-reseller-reach scenario, where formal access is higher for quintile 3 residents, and lower for quintile 2 residents, suggesting an affordability gap for formal electricity access for quintile 2 residents in addition to quintile 1 residents.
As this model solely examines economic factors, with one variable associated with the risks of using illegal electricity connections, there is significant scope to expand this work in the future to cover more factors relating to informal settlement electrification in South Africa. Modelling institutional agents would allow for the examination of factors relating to the political economy of electricity access in South Africa, with electricity companies being more or less willing to install new formal connections based on current rates of electricity theft. Increasing the spatiality of the model would allow for different, potentially emergent behaviours to be seen, with agents making different electrification choices based on their neighbours, the spatial dimensions of the settlement, and proximity to existing infrastructure access. Informal settlements exhibit complex socio-technical, socio-economic, and socio-spatial behaviours, and as such, capturing more of these features would lead to a more robust representation of informal settlement electrification through the model and the examination of more varied factors relating to electrification.
The data used to support the findings of this study are available from the corresponding author upon request.
The authors declare that they have no conflicts of interest.
