Skip to content
GregoryIreland edited this page May 25, 2023 · 26 revisions

Introduction

OnSSET (the Open-source Spatial Electrification Toolkit) is an energy access planning optimization tool written in Python that allows the user to estimate, analyse and visualize, cost-effective, electrification pathways in high spatial detail. As it is a spatially explicit model, when calculating the optimal pathway, OnSSET considers datasets that include information on population distribution, the availability of local energy resources such as solar, wind, and small hydropower, the distance of each population cluster to the current grid networks, landcover, and technology investment and operating costs, among others. The least-cost solution presented in the model compares the cost of supplying electricity to settlements either through a central grid connection, stand-alone “solar home systems” providing energy to a single dwelling or electrifying a community using mini-grid systems (here hybrid combinations of solar, battery, diesel, hydro and/or wind). The options are visualised in Figure 1.

image

Figure 1: Different energy technology options for electricity access and their typical end-users

Model structure

The selection of the cheapest electrification solution for each populated area requires first the collection of a significant amount of location-specific data across the area of interest. This data relates to the population and demand in the settlement, the availability of energy resources, landcover, and protected areas, as well as the distance to existing infrastructure (such as roads and existing grid network). In the first step of the analysis, it is determined where the people with current access to electricity are: if a populated area is close to the existing electric network and there is light during the nighttime, it is considered as currently electrified via the electric network. Furthermore, locations of existing mini-grids and stable nightlights in isolated areas are used to identify additional settlements that are already electrified with mini-grids. A simplified example is illustrated below in Figure 2.

image Figure 2: Data collection and calculation for each population settlement (Khavari, 2022).

In the next step shown in Figure 3, an electrification technology is selected for each populated area to meet the electricity demand (which is estimated as described in the previous section). This means that all households in each populated area are allocated the same electrification technology.

image Figure 3: OnSSET least cost electrification technology option selection per settlement (Khavari, 2022).

The technology solution selected depends on the cost of providing electricity, or more precisely, the levelized cost of energy (LCOE). This is the cost that each unit of electricity would need to be sold for to cover all potential costs e.g., capital costs, interest on loans, insurance, installation and logistical costs, fuel, repairs and breakdowns, maintenance, and salaries, etc.) over the life of the project. The technology (grid extension, mini-grid, or solar home system) that can meet the demand at the lowest LCOE is selected in each area. The total costs in a populated area are the sum of the costs of all individual connections and generating technologies. For solar home systems, each customer will have their own system, operating in isolation from each other. One larger generation source is used for mini-grids instead of providing solar panels for every single household. A mini-grid could be powered by solar energy, hydro or wind. Additionally, a distribution network is required to connect the customers to the energy sources. Depending on the size and demand of the area, economies of scale may lead to lower generation costs than for Solar Home Systems, which can make up for the additional costs from the distribution network. Finally, the last option is the extension of the centralised grid network. This considers the cost of the distribution network needed in the settlement, the new lines needed to connect the area to the existing network, as well as the cost of generation of grid electricity (which comes from the NEST model in this study). This overall processing flow is demonstrated schematically in Figure 4 below.

image Figure 4: Processing flow of the Open-Source Spatial Electrification Toolkit (OnSSET). Adapted from (OnSSET, 2022)

This calculation and optimal technology selection is made for an intermediate and a final year, 2040 and 2060 respectively, under certain assumptions for several parameters. These parameters include the electrification target at the end year, population growth, demand growth from households, heavy industries and other businesses, and solar panel costs. When this target is not 100%, a criterium must be chosen to select which populated areas are electrified first. The default of the model prioritises households whose per capita investment cost is the lowest. Other possible criteria could be to electrify first the poorest or richest households, or those which are closer to the electric grid, or a custom prioritisation implementation. OnSSET determines if settlements should be supplied from the grid or by off-grid technologies (and which ones), and NEST determines the cheapest technology mix to satisfy the demand for grid electricity and the estimated cost of that electricity.

Input data and scenarios

(Coming soon!)

Running the model

Downloading the database

The database to run the platform for the pilot country of Zambia is avaiable at the official Zenodo repository of the RE4AFAGRI platform).

  • For OnSSET: include the OnSSET replication data folder unzipped in onsset\onsset_replication (more details below)

Setting up the programming environment and input data

  • Have Python (version 3+) and the conda package manager installed on your local computer:
  • If you do not have this, then download and install Anaconda for your operating system from here: https://www.anaconda.com/ (Many useful Jupyter Notebook tutorials are also available there if you are unfamiliar with Jupyter)
  • Then open "Anaconda Prompt" and navigate to this repository and into the onsset folder, and run the following commands:
  • conda env create --name gep_onsset_env --file gep_onsset_env.yml (This might take a while and download 100+MB of Python packages)
  • Then run the following commands:
    • conda activate gep_onsset_env
    • jupyter notebook or jupyter lab (if you are familiar with JupyterLab and know how to ensure your correct environment is activated)
  • This will open up the Jupyter Notebook in a browser window.
  • Include the "onsset_replication" data from the the official Zenodo repository of the RE4AFAGRI platform Unzip the database and then take the onsset data into onsset\onsset_replication (the folder will exist in the code but will be empty when downloading the code from github). After completing this correctly the folder should have 3 sub-folders clusters, mled, and onsset_input_files and no longer be as .zip file. If done incorrectly the code in the next steps will likely fail.
  • Go to the instructions below to run the different OnSSET parts of the model.

Running the model code

  • Make sure the replication data is downloaded from the official Zenodo repository of the RE4AFAGRI platform as described above.
  • In the root of the onsset folder first open MLED_extraction_to_OnSSET.ipynb and run all of the cells. This will extract the MLED demands and create OnSSET compatible input files for use in the next step. The process may take a few minutes. You should find them as .CSV files in the onsset\mled_processed_input_files folder with the names of the scenarios. If for any reason this step fails, then there are pre-processed input files available in the onsset_replication\mled_processed_input_files database download which you could use instead or if you wish to double check your results.
  • Then, navigate into the onsset/onsset sub folder which also includes the .py Python files used by OnSSET.
  • Open the OnSSET_Scenario_Running.ipynb Notebook and run all of the cells. This will take a few minutes and will run the different scenarios and calculate the least-cost electrification options for the entire country. It will output it's results into several folders as .CSV files both as full results files for every population cluster in the country as well as summary files (also used later by NEST).

Analysing the oututs

Runtime, frequent issues, and FAQs


Preparing a new country analysis

Designing a new scenario

Clone this wiki locally