diff --git a/whoc/controllers/hybrid_supervisory_controller.py b/whoc/controllers/hybrid_supervisory_controller.py index 547ee773..a2e43cd2 100644 --- a/whoc/controllers/hybrid_supervisory_controller.py +++ b/whoc/controllers/hybrid_supervisory_controller.py @@ -67,10 +67,15 @@ def compute_controls(self): return None def supervisory_control(self): - # Extract current power production + # Extract measurements sent + time = self.measurements_dict["time"] # noqa: F841 wind_power = np.array(self.measurements_dict["wind_turbine_powers"]).sum() solar_power = self.measurements_dict["solar_power"] - battery_power = self.measurements_dict["battery_power"] + battery_power = self.measurements_dict["battery_power"] # noqa: F841 + wind_speed = self.measurements_dict["wind_speed"] # noqa: F841 + battery_soc = self.measurements_dict["battery_soc"] # noqa: F841 + solar_dni = self.measurements_dict["solar_dni"] # direct normal irradiance # noqa: F841 + solar_aoi = self.measurements_dict["solar_aoi"] # angle of incidence # noqa: F841 # Temporary print statements (note that negative battery indicates discharging) print("Measured powers (wind, solar, battery):", wind_power, solar_power, battery_power) diff --git a/whoc/interfaces/hercules_hybrid_actuator_disk_interface.py b/whoc/interfaces/hercules_hybrid_actuator_disk_interface.py index 43ecabee..27671a3f 100644 --- a/whoc/interfaces/hercules_hybrid_actuator_disk_interface.py +++ b/whoc/interfaces/hercules_hybrid_actuator_disk_interface.py @@ -47,10 +47,17 @@ def get_measurements(self, hercules_dict): measurements = { "time": time, "wind_turbine_powers": turbine_powers, + "wind_speed": hercules_dict["hercules_comms"]["amr_wind"][self.wind_name]["wind_speed"], "plant_power_reference": plant_power_reference, "battery_power": hercules_dict["py_sims"][self.battery_name]["outputs"]["power"], + "battery_soc": hercules_dict["py_sims"][self.battery_name]["outputs"]["soc"], "solar_power": hercules_dict["py_sims"][self.solar_name]["outputs"]["power_mw"] * 1000, - } # Note: solar_power converted to kW here + "solar_dni": hercules_dict["py_sims"][self.solar_name]["outputs"]["dni"], + "solar_aoi": hercules_dict["py_sims"][self.solar_name]["outputs"]["aoi"], + } + # Notes: solar_power converted to kW here + # solar_dni is the direct normal irradiance + # solar_aoi is the angle of incidence return measurements