Skip to content

Commit

Permalink
Address more warnings for workflow tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeake committed Jan 7, 2025
1 parent 5070b3d commit f49ce9a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>f64cb605-6041-4dac-ac87-f65be16f2f33</version_id>
<version_modified>2025-01-06T23:28:50Z</version_modified>
<version_id>1ca34a50-b6b7-4bba-97d9-3902a77d5002</version_id>
<version_modified>2025-01-07T16:06:16Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -771,7 +771,7 @@
<filename>test_vehicle.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>4767CA5A</checksum>
<checksum>5C725886</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/tests/test_vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require_relative '../measure.rb'
require_relative '../resources/util.rb'

class HPXMLtoOpenStudioBatteryTest < Minitest::Test
class HPXMLtoOpenStudioVehicleTest < Minitest::Test
def teardown
File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv')
File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv')
Expand Down
3 changes: 2 additions & 1 deletion workflow/hpxml_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@
"ev_battery_capacity": 100,
"ev_battery_usable_capacity": 80,
"ev_miles_per_year": 10000,
"ev_hours_per_week": 8.8,
"ev_hours_per_week": 14,
"ev_energy_efficiency": 0.25,
"ev_charger_present": true,
"ev_charger_power": 7000,
Expand All @@ -1041,6 +1041,7 @@
"sample_files/base-pv-battery-and-ev.xml": {
"parent_hpxml": "sample_files/base-pv-battery.xml",
"ev_battery_present": true,
"ev_hours_per_week": 21,
"ev_charger_present": true,
"ev_charger_location": "outside",
"schedules_filepaths": "../../HPXMLtoOpenStudio/resources/schedule_files/battery-ev.csv"
Expand Down
2 changes: 1 addition & 1 deletion workflow/sample_files/base-battery-ev-plug-load-ev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
</BatteryElectricVehicle>
</VehicleType>
<MilesDrivenPerYear>10000.0</MilesDrivenPerYear>
<HoursDrivenPerWeek>8.8</HoursDrivenPerWeek>
<HoursDrivenPerWeek>14.0</HoursDrivenPerWeek>
<FuelEconomyCombined>
<Units>kWh/mile</Units>
<Value>0.25</Value>
Expand Down
2 changes: 1 addition & 1 deletion workflow/sample_files/base-battery-ev-scheduled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
</BatteryElectricVehicle>
</VehicleType>
<MilesDrivenPerYear>10000.0</MilesDrivenPerYear>
<HoursDrivenPerWeek>8.8</HoursDrivenPerWeek>
<HoursDrivenPerWeek>14.0</HoursDrivenPerWeek>
<FuelEconomyCombined>
<Units>kWh/mile</Units>
<Value>0.25</Value>
Expand Down
2 changes: 1 addition & 1 deletion workflow/sample_files/base-battery-ev-undercharged.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
</BatteryElectricVehicle>
</VehicleType>
<MilesDrivenPerYear>10000.0</MilesDrivenPerYear>
<HoursDrivenPerWeek>8.8</HoursDrivenPerWeek>
<HoursDrivenPerWeek>14.0</HoursDrivenPerWeek>
<FuelEconomyCombined>
<Units>kWh/mile</Units>
<Value>0.25</Value>
Expand Down
2 changes: 1 addition & 1 deletion workflow/sample_files/base-battery-ev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@
</BatteryElectricVehicle>
</VehicleType>
<MilesDrivenPerYear>10000.0</MilesDrivenPerYear>
<HoursDrivenPerWeek>8.8</HoursDrivenPerWeek>
<HoursDrivenPerWeek>14.0</HoursDrivenPerWeek>
<FuelEconomyCombined>
<Units>kWh/mile</Units>
<Value>0.25</Value>
Expand Down
1 change: 1 addition & 0 deletions workflow/sample_files/base-misc-emissions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@
<ConnectedCharger idref='EVCharger1'/>
</BatteryElectricVehicle>
</VehicleType>
<HoursDrivenPerWeek>21.0</HoursDrivenPerWeek>
</Vehicle>
</Vehicles>
<ElectricVehicleChargers>
Expand Down
1 change: 1 addition & 0 deletions workflow/sample_files/base-pv-battery-and-ev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@
<ConnectedCharger idref='EVCharger1'/>
</BatteryElectricVehicle>
</VehicleType>
<HoursDrivenPerWeek>21.0</HoursDrivenPerWeek>
</Vehicle>
</Vehicles>
<ElectricVehicleChargers>
Expand Down
6 changes: 5 additions & 1 deletion workflow/tests/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ def _verify_outputs(rundir, hpxml_path, results, hpxml, unit_multiplier)
next if message.include? 'Electric vehicle battery specified with no charging/discharging schedule provided; battery will not be modeled.'
end
if !hpxml_bldg.vehicles.empty? && !hpxml_bldg.header.schedules_filepaths.empty? && !hpxml_bldg.vehicles[0].ev_charger_idref.nil? && hpxml_bldg.vehicles[0].ev_charging_weekday_fractions.nil?
next if message.include? 'Electric vehicle hours per week inputted (8.8) do not match the hours per week calculated from the discharging schedule (21.0). The inputted hours per week value will be ignored.'
next if message.include? 'Electric vehicle hours per week inputted (14.0) do not match the hours per week calculated from the discharging schedule (21.0). The inputted hours per week value will be ignored.'
next if message.include? 'A total of 1066.0 driving hours could not be met due to insufficient vehicle charge. This issue may result from a combination EV battery parameters, charging power, and driving or discharging schedules.'
end
if !hpxml_bldg.vehicles.empty? && !hpxml_bldg.vehicles[0].ev_charger_idref.nil? && !hpxml_bldg.vehicles[0].ev_charging_weekday_fractions.nil?
next if message.include? 'Electric vehicle hours per week inputted (14.0) do not match the hours per week calculated from the discharging schedule (8.9). The inputted hours per week value will be ignored.'
end
if !hpxml_bldg.vehicles.empty? && hpxml_bldg.vehicles[0].ev_charger_idref.nil?
next if message.include? 'Electric vehicle specified with no charger provided; battery will not be modeled.'
Expand Down

0 comments on commit f49ce9a

Please sign in to comment.