OpenDSS RL Env Test

Classes and Functions

OpenDssEnvTest.create_env_run(path, critical_loads_buses, capacitor_banks, switches, line_faults, ders)

Initialize the environment and run with a random agent..

Parameters
  • path (str) – Path to the main directory.

  • critical_loads_buses (list) – list of critical load buses

  • capacitor_banks (str) – list of capacitor banks

  • switches (str) – list of controllable network switches

  • line_faults (str) – list of line outages taken into consideration

  • ders (list) – list of DERs added into the system

Returns

env

Return type

gym.Env

OpenDssEnvTest.testAgent(env, model)

Test the trained model..

Parameters
  • env (gym.Env) – The openDss RL environment

  • model (gym.Env) – The trained policy network

Returns

Nothing

Return type

None

OpenDssEnvTest.trainAgent(env, agent_type)

Train the model using either A2C or PPO..

Parameters
  • env (gym.Env) – The openDss RL environment

  • agent_type (str) – The agent type

Returns

The trained model

Return type

Torch model