|
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 |
The test adjusting the schedules is currently failing. We are not positive where the 'expected' numbers are coming from:
BuildingSync-gem/spec/tests/model_articulation_test/loads_system_spec.rb
Lines 58 to 89 in 9d2e372
It uses the parametric schedule code:
BuildingSync-gem/lib/buildingsync/model_articulation/loads_system.rb
Line 235 in 58574ee
We need to: