Codes for Techno-Economic Analysis of Data Centres for Sub-saharan Africa
# SSA-TEA
# **Codes for Techno-Economic Analysis of Data Centres for Sub-saharan Africa**
This repository contains the optimization models, data filtering scripts, and batch execution pipelines used to evaluate the economic viability of displacing diesel generation with Small Modular Reactors (SMRs) for data centres in Sub-Saharan Africa (Nigeria, Kenya, and South Africa).
The core model is a Mixed-Integer Quadratic Program (MIQP) formulated in Pyomo and solved using Gurobi. It co-optimizes the hourly dispatch and optimal endogenous sizing of SMRs against a flat data centre electrical load.
## ** Repository Structure**
* V26\_external\_use-ssa1-patch.py: The core Pyomo MILP optimization script. Formulates the unit-commitment, sizing, and energy balance constraints, and evaluates the diesel breakeven ($/MWhe).
* filter-facilities.py: Pre-processing script to filter out facilities below the 2.0 MW utility-scale threshold.
* run\_sweep2.sh: Bash script to execute a highly parallelized ![][image1] sensitivity grid sweep across Capital Cost (CAPEX) multipliers and Interest Rates (IR).
* Facility\_Processing\_Africa.py: Utility module for demand profiles (required import).
## ** Prerequisites and Dependencies**
The simulation requires a Python 3 environment and a valid Gurobi license.
### **Software Packages**
Install the required Python libraries using pip:
pip install pandas numpy pyomo
**GNU Parallel** is required to run the batch shell script efficiently:
\# On Ubuntu/Debian
sudo apt-get install parallel
\# On macOS
brew install parallel
### ** Gurobi License Configuration (Important)**
The MILP is computationally heavy and relies on the Gurobi solver. You **must** have a valid Gurobi license installed.
*Note: You will need to update the hardcoded Gurobi license path inside V26\_external\_use-ssa1-patch.py (around line 43\) to point to your local machine's license file before running.*
\# Update this line in V26\_external\_use-ssa1-patch.py:
os.enviro …