Skip to content

Commit

Permalink
fix: Correctly assign output_active_power_limits (#59)
Browse files Browse the repository at this point in the history
Closes #58
  • Loading branch information
pesap authored Nov 4, 2024
1 parent 9114586 commit cc76cf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/r2x/exporter/sienna.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ def process_storage_data(self, fname="storage.csv") -> None:
generic_storage = get_export_records(
list(self.system.to_records(Storage)),
partial(apply_property_map, property_map=self.property_map),
partial(apply_flatten_key, keys_to_flatten={"active_power_limits"}),
partial(apply_pint_deconstruction, unit_map=self.unit_map),
# partial(apply_valid_properties, valid_properties=output_fields),
)
Expand All @@ -422,8 +423,8 @@ def process_storage_data(self, fname="storage.csv") -> None:
for storage in storage_list:
output_dict = storage
output_dict["generator_name"] = storage["name"]
output_dict["input_active_power_limit_max"] = output_dict["active_power"]
output_dict["output_active_power_limit_max"] = output_dict["active_power"]
output_dict["input_active_power_limit_max"] = output_dict["active_power_limits_max"]
output_dict["output_active_power_limit_max"] = output_dict["active_power_limits_max"]
# NOTE: If we need to change this in the future, we could probably
# use the function max to check if the component has the field.
output_dict["input_active_power_limit_min"] = 0 # output_dict["active_power"]
Expand Down

0 comments on commit cc76cf2

Please sign in to comment.