Skip to content
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

Model EV Batteries #1533

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from
Draft

Model EV Batteries #1533

wants to merge 76 commits into from

Conversation

aspeake
Copy link
Collaborator

@aspeake aspeake commented Oct 30, 2023

Pull Request Description

Allows a new battery object specific to EVs. Implemented in a way such that it could eventually support bidirectional charging, but not included in this PR.

Companion HPXML PR: hpxmlwg/hpxml#403

Checklist

PR Author: Check these when they're done. Not all may apply. strikethrough and check any that do not apply.

PR Reviewer: Verify each has been completed.

  • Schematron validator (EPvalidator.xml) has been updated
  • Sample files have been added/updated (via tasks.rb)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests and/or workflow/tests/hpxml_translator_test.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

@shorowit shorowit added the enhancement New feature or request label Oct 31, 2023
@shorowit
Copy link
Contributor

@aspeake I assume we will need to add error-checking for multiple batteries? I.e., you can't have two EV batteries, and you can't have one EV battery and one home battery. See here for context. Unless you are trying to address this limitation.

@aspeake
Copy link
Collaborator Author

aspeake commented Jan 23, 2024

@aspeake I assume we will need to add error-checking for multiple batteries? I.e., you can't have two EV batteries, and you can't have one EV battery and one home battery. See here for context. Unless you are trying to address this limitation.

Yes, for now we plan to limit to 1 EV/unit. However, the current implementation does allow for one home battery and one EV battery and expects separate schedules for each.

@shorowit
Copy link
Contributor

However, the current implementation does allow for one home battery and one EV battery and expects separate schedules for each.

I assume that probably won't work, for the same reason that modeling two home batteries wasn't previously supported. But we can worry about that later. More of a heads up for now.

@shorowit
Copy link
Contributor

shorowit commented Oct 15, 2024

Possibility for upcoming release. I will pull in master and resolve conflicts. Need to allow a simple (smooth) schedule default. It should already be working w/ power outages and vacancies.

…o ev_batteries

# Conflicts:
#	BuildResidentialHPXML/measure.xml
#	HPXMLtoOpenStudio/measure.rb
#	HPXMLtoOpenStudio/measure.xml
#	HPXMLtoOpenStudio/resources/battery.rb
#	HPXMLtoOpenStudio/resources/data/unavailable_periods.csv
#	HPXMLtoOpenStudio/resources/defaults.rb
#	HPXMLtoOpenStudio/resources/hpxml_schema/HPXML.xsd
#	HPXMLtoOpenStudio/resources/schedules.rb
#	ReportSimulationOutput/measure.xml
#	workflow/tests/base_results/results_simulations_energy.csv
Copy link
Contributor

@shorowit shorowit left a comment

Choose a reason for hiding this comment

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

This was not a thorough review, just some random things I saw while pulling in master and resolving conflicts.

BuildResidentialHPXML/measure.rb Show resolved Hide resolved
HPXMLtoOpenStudio/resources/battery.rb Outdated Show resolved Hide resolved
HPXMLtoOpenStudio/resources/battery.rb Outdated Show resolved Hide resolved
HPXMLtoOpenStudio/resources/defaults.rb Outdated Show resolved Hide resolved
HPXMLtoOpenStudio/tests/test_battery.rb Outdated Show resolved Hide resolved
ReportSimulationOutput/measure.rb Outdated Show resolved Hide resolved
# HPXML EV Battery #
# ---------------- #

if ['base-battery-ev-lifetime-model.xml'].include? hpxml_file
Copy link
Contributor

Choose a reason for hiding this comment

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

Surprised to see this. We previously disabled this model for home batteries (as part of this PR). I don't remember why offhand without digging in. Are we sure we want to use/allow it here?

next unless subcategory.start_with? obj_name
fail 'Unepected error: multiple matches.' unless end_use.nil?

### FIXME: ensure loss program applies to the correct battery
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to address?

Comment on lines 107 to 113
def test_ev_battery_home_battery
# TO-DO: test two batteries, one EV, one home
end

def test_ev_battery_scheduled_default
# TO-DO: test ev battery with schedule (so it is modeled) but with all other fields defaulted
end
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO

@shorowit shorowit modified the milestones: 1.9.0, 1.10.0 Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority high
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants