Skip to content

Latest commit

 

History

63 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure MARL Smart Grid Pricing

Overview

This project introduces a Secure Multi-Agent Reinforcement Learning (MARL) framework for smart grid pricing, where Consumers, Aggregators, and a Grid Controller collaborate to optimize energy consumption using hybrid price and incentive-based mechanisms.

Features

  • Three-layer MARL architecture with Consumer, Aggregator, and Grid agents.
  • Hybrid demand response combining price-based and incentive-based strategies.
  • Reinforcement learning algorithms: DQN and DDPG.
  • Reward optimization for cost, comfort, and grid stability.
  • Performance evaluation on peak load reduction, cost efficiency, and fairness.
  • Scalable and adaptive system robust to non-participation and edge conditions.
  • Security with ChaCha20‑Poly1305 - a modern, fast, and authenticated encryption scheme.

Tech Stack

Category Tools / Technologies
Programming Language Python 3.10
Frameworks / Libraries PyTorch – Deep learning and reinforcement learning models
CityLearn – Urban building energy simulation
NumPy, Pandas – Numerical computation and data processing
scikit-learn – Data preprocessing and utilities
Gym – Reinforcement learning environment interface
tqdm – Progress visualization
cryptography - Security
Tools & Environment Virtual Environment (venv)
Git & GitHub for version control
Jupyter Notebook (optional, for analysis & visualization)

Installation Guide

Use Python 3.10 for best compatibility.

1) Clone the Repository

git clone https://github.com/yourusername/marl-smartgrid-pricing.git
cd marl-smartgrid-pricing

2) Create Python 3.10 Virtual Environment

Windows (PowerShell)

python -m venv marl_env310
marl_env310\Scripts\activate

macOS/Linux

python3 -m venv marl_env310
source marl_env310/bin/activate

3) Install Dependencies

Note:

  • After activating the virtual environment, upgrade pip before installing dependencies:
    pip install --upgrade pip
  • Install all the requirements:
    pip install -r requirements.txt

If you don’t have a requirements.txt file, create it with the following content:

citylearn==1.5.0
numpy==1.21.6
pandas==1.3.5
torch==1.12.0
scikit-learn==1.0.2
gym==0.25.1
tqdm==4.66.1
cryptography==41.0.3
matplotlib==3.5.3

Usage

Run the main script:

python main.py

Code of Conduct

Please read our Code of Conduct before contributing to this project.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Security

If you discover a vulnerability, please refer to our Security Policy for instructions on how to report it responsibly.

License

This project is licensed under the MIT LICENSE.

Contributors

  • Aakaash M S
  • S Karthik Ram
  • Abishek K
  • Ashwin T

About

A Multi-Agent Reinforcement Learning (MARL) based pricing and incentive strategy for demand response in smart grids.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages