From 8eb579e9eadf2f47bfd08651c2ac9da665c5152e Mon Sep 17 00:00:00 2001 From: genevievestarke <103534902+genevievestarke@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:48:52 -0600 Subject: [PATCH] Fix solar pysam bug for when an external signal is defined (#115) Co-authored-by: Starke --- hercules/python_simulators/solar_pysam.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hercules/python_simulators/solar_pysam.py b/hercules/python_simulators/solar_pysam.py index 58c17529..c25cdb50 100644 --- a/hercules/python_simulators/solar_pysam.py +++ b/hercules/python_simulators/solar_pysam.py @@ -196,6 +196,8 @@ def step(self, inputs): elif "external_signals" in inputs.keys(): if "solar_power_reference_mw" in inputs["external_signals"].keys(): P_setpoint = inputs["external_signals"]["solar_power_reference_mw"] + else: + P_setpoint = None else: P_setpoint = None self.control(P_setpoint)