Open macumber opened 10 years ago
Problem file is at:
https://github.com/NREL/OpenStudio-files/blob/master/Git%20Issue%20Files/Issue%20903.osm
@muehleisen
I’ll take a look when I can. I’m home sick today and not at full speed.
Ralph
Ralph T Muehleisen, Tel:630-252-2547, Cel: 708-655-9954, email: rmuehleisen@anl.govmailto:rmuehleisen@anl.gov
From: Dan Macumber [mailto:notifications@github.com] Sent: Tuesday, March 11, 2014 12:02 PM To: NREL/OpenStudio Cc: Muehleisen, Ralph T. Subject: Re: [OpenStudio] ISO Model translator incorrectly translates model (#903)
Problem file is at:
https://github.com/NREL/OpenStudio-files/blob/master/Git%20Issue%20Files/Issue%20903.osm
@muehleisenhttps://github.com/muehleisen
— Reply to this email directly or view it on GitHubhttps://github.com/NREL/OpenStudio/issues/903#issuecomment-37320727.
There are zero space types in the model...
space_area_total
is therefore zero.
And here you have a division by zero
Process 31776 stopped
* thread #1, name = 'openstudio', stop reason = step over
frame #0: 0x000055555bc4310b openstudio`openstudio::isomodel::ForwardTranslator::translateModel(this=0x0000555567dd1640, t_model=0x0000555566d99930) at ForwardTranslator.cpp:692:59
689 for (size_t day = 0; day <= 6; ++day) {
690 for (size_t hour = 0; hour <= 23; ++hour) {
691 occupancy_schedules_ave[day][hour] = occupancy_schedules_ave[day][hour] / space_area_total;
-> 692 occ_frac_sum[day] += occupancy_schedules_ave[day][hour];
693 }
694
695 if (occ_frac_sum[day] > threshold) {
(lldb) p occupancy_schedules_ave[day][hour]
(__gnu_cxx::__alloc_traits<std::allocator<double> >::value_type) $4 = NaN
I'm not sure what the intent was. Perhaps use something similar to this openstudio-standards method, except we only care about start/end and don't need to return a schedule.
def model_infer_hours_of_operation_building(model, fraction_of_daily_occ_range: 0.25, invert_res: true, gen_occ_profile: false)
Get's bad parameters, some examples: buildingOccupancyFrom = 7 buildingOccupancyTo = -1 equivFullLoadOccupancyFrom = 0 equivFullLoadOccupancyTo = 1 buildingAirLeakage = 5.84734e-282 dhwDistributionSystem = 5.84734e-282 heatGainPerPerson = -1.#IND