-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Optionally Save HOPP plots
Every time HOPP is run, battery_output.png and generation_profile.png are created, which are not universally required. For both testing and docs building, this is unnecessary and requires additional teardown steps. Ideally, this should be a model input parameter.
Proposed solution
Include an option in the HOPP config (using https://github.com/NatLabRockies/H2Integrate/blob/main/examples/25_sizing_modes/tech_inputs/hopp_config_tx.yaml#L209) as an example, it could go in the simulation_options like the following, which would allow for the code modifications listed beneath.
#hopp_config_tx.yaml
...
config:
simulation_options:
cache: true
save_figures: false
wind:
skip_financial: false# h2integrate/converters/hopp/hopp_wrapper.py::161
try:
system = self.hybrid_interface.system
save = self.hopp_config["config"]["simulation_options"]["save_figures"]
plot_battery_output(system, start_day=180, plot_filename="battery_output.png" if save else None)
plot_generation_profile(
system, start_day=180, plot_filename="generation_profile.png" if save else None
)
except AttributeError:
passAlternatives considered
Currently these are included in the .gitignore, and to remove them locally I either delete them manually. In a separate testing work, their removal is part of a teardown phase, but the example itself is called in more than one place, so this is required in more than one place.