Advanced Features by Examples

While the Benchmarks focus on the standard OPF that is deterministic, single-time-step, and has continuous actions, OPF-Gym also allows for more advanced OPF problems.

Note that all the following examples are not solvable with the conventional pandapower OPF solver anymore. Therefore, either a custom solver is required or a comparison with ground-truth solutions is not possible.

Multi-Stage OPF

The multi-stage OPF problem is an OPF that is performed over multiple time steps, including constraint satisfaction over multiple time steps, for example, storage state-of-charge or ramping constraints. The multi-stage OPF can be implemented by overwriting the step() method, which can be done by inheriting from the MultiStageOpfEnv class, as shown in the multi-stage OPF example.

Security-Constrained OPF

The security-constrained OPF problem is an OPF were all constraints are also consideref for the N-1 case with line outages. It can be implemented by adding a loop to the calculate_violations() method, which can be easily done by inheriting from the SecurityConstrainedOpfEnv class, as shown in the security-constrained OPF example.

Mixed Continuous and Discrete Actions

While conventional solvers have difficulties with discrete actions, adding discrete actions in OPF-Gym is straightforward and does not complicate the learning problem nor the environment creation, as shown in the Mixed actuators example. Note that internally all actions in OPF-Gym are modelled as continuous RL actions and require continuous RL algorithms like DDPG or SAC, even when they are discrete from an energy system perspective.

Stochastic OPF

The OPF problem can be extended to include stochasticity, for example, when the measurement of the grid state (voltages, power flows) is uncertain or noisy. A simple example of an stochastic OPF environment is shown in the Stochastic OPF example.

Partial Observability

Conventional solvers require an estimation of the full state of the power grid. RL can also be applied to partially observable environments, where only a subset of the state is observable. This is shown in the Partial Observability example.