Skip to content

Conversation

@adfarth
Copy link
Collaborator

@adfarth adfarth commented Jan 7, 2025

TODO:

  • Add BESS inputs for can_net_meter, can_wholesale, can_export_beyond_nem_limit
  • index dvStorageToGrid on metering type, following the logic of tech export bins
  • Determine whether to use dvs for total BESS discharge & BESStoGrid vs. BESStoLoad & BESStoGrid --> Choosing to mirror tech production by using dvDischargeFromStorage as total discharge with dvStorageToGrid
  • Incorporate dvStorageToGrid into load balancing constraints
  • Test outputs against expected values
  • Review and update emissions calculations to account for BESS export
  • Address TODOs throughout code
  • Check and remove all references to "can_export_to_grid" (currently commented out)

Things to test:

  • BESS has NEM and PV does not --> errors
  • All 3 new inputs for BESS
  • Different solvers (with vs without indicator constraint compatibility)
  • PV has NEM or WHL and BESS does not
  • Make sure BESS serves load first
  • Test with thermal storage

Known issues:

  • If you have a net_metering_limit_kw > 0, PV.can_net_meter = false, and ElectricStorage.can_net_meter = true, will error --> Could maybe add a check that not only BESS can net meter without a generating tech? Or just allow this?
  • ElectricStorage can end up being sized, and export, much more than the peak load (this is currently true in develop, too, but now the issue is more extreme)

Nice to haves / future work:

  • Test solve time impacts compared to master branch (impacting solve times even without allowing BESS to export?)
  • Check export in MPC -- not currently high priority so could remove if this adds a lot of work
  • Consider adding other frameworks outside of net metering or net billing. E.g. BESS can export, potentially not receive any NEM or NB compensation, and receive a per kWh compensation during defined periods (similar, but different from, CPs). Or: BESS can export but doesn't receive any compensation at all.
  • If compensated through net metering, assess whether the BESS capacity should be included in the net_metering_limit_kw.

}
)
else
bigM_hourly_load = maximum(p.s.electric_load.loads_kw)+maximum(p.s.space_heating_load.loads_kw)+maximum(p.s.process_heat_load.loads_kw)+maximum(p.s.dhw_load.loads_kw)+maximum(p.s.cooling_load.loads_kw_thermal)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zolanaj would you be willing to review this specific change? The update the bigM_hourly_load

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adfarth this looks good to me! I see the reason to expand it since a large battery could charge or discharge at its max capacity under time-variant pricing. Since the default for max_kw is 1e4 this is unlikely to cause solution time issues unless a giant custom number is entered.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! And thanks to Hallie for the implementation of this

for t in techs.elec
export_bins_by_tech[t] = s.electric_tariff.export_bins
end
# TODO implement export bins by tech (rather than assuming that all techs share the export_bins)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hdunham how does this suggestion differ from export_bins_by_tech?

@adfarth adfarth changed the title Allow BESS to Export Allow BESS to Export and Fixed SOC Jul 9, 2025
Copy link
Collaborator

@zolanaj zolanaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval of big-M implementation

}
)
else
bigM_hourly_load = maximum(p.s.electric_load.loads_kw)+maximum(p.s.space_heating_load.loads_kw)+maximum(p.s.process_heat_load.loads_kw)+maximum(p.s.dhw_load.loads_kw)+maximum(p.s.cooling_load.loads_kw_thermal)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adfarth this looks good to me! I see the reason to expand it since a large battery could charge or discharge at its max capacity under time-variant pricing. Since the default for max_kw is 1e4 this is unlikely to cause solution time issues unless a giant custom number is entered.

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.

4 participants