From d0bbdd47ae3b8f755a0d137ef8e5108eec2fa7e2 Mon Sep 17 00:00:00 2001 From: aspeake1 Date: Tue, 26 Nov 2024 09:10:03 -0700 Subject: [PATCH] Add check to avoid always trying to report unmet driving hours --- ReportSimulationOutput/measure.rb | 6 +----- ReportSimulationOutput/measure.xml | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ReportSimulationOutput/measure.rb b/ReportSimulationOutput/measure.rb index f3cceec7d0..4fd166c200 100644 --- a/ReportSimulationOutput/measure.rb +++ b/ReportSimulationOutput/measure.rb @@ -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 @@ -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 diff --git a/ReportSimulationOutput/measure.xml b/ReportSimulationOutput/measure.xml index 778ec52d7b..ce2030b997 100644 --- a/ReportSimulationOutput/measure.xml +++ b/ReportSimulationOutput/measure.xml @@ -3,8 +3,8 @@ 3.1 report_simulation_output df9d170c-c21a-4130-866d-0d46b06073fd - 47ae4352-221c-40ec-a914-8f509fa0851b - 2024-11-26T00:35:17Z + 67bb01cb-1bdd-4e69-b4db-dd83cc17d227 + 2024-11-26T16:08:54Z 9BF1E6AC ReportSimulationOutput HPXML Simulation Output Report @@ -1981,7 +1981,7 @@ measure.rb rb script - AF29464F + 20713F2C test_report_sim_output.rb