openDSSenv module

Created on Wed Jun 15 18:08:05 2022

@author: abhijeetsahu

This environment is created for episodic interaction of the OpenDSS simulator for training RL agent, similar to an Open AI Gym environment

openDSSenv.double_contingency(dss, lfs)

This function causes a double contingency where two line fault occurs

dss : opendss network lfs : the list of transmission lines that encounters fault

openDSSenv.mix_contingency(dss, lf, cb)

This function causes a mixed contingency where a line fault occurs along with one capacitor bank is shut down

dss : opendss network lf : the transmission line that undergoes line fault cb : the capacitor bank that goes down

openDSSenv.mix_contingency2(dss, lf, der)

This function causes a mixed contingency where a line fault occurs along with one capacitor bank is shut down

dss : opendss network lf : the transmission line that undergoes line fault der : set of der that goes down

class openDSSenv.openDSSenv(_dss, _critical_loads, _line_faults, _switch_names, _capacitor_banks, debug=False, contingency=1, load_lb=0.8, load_ub=1.2, _ders=None)

Bases: gym.core.Env

metadata = {'render.modes': ['human']}
render(mode='human', close=False)

This function renders a simplistic visual of the environment, where based on the voltage profile, the network node colors would change

mode : currently set to ‘human’ mode close : boolean to enable or disable rendering of the nevironment visuals

reset()

This function resets the environment for a new episode where following things are performed: a) First all the controllable switches are opened b) Randomize the load profile c) based on a certain frequency a contingency is caused. Either single, double or mix d) the environment moves to the next state based on the contingency which acts as the initial state of the episode

step(action, result=None, pc_queue=<queue.Queue object>, cp_queue=<queue.Queue object>)

This function executes the selected action on the environment. In this environment the action are limited to closing and opening of the controllable switch. This function call would transition of the state to next state, and the reward is computed. Unless we learn a reward function we can take some existing resilience metric. The agent reaches the goal when all the critical load buses satisfies the voltage criteria. In most of the prior RL work the voltage limit criteria is incorporated through the reward function/in the form of cost.

action: The controllable switch name to CLOSE

openDSSenv.single_contingency(dss, lf)

This function causes a single line contingency

dss : opendss network lf : the transmission line that undergoes line fault

openDSSenv.triple_contingency(dss, lfs)

This function causes a double contingency where two line fault occurs

dss : opendss network lfs : the list of transmission lines that encounters fault