Skip to content

Commit

Permalink
fix errors on specifying the voltage barrier type
Browse files Browse the repository at this point in the history
  • Loading branch information
hsvgbkhgbv committed Jan 30, 2022
1 parent 81aa2a3 commit 556231c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion args/env_args/var_voltage_control.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
env: "voltage_control"

env_args:
"voltage_loss_type": "l1" # "l1", "l2", "bowl", "courant_beltrami", "bump"
"voltage_barrier_type": "l1" # "l1", "l2", "bowl", "courant_beltrami", "bump"
"voltage_weight": 1.0
"q_weight": 0.1
"line_weight": null
Expand Down
4 changes: 2 additions & 2 deletions environments/var_voltage_control/voltage_control_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, kwargs):

# define episode and rewards
self.episode_limit = args.episode_limit
self.voltage_loss_type = getattr(args, "voltage_loss", "l1")
self.voltage_barrier_type = getattr(args, "voltage_barrier_type", "l1")
self.voltage_weight = getattr(args, "voltage_weight", 1.0)
self.q_weight = getattr(args, "q_weight", 0.1)
self.line_weight = getattr(args, "line_weight", None)
Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(self, kwargs):
self.last_q = self.powergrid.sgen["q_mvar"].to_numpy(copy=True)

# initialise voltage barrier function
self.voltage_barrier = VoltageBarrier(self.voltage_loss_type)
self.voltage_barrier = VoltageBarrier(self.voltage_barrier_type)
self._rendering_initialized = False

def reset(self, reset_time=True):
Expand Down

0 comments on commit 556231c

Please sign in to comment.