Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstudio standards 0.6.1 #159

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions measures/advanced_import_gbxml/resources/os_lib_adv_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

# constants for thermostat and humidistat schedules
STANDARD = Standard.build('90.1-2013')
STANDARDS_VERSION = OpenStudio::VersionString.new(OpenstudioStandards::VERSION)
FIVE_PCT = 0.05

module OsLib_AdvImport
Expand Down Expand Up @@ -272,7 +273,11 @@ def self.make_thermal_zone_thermostats(model, setpoints_thermal_zones_hash)

# thermostat
thermal_zones_array.each do |thermal_zone|
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
if STANDARDS_VERSION < OpenStudio::VersionString.new('0.6.1')
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
else
people_schedule = OpenstudioStandards::ThermalZone.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
end
make_thermostat(thermal_zone, htg_sch, setpoint: htg_setpoint_degC, subtype: 'Heating', people_schedule: people_schedule)
end

Expand Down Expand Up @@ -307,7 +312,11 @@ def self.make_thermal_zone_thermostats(model, setpoints_thermal_zones_hash)

# thermostat
thermal_zones_array.each do |thermal_zone|
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
if STANDARDS_VERSION < OpenStudio::VersionString.new('0.6.1')
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
else
people_schedule = OpenstudioStandards::ThermalZone.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
end
make_thermostat(thermal_zone, clg_sch, setpoint: clg_setpoint_degC, subtype: 'Cooling', people_schedule: people_schedule)
end

Expand Down Expand Up @@ -396,7 +405,11 @@ def self.make_thermal_zone_humidistats(model, setpoints_thermal_zones_hash)

# humidistat
thermal_zones_array.each do |thermal_zone|
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
if STANDARDS_VERSION < OpenStudio::VersionString.new('0.6.1')
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
else
people_schedule = OpenstudioStandards::ThermalZone.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
end
make_humidstat(thermal_zone, setpoint_schedule, setpoint: setpoint, subtype: 'Humidifying', people_schedule: people_schedule)
end

Expand Down Expand Up @@ -431,7 +444,11 @@ def self.make_thermal_zone_humidistats(model, setpoints_thermal_zones_hash)

# humidistat
thermal_zones_array.each do |thermal_zone|
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
if STANDARDS_VERSION < OpenStudio::VersionString.new('0.6.1')
people_schedule = STANDARD.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
else
people_schedule = OpenstudioStandards::ThermalZone.thermal_zone_get_occupancy_schedule(thermal_zone, occupied_percentage_threshold: FIVE_PCT)
end
make_humidstat(thermal_zone, setpoint_schedule, setpoint: setpoint, subtype: 'Humidifying', people_schedule: people_schedule)
end

Expand Down
Loading