Skip to content

Fahad2129/bayesian-network-load-shedding-pakistan

Repository files navigation

Bayesian Network: Load Shedding Severity in Pakistan

A probabilistic graphical model built to analyze, predict, and diagnose electricity load shedding in Pakistan. Developed as Assignment #3 for the Introduction to Artificial Intelligence course at the Institute of Business Administration (IBA), Karachi — Spring 2026.


Overview

Load shedding is one of Pakistan's most persistent infrastructure challenges. This project models the causal relationships behind power outages using a Bayesian Network (BN) with 11 variables — from fuel prices and circular debt to grid infrastructure and monsoon rainfall.

The model was built in GeNIe Modeler Academic Edition and can answer questions like:

  • How bad does load shedding get when fuel prices spike and the government can't pay its bills?
  • Does fixing the power grid help if there is still a fuel shortage?
  • Given a severe outage, which cause was most likely responsible?

Network Variables

ID Variable States
V1 Fuel Price Low / High
V2 Govt Payment Capacity Low / Adequate
V3 Fuel Supply Insufficient / Sufficient
V4 Rainfall Level Low / High
V5 Hydro Generation Low / High
V6 Thermal Generation Low / High
V7 Grid Infrastructure Poor / Good
V8 Electricity Demand Low / High
V9 Total Generation Low / Adequate / High
V10 Transmission Loss Low / High
V11 Load Shedding Severity (outcome) Low / Moderate / High

Network Structure

The DAG has 12 directed edges capturing key causal chains:

  • Fuel Price → Govt Payment → Fuel Supply → Thermal Generation
  • Rainfall → Hydro Generation
  • Thermal + Hydro → Total Generation
  • Grid Infrastructure → Transmission Loss
  • Total Generation + Demand + Transmission Loss + Grid → Load Shedding Severity

Inference Use Cases

Use Case 1 — Fuel Crisis with High Demand

Simulates Pakistan's 2022–23 situation: high fuel prices, circular debt, peak summer demand, poor grid.

  • Result: Probability of high-severity load shedding jumps from 44% → 66%

Use Case 2 — Good Monsoon with Grid Improvements

Tests whether hydropower boost + grid investment can offset a fuel problem.

  • Result: High-severity load shedding drops from 66% → 34%

Use Case 3 — Diagnostic Reasoning

Given that a severe outage is observed, which cause was most likely?

  • Result: High electricity demand (Bayes factor 1.22×) and poor grid infrastructure (1.20×) are the top indicators

Files

File Description
Load_Shedding_Severity_in_Pakistan.pdf Full report with variables, CPTs, DAG, and use case analysis
load_shedding_bn.xdsl GeNIe Modeler network file — open to run inference
Assignment_3_-_S26.pdf Original assignment specification

Tools Used


Data Sources

  • NEPRA. (2023). State of Industry Report 2022–2023. Government of Pakistan. https://www.nepra.org.pk
  • World Bank. (2022). Pakistan Power Sector: Circular Debt and Reform Options. https://www.worldbank.org
  • WAPDA. (2022). Annual Report 2021–2022: Hydropower Generation Statistics. https://www.wapda.gov.pk
  • Koller, D., & Friedman, N. (2009). Probabilistic Graphical Models. MIT Press.

Course Info

Course: Introduction to Artificial Intelligence
Instructor: Dr. Syed Ali Raza
Institution: Institute of Business Administration, Karachi
Semester: Spring 2026

About

Bayesian Network model for analyzing load shedding severity in Pakistan, built with GeNIe Modeler. Models 11 variables including fuel supply, circular debt, grid infrastructure, and hydropower to predict and diagnose power outages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors