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

Fix LoadSystem Spec Expectations #109

Open
2 tasks
corymosiman12 opened this issue Jan 22, 2021 · 0 comments
Open
2 tasks

Fix LoadSystem Spec Expectations #109

corymosiman12 opened this issue Jan 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@corymosiman12
Copy link
Contributor

The test adjusting the schedules is currently failing. We are not positive where the 'expected' numbers are coming from:

it 'should parse and write building_151.xml and adjust schedules successfully' do
# -- Setup
file_name = 'building_151.xml'
std = CA_TITLE24
xml_path, output_path = create_xml_path_and_output_path(file_name, std, __FILE__, 'v2.2.0')
epw_path = nil
translator = translator_sizing_run_and_check(xml_path, output_path, epw_path, std)
model = translator.get_model
cut_off_value = 0.5
# read in the schedule
space_types = model.getSpaceTypes
expect(space_types.length).to be 4
space_types.each do |space_type|
default_schedule_set = space_type.defaultScheduleSet.get
puts "default_schedule_set: #{default_schedule_set.name} for space type: #{space_type.name}"
help_print_all_schedules("schedules-#{space_type.name}.csv", default_schedule_set)
expect(help_calculate_hours(default_schedule_set.numberofPeopleSchedule, cut_off_value).round(1)).to be 47.9
expect(help_calculate_hours(default_schedule_set.hoursofOperationSchedule, cut_off_value).round(1)). to be 40.0
expect(help_calculate_hours(default_schedule_set.peopleActivityLevelSchedule, cut_off_value).round(1)). to be 168.0
expect(help_calculate_hours(default_schedule_set.lightingSchedule, cut_off_value).round(1)). to be 67.0
expect(help_calculate_hours(default_schedule_set.electricEquipmentSchedule, cut_off_value).round(1)).to be 67.4
expect(help_calculate_hours(default_schedule_set.gasEquipmentSchedule, cut_off_value).round(1)).to be 0.0
expect(help_calculate_hours(default_schedule_set.hotWaterEquipmentSchedule, cut_off_value).round(1)).to be 0.0
expect(help_calculate_hours(default_schedule_set.infiltrationSchedule, cut_off_value).round(1)).to be 66.0
expect(help_calculate_hours(default_schedule_set.steamEquipmentSchedule, cut_off_value).round(1)).to be 0.0
expect(help_calculate_hours(default_schedule_set.otherEquipmentSchedule, cut_off_value).round(1)).to be 0.0
break
end
end

It uses the parametric schedule code:

# Infer the current hours of operation schedule for the building

We need to:

  • Document where the expected numbers are coming from
  • Fix the test to passing
@corymosiman12 corymosiman12 added the bug Something isn't working label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant