Skip to content

This repository is an recast vserion of the Paper ``Hybrid Imitation Learning for Real-Time Service Restoration in Resilient Distribution Systems'' of TII.

License

Notifications You must be signed in to change notification settings

RanZhu1989/IL_Self_Healing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Updates

Please use this bibtex if you want to cite this repository in your publications:

@misc{IL_Self_Healing,
  author = {Ran Zhu},
  title = {Recast Code of the Paper 'Hybrid Imitation Learning for Real-Time Service Restoration in Resilient Distribution Systems'},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/RanZhu1989/IL_Self_Healing}},
}

Thanks

Thanks to the authors of the original paper for their valuable research and code on Github.

Abstract

This is the reproduced code for the paper titled "Hybrid Imitation Learning for Real-Time Service Restoration in Resilient Distribution Systems". Compared to the original code, this recast code has the following updates:

This repository Original
Optimization environment JuMP and Gurobipy (Matrix programming) Pymoo ('For loop' programming)
Gymnasium standard environment
Deep learning framework Pytorch Tensorflow
Running speed ~500% Faster 100%

The so-called behavior cloning (BC) algorithm in origin paper is actually the data augmentation (DAgger) algorithm. I have corrected this in the recast code.

Reproduction Results

In general, the recast code reproduces the results in the original paper. The following figures show the success ratio of the proposed algorithm in different scenarios.

There are some points slight larger than 1, which is due to numerical issues of the mathematic programming-based environment.

N-1 Test (Fig. 5 and 11)

Superior performance of DAgger compared to the conventional BC method. N_1 N_1

More complex scenarios, such as N-2 and N-5 tests.

N-2 Test (Fig. 12)

N_2

N-5 Test (Fig. 6)

N_5

The reproduction only plays a few epochs due to the long training time. Since the trend is consistent with the original paper, the reproduction is considered successful.

Getting started

  • Install python environment, cd into the gym environment directory ./gym_SelfHealing/ and type pip install -e .

  • Install Julia environment, add the following packages: JuMP, PythonCall

  • Configure your python-julia interface according to the documentation, especially add your python path into the julia environment variable PYTHON.

  • Install solvers:

    • Gurobi: Install Gurobi in your OS, and run pip install gurobipy in python or run Pkg.add("Gurobi") in Julia (see documentations)
    • CPLEX: Install CPLEX in your OS, and run Pkg.add("CPLEX") in Julia (see documentations)
    • GLPK: Just run Pkg.add("GLPK") in Julia
  • You can test your environment configuration by running the scripts in ./test/ directory.

  • To run the DAgger algorithm, set hyperparameters according to configs.py

  • You can edit the system file in ./gym_SelfHealing/selfhealing_env/envs/case_data/*.xlsx.

  • Known dependencies:

    • Python: Python (3.8.19), PyTorch (2.3.0), Gymnasium (0.28.1), CUDA (12.1), Gurobipy (11.0), juliacall (0.9.20)
    • Julia: Julia (1.10.3), JuMP (1.22.1), PythonCall (0.9.20)
    • Solvers: Gurobi (v10 and v11), CPLEX (12.10), GLPK (5.0)

About

This repository is an recast vserion of the Paper ``Hybrid Imitation Learning for Real-Time Service Restoration in Resilient Distribution Systems'' of TII.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published