Skip to content

Conversation

@joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Dec 4, 2025

Pull Request Description

On second thought, couldn't we support whole SFA/MF buildings with vehicles since the TrackChargeDischargeSchedules storage operation scheme is always used?

Addresses #1499. This PR basically moves the EMS program from vehicle.rb to output.rb so that it can be written after unit models are merged (similar to the unmet heating/cooling hours EMS program).

Checklist

Not all may apply:

  • Schematron validator (EPvalidator.sch) has been updated
  • Sample files have been added/updated (openstudio tasks.rb update_hpxmls)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests/test*.rb and/or workflow/tests/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

@joseph-robertson joseph-robertson self-assigned this Dec 4, 2025
@joseph-robertson joseph-robertson added the enhancement New feature or request label Dec 4, 2025
@joseph-robertson joseph-robertson changed the base branch from vehicles-whole-building to master December 5, 2025 17:19
ev_discharge_program.addLine(" ElseIf #{temp_sensor.name} > #{UnitConversions.convert(100, 'F', 'C').round(3)}")
ev_discharge_program.addLine(" Set site_temp_adj = #{UnitConversions.convert(100, 'F', 'C').round(3)}")
ev_discharge_program.addLine(' EndIf')
ev_discharge_program.addLine(" Set power_mult = #{power_curve}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This line was previously before "Set site_temp_adj = ...", which I believe was a bug.


hpxml_osm_map.each do |hpxml_bldg, unit_model|
unit_model.getElectricLoadCenterStorageLiIonNMCBatterys.each do |elcs|
vehicle = hpxml_bldg.vehicles[-1] # FIXME: is this right?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can have a max of 1 vehicle right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +69 to +71
if not discharging_schedule.nil?
eff_discharge_power = schedules_file.calc_design_level_from_daily_kwh(col_name: discharging_schedule.name.to_s, daily_kwh: ev_annl_energy / 365)
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's possible that the schedules file does not include EV schedules.

base-vehicle-ev-charger.xml,82.721,82.721,45.452,45.452,37.268,0.0,0.0,0.0,0.0,0.0,0.0,1.16,0.0,0.0,3.58,0.797,10.883,0.0,0.0,4.507,0.142,0.334,0.0,0.0,0.0,0.0,1.802,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.151,37.268,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
base-vehicle-ev-no-charger.xml,74.569,74.569,37.301,37.301,37.268,0.0,0.0,0.0,0.0,0.0,0.0,1.16,0.0,0.0,3.58,0.797,10.883,0.0,0.0,4.507,0.142,0.334,0.0,0.0,0.0,0.0,1.802,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,37.268,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
base-vehicle-multiple.xml,82.768,82.768,45.5,45.5,37.268,0.0,0.0,0.0,0.0,0.0,0.0,1.16,0.0,0.0,3.58,0.797,10.883,0.0,0.0,4.507,0.142,0.334,0.0,0.0,0.0,0.0,1.802,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.199,37.268,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
base-vehicle-multiple.xml,95.687,95.687,58.418,58.418,37.268,0.0,0.0,0.0,0.0,0.0,0.0,1.16,0.0,0.0,3.58,0.797,10.883,0.0,0.0,4.507,0.142,0.334,0.0,0.0,0.0,0.0,1.802,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,21.117,37.268,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This looks quite a bit different. Why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

…nd only select modeled vehicles to include in vehicle EMS program.
@joseph-robertson joseph-robertson marked this pull request as ready for review December 5, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants