Keywords

1 Introduction

There is a momentum for individual actions in the promotion of energy sustainability in cities. Grubler et al. (2012) estimate that about 80 percent of all commercial energy used in the sub-Saharan Africa region can be classified as urban. This urban energy is a major contributor to greenhouse gas emissions in the region. However, the planning of energy systems remains largely a competence of national governments. Ringkjøb et al. (2018) identified 75 tools developed in different regions of the world to model planning, operation, and monitoring of energy systems. Majority of these tools model the energy systems at national and regional (group of countries) levels. Among the planning software listed by Ringkjøb et al. (2018), we tried to select a software for modelling the Dakar energy system in a 3-step filtering method based on the following criteria:

  1. (a)

    Experience of use in a developing country returns 40 models (Urban et al., 2007).

  2. (b)

    Focus on energy and electricity and exclude models that entirely focus on climate change and its impact or address economic issues such as energy markets returns 12 models (Urban et al., 2007).

  3. (c)

    Possibility to adapt the model to a scale below the national level (city) returns 0 models.

The reasons why existent energy planning models are not relevant for Dakar relate to limits on the modelling approach, the energy accounting methodology, and the empirical validity of the models’ outcomes.

1.1 Limits of the Approach

For Van Beeck (1999), the implicit assumption of constancy from historical trends in energy models with a top-down approach is not realistic, because the rapid population and economic growth, which characterize cities emerging cities, affect energy use. For Urban et al., the bottom-up approach weaknesses relate to the non-tractability of parameters such as demand, technology change, and resources assumed in the model as exogenous while being main drivers of the system’s dynamics (Urban et al., 2007).

1.2 Limits of the Methodology

The adaptation to the city level of energy planning software originally developed for national and regional contexts requires convergence criteria and linking metrics, meaning energy metrics that link the national and the city scales. Grubler et al. (2012) identify four methods for accounting the city energy use, which are further classified as production-oriented methods (2), and consumption-oriented methods.

The two production-oriented methods require to fix the city’s boundaries. Barles (2009) illustrates the variability of energy metrics depending on whether boundaries are set to Paris, extended to its suburbs or include the larger Parisian metropolitan region.

The two consumption-oriented methods require to define an economic metric at the city level, which is usually the gross regional product, to link with a national metric that can be the gross domestic product. Both metrics exclude the informal economy, whose proportions are not linear. The share of the informal economy can be relatively important in the region; it was estimated at an average 40.2% of the total official GDP in sub-Saharan Africa during the period 1999–2007. Comparatively, the share was 17.1% in OECD countries (Schneider, 2012).

1.3 Limits of Validity

The existing models lack some context-specific characteristics of energy systems in developing countries, which affect the empirical validity of their outcomes. The models’ assumptions are usually biased by experience from the energy systems of industrialized countries where they are tested. Those biases include the assumption that the energy systems of developing countries would behave like those of industrialized countries (Shukla, 1995), which explains the absence of parameters related to access, structural economic changes (e.g. urbanization), the predominance of bioenergy, etc.

This chapter aims to document the architecture of existing models and the architecture of an innovative approach in modelling the dynamics of a city energy system, which learned from the experiences gathered on modelling complex systems in computer sciences and in economics. It proposes a new energy planning model that should better support the city of Dakar in planning a transition to energy sustainability.

2 Architecture of Existing Energy System Planning Software

2.1 Modelling Approach

Since the 1970s, following the first oil crisis, energy planning software has been developed to: (i) model the interdependence between the energy system and the general economy, (ii) reduce countries’ dependence on fuel imports, and (iii) simulate the environmental impact of an energy strategy. Different criteria can be considered for classifying the modelling approach of these software. Here, we consider with Van Beeck (1999) a distinction based on the approach that classifies existing energy models into three categories.

  • Models with a top-down approach considered as macro-economic modelling use a methodology based on the computation of the system equilibrium. This category features ETA-MACRO and Computational General Equilibrium (CGE) models.

  • Models with a bottom up-approach considered as micro-economic modelling use a methodology based on optimization of one of the system parameters (e.g. cost). This category features MARKAL and MESSAGE.

  • Models with a hybrid approach combine the two approaches above described.

In the bottom-up approach, where models describe an open system, Schrattenholzer (1981) further identifies three (3) sub-categories of models based on dynamics of the system described.

  • Models formulating laws of nature that are valid in all circumstances (e.g. the motion of a mass point in a gravity field: │F│ = G * (m1*m2)/r2).

  • Models formulating regular behaviour that have a localized validity (e.g. energy generation in relation to operation hours: E = α H).

  • Models formulating concepts of controlled man-made systems that provide a quantitative conceptualization of a complex system. The majority of existing energy planning models fit in this category.

2.2 Assumptions and Data Organizing

Among the many energy planning models, the computational equilibrium model is particularly frequent in the literature describing the Senegal energy system (Benedict, 2013). The computational equilibrium model, by its nature of a mathematical based tool, returns relevant outcomes in a stable market environment that fulfils pre-conditions of the neo-classical economics principles, meaning symmetry of information and rationality of agents who are perfectly capable of anticipating and optimizing choices that should drive the system to equilibrium. The logarithm function introduces randomness in the stochastic version of the model but still fails to capture boom-and-bust cycles that happen in real systems. Indeed, the rationale of mathematical theorems is to provide the same results when they are fed with the same data.

Case Study of MESSAGE Application to the City of Vienna (Messner & Strubegger, 1995)

Optimization is another common approach in planning the energy system of cities. The application of MESSAGE to the context of Vienna in Austria sets an optimization function with three objectives:

  • Minimum energy cost,

  • Minimum fuel imports, and

  • Minimum level of indexed pollutants.

Each objective is formulated as a target trajectory. Then, the software computation consists in trying to equally reach each of the target trajectories. The optimal points derive from the optimization of each time step of each objective. The optimal points form the utopia trajectories. These trajectories are utopic in the sense that, although each point can be reached individually, there is no solution that reaches all of them. The worst solution for each time step and objective forms the nadir points. From these points, the software derives the shape of the Pareto-optimal border of the solution space. A mixed-integer-programming (MIP) model represents all options in the solution space as integer variables. From this process, Messner and Strubegger projected the optimal energy mix of Vienna by 2015 (20 years later).

Empirical Relevance of Models’ Outcomes

The two models exemplified above (CGE and MESSAGE) perform correctly in environments with characteristics similar to assumptions embodied in the software, i.e. cities with large energy supply technologies, which assume continuous model variables. Outside these environments, manipulations to adjust technologies’ sizes or convert continuous variables to discrete values through mixed-integer programming affect the outcomes and their relevance to predict the real system. In addition, the linear transfer of the optimization models’ algorithms from their primary field of application, which is conventional energy systems, to renewable energy systems is another point of concern, because only two of the many dimensions of sustainability are considered in the model: economy and environment. Still, this consideration is unrealistically restrictive, with only cost and carbon dioxide (CO2) metrics tracked in the model.

3 Architecture of an Innovative Energy Planning Software

3.1 Modelling Approach

Cities are identified in the urban studies’ literature as complex and self-organizing systems (Batty, 2005). Therefore, to escape the routine of approaching the energy planning model from either the top or the bottom, we propose a model based on the rules of the city agents. For instance, the decision of an agent (e.g a small transformation industry) without energy access either to connect to the grid or to consider another supply option, for example solar photovoltaic, can be from a basic rule: the energy value of the solar photovoltaic generation should be higher than the value of electricity from the grid for the agent to access with solar photovoltaic. If the value of electricity from the grid happens to be higher, then the agent accesses with the grid. The value in this example can be conceptualized as the inverse of the cost of 1 kWh, assuming consumer neutrality over the electricity production technologies.

3.2 The Entropy Dimension in Modelling Complex Systems

For Hayek (1948), the order in a market system is necessarily emergent (spontaneous) and cannot be the result of a central planning. Another element of system entropy is inferred from the second law of thermodynamics, which states that any local change of order bears a cost (Georgescu-Roegen, 1971). This cost can be labelled as energy in the case of physics applications or as greenhouse gas emissions in the case of an energy system. Failing to account for this entropy law is another cause of equilibrium and optimization models’ irrelevance for our sample city. The agent taken as example in the previous paragraph, with a basic rule on the energy value, keeps the system order emergent, but makes the potential to have a low-carbon electricity generation a probability measure that depends on the energy value rather than an optimum figure derived from sophisticated computations or a hypothetical equilibrium. The innovative software can weigh this value considering different attributes associated with electricity production technologies.

3.3 Capturing the Entropy Value in MoCES

The main principle that guided the development of an innovative energy modelling software named MoCES (modelling cities energy systems) is inspired by the Aristotle principle of system theory stated in the Metaphysics: the whole is more (or less) than the sum of its parts. Bertalanffy (1969) proposes two approaches for modelling a system: (1) to define general laws that are fit to empirical observations; and (2) to arrange the empirical fields in a hierarchy of complexity of the basic individual behaviours. Computational equilibrium models use the first approach, which can be considered with Bertalanffy as valid, “but makes unreasonable simplifying assumptions” according to Focardi (2015).

MoCES captures the complexity of agents in the system by providing room for a wide range of rationales that can motivate the system planner beyond costs and CO2 emissions. Examples of these motives include:

  • Anticipation of the future: the agent foresees gain losses in the future due to a policy scenario. For instance, investment in a rooftop solar photovoltaic system at T could be more or less advantageous than making the same investment at T + 1 when the regulator could revise the incentive policy (e.g. feed-in-tariff). A relevant metric would be the net present value (NPV).

  • Conscious planning: the previous agent could have a preference on gradual independence from the utility than on saving in the capital investment. A relevant metric would be the payback period.

  • Dedication to a cause: the same agent could have a preference on protecting the immediate and/or distant network and would prioritize reduction of greenhouse gas emissions over saving money on technology investment or electricity bill. Relevant metrics include carbon dioxide and other greenhouse gas emissions (e.g. methane and nitrous oxide).

Table 7.1 displays a comparison of computational equilibrium models and multi-criteria agent-based models considering three modelling criteria.

Table 7.1 Comparison of computational equilibrium and agent-based modelling for energy systems

4 The Modelling Energy System Software (MoCES)

4.1 Data Organizing

The energy planning software we developed includes two main components that are simulation and visualization windows.

The simulation window is common in the energy planning software interface. MoCES simulation window computes various parameters of an energy system, taking into account the multi-faceted dimensions of sustainability, including economic affordability, social acceptance and environment friendliness. MoCES has the capacity to compute ninety-three (93) outcomes based on the agent’s inputs.

The visualization window in planning energy systems is an innovation that MoCES brings. It builds from the most recent developments in visual computing and 3D modelling in information technology. The window models animation and 3D rendering of a virtual energy system installed by the user. MoCES visualization window uses geolocation to view the space where the energy system is planned, with three levels of zoom from city to building, and the district level (see Fig. 7.1).

Fig. 7.1
figure 1

MoCES delineation of the energy system target space

Both windows are connected, which enable the software to automatically adjust the virtual energy system when the simulation data change.

4.2 Programming Interface

Interactive and static plans of MoCES are integrated with Google Maps API. The combination of Street view and high-resolution satellite images returns a good rendering that is precise enough to enable the user to delineate the space dedicated to the energy system.

Graphic materials displayed in 3D and 2D are created with WebGL whose functionalities include liaison with the hardware and the software system accessible through the internet connection.

For the programming interactions in the environment, MoCES uses Unity 3D of Unity Technologies, which functionalities (assets) make it possible to import a large variety of image and audio applications that are compatible with various media..

4.3 Data Management and Security

The MoCES application is developed under PHP, HTML5, CSS, and Javascript. Access to the application is through the internet connection, which requires to secure the data of prospective users. For the first contact of the user with the application, we set up an SSL protocol to access the platform, which secures authentication and avoids network sniffing. For securing the data entered in the simulation window, in addition to the input control, the application features prepared queries via PDO. Those appear to be efficient against possible security breaches such as injection SQL and provide cleaning services. Files are transferred through the FTP protocol coupled with SSL to authenticate the user certificate during connection.

The implementation process organizes data recorded in the application in three databases: (1) geographic data, (2) energy data, and (3) users’ data. The system administrator is able to update all data, confirm users’ authorization to connect and prevent possible abuses. Figure 7.2 shows MoCES data storage and management techniques.

Fig. 7.2
figure 2

MoCES data management

4.4 Reproducibility of Model Outcomes

The user interface enables the creation of energy scenarios based on the users’ input data and default data embedded in the programming interface. Default inputs aim to support non-experienced energy planners in using the software with data that are easily accessible to them (e.g. building position, energy consumption periods, energy supply options, etc.). The user is able to select a location on the map (industrial commercial, or residential building), and select among the energy technologies embedded in the software catalogue: (1) solar photovoltaic, (2) solar thermal, (3) wind, (4) waste recycling, and (5) interconnected grid. The size of the energy system and its capacity are back-controlled by input data already entered in the scenario. For instance, the system will return an error if the system requirement in terms of size is higher than the surface delineated, including the necessary distance between PV panels or wind turbines. All users can create scenarios and store these scenarios as public or private. Public scenarios are accessible to other users who can modify, export and/or print them. Figure 7.3 displays MoCES results window.

Fig. 7.3
figure 3

MoCES Results window

5 MoCES and Other Energy Planning Software in sub-Saharan Africa

5.1 Planning Energy Systems for Cities in sub-Saharan Africa

Over the last two decades, Africa recorded the highest urban growth, with the urban population projected to increase from 36% in 2010 to 50% by 2030 (Transform Africa, 2017). The capital city of Senegal, Dakar, is an illustration of this dynamic, with a population that increased from 400,000 in 1970 to 3.4 million inhabitants in 2016. Therefore, cities in the region are the next frontier in assessing the region’s capacity to cope with the major challenges of a sustainable development that integrates urbanization and climate variability. Cities of the region also feature another peculiar, which is that they are yet to reach the goal of universal access to sustainable energy (SDG-7). Scientific publications on energy planning software in sub-Saharan Africa are often studies that compare conventional energy (e.g oil) and renewable technologies (e.g solar photovoltaic) (Trotter et al., 2017). In many, the modelling approach consists on the optimization of parameters of the energy generation system such as size, cost, or level of greenhouse gas emissions. Examples of software developed for the region includes an energy planning software for Nigeria and the Network Planner.

In Nigeria, an energy planning software was developed to select among technology options to access electricity. The software compute optimized electrification pathways and optimized renewable energy applications for improving electricity access (Bertheau et al., 2016). The software approach is: (1) to identify energy clusters (cities, villages, and other networks of energy consumption), (2) to determine the status of electricity access for each cluster, (3) then, to determine, based on the cluster location and population, the optimum electricity supply options.

In Ghana, the Network Planner was developed for planning electricity systems. Network Planner computes costs of different electricity supply options accessible to off-grid communities. Kemausuor et al. (2014) used Network Planner to model access options for off-grid communities of Ghana in a 10-year planning period.

5.2 Value Addition of MoCES

MoCES combines functionalities that position it a step further existent energy planning software. The tool focuses on planning energy systems in the city and sub-urban environments. Sustainability in the energy system goes beyond cost optimization and CO2 reduction, which metrics are tracked in existing energy planning software. Other criteria such as the technology integration in the environment, comfort of use, and access to a database of professional service providers are relevant in inventing an energy system that is tailored to the local context needs.

MoCES is developed for the sub-Saharan Africa region, where both access to energy and efficiency of use are pressing concerns. The software provides functionalities to design decentralized energy systems that integrate both generation potential (e.g. solar irradiation) and service efficiency potential (e.g. lighting retrofit with LED lamps).

6 Conclusion

MoCES addresses the critical need to democratize energy access and transition to sustainability in the sub-Saharan Africa cities. Since the creation of the Edison lamp in 1879, which sets the starting point for the first power plants in the United States (1883), energy access remains largely a centralized service organized around utilities and community grids. Therefore, existing software for planning energy systems was primarily designed to meet these needs at a national or regional (pool of countries) level. With MoCES, we provide, for the first time, the possibility for individual city agents to plan and monitor decentralized energy systems, in compliance with the citizens commitment to a sustainable energy future that should not be delegated to the utilities and other energy professionals. The software functionalities build from:

  1. (a)

    Recent developments in information technology in terms of human–computer interactions and visual computing; and.

  2. (b)

    The less recent concept of modelling systems with agents as an alternative to modelling equilibrium and other optimum solutions, which fail to capture the agents learning and adaptation mechanisms.

Individual energy planning supports an access based on informed decisions. In addition, both universal energy access to sustainable energy and liveable cities are goals of the post-2015 Development agenda. MoCES provides a medium that supports the contribution of citizens to achieving these goals.