Skip to content

Commit

Permalink
Add check to avoid always trying to report unmet driving hours
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeake committed Nov 26, 2024
1 parent 8b29eab commit d0bbdd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions ReportSimulationOutput/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def energyPlusOutputRequests(runner, user_arguments)

# Vehicle outputs
@vehicles.values.each do |vehicle_data|
if not vehicle_data.ems_variable.nil?
if (not vehicle_data.ems_variable.nil?) && (not unmet_driving_hrs_program.nil?)
if args[:include_annual_vehicle_outputs]
result << OpenStudio::IdfObject.load("EnergyManagementSystem:OutputVariable,#{vehicle_data.ems_variable}_annual_outvar,#{vehicle_data.ems_variable},Summed,ZoneTimestep,#{unmet_driving_hrs_program.name},hr;").get
result << OpenStudio::IdfObject.load("Output:Variable,*,#{vehicle_data.ems_variable}_annual_outvar,runperiod;").get
Expand Down Expand Up @@ -3237,10 +3237,6 @@ def get_object_outputs_by_key(model, object, class_name)
if object.additionalProperties.getFeatureAsBoolean('is_ev').get
return { VT::VehicleDischarging => ['Electric Storage Discharge Energy'] }
end
elsif object.to_EnergyManagementSystemOutputVariable.is_initialized
if object_type == Constants::ObjectTypeUnmetDrivingHours
return { VT::UnmetDrivingHours => [object.name.to_s] }
end
end

end
Expand Down
6 changes: 3 additions & 3 deletions ReportSimulationOutput/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>report_simulation_output</name>
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
<version_id>47ae4352-221c-40ec-a914-8f509fa0851b</version_id>
<version_modified>2024-11-26T00:35:17Z</version_modified>
<version_id>67bb01cb-1bdd-4e69-b4db-dd83cc17d227</version_id>
<version_modified>2024-11-26T16:08:54Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>ReportSimulationOutput</class_name>
<display_name>HPXML Simulation Output Report</display_name>
Expand Down Expand Up @@ -1981,7 +1981,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>AF29464F</checksum>
<checksum>20713F2C</checksum>
</file>
<file>
<filename>test_report_sim_output.rb</filename>
Expand Down

0 comments on commit d0bbdd4

Please sign in to comment.