diff --git a/resources/measures/upgrade_df_lighting_control/resources/dispatch_schedule_generation.rb b/resources/measures/upgrade_df_lighting_control/resources/dispatch_schedule_generation.rb index 64e0d9e3..9d0df345 100644 --- a/resources/measures/upgrade_df_lighting_control/resources/dispatch_schedule_generation.rb +++ b/resources/measures/upgrade_df_lighting_control/resources/dispatch_schedule_generation.rb @@ -889,7 +889,7 @@ def load_prediction_from_full_run(model, num_timesteps_in_hr, epw_path=nil, run_ end ### read cambium/egrid emission factors -def read_emission_factors(model, scenario, year=2018) +def read_emission_factors(model, scenario, year=2021) lbm_to_kg = OpenStudio.convert(1.0, 'lb_m', 'kg').get # set cambium and egrid regions grid_region = model.getBuilding.additionalProperties.getFeatureAsString('grid_region') @@ -969,7 +969,7 @@ def emission_prediction(load, factor, num_timesteps_in_hr) hourly_emissions_kg = hourly_load_mwh.zip(factor).map { |n, f| n * f } elsif factor.is_a?(Numeric) # egrid factor - hourly_emissions_kg = (hourly_load_mwh.inject(:+)) * factor + hourly_emissions_kg = hourly_load_mwh.map {|n| n * factor} else raise "Bad emission factors" end diff --git a/resources/measures/upgrade_df_thermostat_control_load_shed/resources/dispatch_schedule_generation.rb b/resources/measures/upgrade_df_thermostat_control_load_shed/resources/dispatch_schedule_generation.rb index 379a796b..d11ac3fd 100644 --- a/resources/measures/upgrade_df_thermostat_control_load_shed/resources/dispatch_schedule_generation.rb +++ b/resources/measures/upgrade_df_thermostat_control_load_shed/resources/dispatch_schedule_generation.rb @@ -890,7 +890,7 @@ def load_prediction_from_full_run(model, num_timesteps_in_hr, epw_path=nil, run_ end ### read cambium/egrid emission factors -def read_emission_factors(model, scenario, year=2018) +def read_emission_factors(model, scenario, year=2021) lbm_to_kg = OpenStudio.convert(1.0, 'lb_m', 'kg').get # set cambium and egrid regions grid_region = model.getBuilding.additionalProperties.getFeatureAsString('grid_region') @@ -970,7 +970,7 @@ def emission_prediction(load, factor, num_timesteps_in_hr) hourly_emissions_kg = hourly_load_mwh.zip(factor).map { |n, f| n * f } elsif factor.is_a?(Numeric) # egrid factor - hourly_emissions_kg = (hourly_load_mwh.inject(:+)) * factor + hourly_emissions_kg = hourly_load_mwh.map {|n| n * factor} else raise "Bad emission factors" end