-
Notifications
You must be signed in to change notification settings - Fork 27
Critical load custom meter for resilience calculations #2140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: battery-unit-mults-fix
Are you sure you want to change the base?
Critical load custom meter for resilience calculations #2140
Conversation
| # Create PV/CritLoad meters | ||
| if pv_key_vars.empty? && gen_key_vars.empty? | ||
| # Avoid OpenStudio warnings if nothing to decrement | ||
| Model.add_meter_custom( | ||
| model, | ||
| name: MeterCustomElectricityPV, | ||
| name: MeterCustomElectricityCriticalLoad, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the critical load meter is similar to the total/net meters, in that it's the facility meter minus some other things. So maybe I am not immediately seeing the nuance here, but can't you revert all of this new logic and simply change
{ MeterCustomElectricityTotal => total_key_vars,
MeterCustomElectricityNet => net_key_vars }.each do |meter_name, key_vars|
to
{ MeterCustomElectricityTotal => total_key_vars,
MeterCustomElectricityNet => net_key_vars,
MeterCustomElectricityCriticalLoad => pv_key_vars + gen_key_vars }.each do |meter_name, key_vars|
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
ReportSimulationOutput/measure.rb
Outdated
| crit_load = get_report_meter_data_timeseries([Outputs::MeterCustomElectricityCriticalLoad.upcase], UnitConversions.convert(1.0, 'J', 'kWh'), 0, resilience_frequency) | ||
| crit_load = crit_load.zip(batt_loss).map { |x, y| x + y } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice to see all the meters removed. But I can't help to wonder if the battery losses should be incorporated in the critical load meter, rather than doing timeseries addition here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, aren't battery losses already on Electricity:Facility? Maybe we're already adding battery losses twice, and there is a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which I think would mean 0ae7bdb should be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the conclusion I came to. See 35585cc.
Pull Request Description
Create a critical load custom meter (Electricity:Facility plus PV) to use for resilience calculations. This replaces requesting/using multiple meters (Electricity:Facility, ElectricityProduced:Facility, ElectricStorage:ElectricityProduced) for resilience calculations.
Checklist
Not all may apply:
EPvalidator.sch) has been updatedopenstudio tasks.rb update_hpxmls)HPXMLtoOpenStudio/tests/test*.rband/orworkflow/tests/test*.rb)openstudio tasks.rb update_measureshas been run