Skip to content

Moving example 11 to not use HOPP - #826

Draft
johnjasa wants to merge 3 commits into
NatLabRockies:developfrom
johnjasa:remove_ex11_hopp
Draft

Moving example 11 to not use HOPP#826
johnjasa wants to merge 3 commits into
NatLabRockies:developfrom
johnjasa:remove_ex11_hopp

Conversation

@johnjasa

@johnjasa johnjasa commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Replace HOPP with native H2I models in example 11

This PR replaces HOPP with native H2I wind, solar, and battery models in example 11 (examples/11_hybrid_energy_plant).
The example now uses PYSAMWindPlantPerformanceModel, PYSAMSolarPlantPerformanceModel, and PySAMBatteryPerformanceModel directly, connected through H2I's heuristic dispatch.
Constraint metrics (load missed, curtailment) are now computed directly inside DemandComponentBase.

Changes summary:

  1. Add percent_load_missed and curtailment_percent outputs to DemandComponentBase so any demand component exposes these metrics.
  2. Allow zero capacity in wind, solar, and battery performance models so the optimizer can explore deactivated technology options.
  3. Fix a potential division-by-zero in StoragePerformanceBase.setup() when max_charge_rate = 0.
  4. Rewrite example 11 configs using native H2I models with equivalent COBYLA optimization.

Section 1: Type of Contribution

  • Feature Enhancement
    • Framework
    • Updated Model
    • Tools/Utilities
  • Bug Fix
  • Documentation Update
  • CI Changes
  • Other (please describe):

Section 2: Draft PR Checklist

  • Open draft PR
  • Describe the feature that will be added
  • Fill out TODO list steps
  • N/A

Section 3: General PR Checklist

  • PR description thoroughly describes the changes
  • Added tests for new functionality
  • Tests pass
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date
    • Documentation has been rebuilt successfully
    • Examples have been updated
  • CHANGELOG.md
    • At least one complete sentence provided
    • Hyperlink provided

Section 4: Related Issues

N/A

Section 5: Impacted Areas of the Software

Section 5.1: New Files

  • examples/11_hybrid_energy_plant/tech_inputs/desired_schedules/desired_schedule_hourly_kw.yaml
    • Demand schedule in kW converted from the existing MW file for use with native H2I models.

Section 5.2: Modified Files

  • h2integrate/demand/demand_base.py: Added percent_load_missed and curtailment_percent outputs computed in calculate_outputs().
  • h2integrate/converters/wind/wind_pysam.py: Changed turbine_rating_kw validator to gte_zero and added zero-capacity early return in compute().
  • h2integrate/converters/solar/solar_pysam.py: Added zero-capacity early return and self.config alias for framework consistency.
  • h2integrate/storage/battery/pysam_battery.py: Changed capacity validators to gte_zero and added zero-capacity early return.
  • h2integrate/storage/storage_baseclass.py: Fixed division-by-zero when max_charge_rate = 0.
  • examples/11_hybrid_energy_plant/tech_config.yaml: Replaced HOPPComponent with native wind, solar, combiner, battery, and demand technologies.
  • examples/11_hybrid_energy_plant/plant_config.yaml: Added site resource config, interconnections, dispatch config, and finance subgroup.
  • examples/11_hybrid_energy_plant/driver_config.yaml: Updated design variables and constraints to use native H2I outputs.
  • examples/test/test_all_examples.py: Updated example 11 test for native H2I outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant