Skip to content

hamidzpro/master_thesis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

active_env

active_env is a Python toolkit that applies reinforcement learning algorithms in an electric power system. The project was originally a master thesis written in partnership with Statnett, the Norwegian Transmission system operator.

The agent is allowed to modify the power consumption at nodes in a distribution system with high peak demand and high production from solar power. The goal of the agent is to reduce the number of current and voltage violations in the grid by increasing/ decreasing the consumption at appropriate times. The increase/decrease in power consumption is intended to be a simplified program for demand response that exploits the residential flexibility in the grid. pandapower is used for power flow calculations and stable-baselines for reinforcement learning.

Installation

Prerequisites

active_env inherits the prerequisites from stable-baselines and pandapower. You need python >=3.5. You can find installation guides here:

Motivation

Code example

ActiveEnv is custom gym environment that can interact with reinforcement algorithms in stable-baselines. A PPO agent is trained in this example:

from stable_baselines.common.vec_env.dummy_vec_env import DummyVecEnv
from stable_baselines import PPO2
from stable_baselines.common.policies import MlpPolicy
from active_env.envs.active_network_env import ActiveEnv

env = ActiveEnv()
env = DummyVecEnv([lambda: env])
model = PPO2(MlpPolicy, env, verbose=1)
model.learn(total_timesteps=100000)

Tutorial

active_env has a custom gym environment called ActiveEnv that can interact with reinforcement algorithms in stable-baselines. Check out the notebook tutorial for an introduction to the environment, and its functionality.

The master thesis can be found here in the file solberg2019.pdf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.3%
  • Other 0.7%