-
Notifications
You must be signed in to change notification settings - Fork 471
Revise file handling for imported and exported shading calcs #6482
Description
Issue overview
-
Per @Myoldmopar here c++ file streams should be used to import the shading fractions.
-
Also, fix nan problem with shading file that has only 8760 data rows. SolarShadingTest_Shading_Data.csv was lengthened to 8784 rows to avoid test failures, but things should work with an 8760 file. More explanation - using the attached csv file, run SolarShadingTest_ImportedShading using a debug build. If you're on Windows, you need to add nan debugging options described here.
SolarShadingTest_Shading_Data.csv.txt
It will crash inside the minval function when it is called from [here in ScheduleManager::CheckScheduleValueMinMax which was called from here.
The problem is nans in the data for DaySchedule(388).TSValue for East Side Tree day 366
Looking at the logic for Schedule:File:Shading, the leap year logic seems wrong here
If ScheduleFileShadingLeapYear is true that means the file has data for Feb29 so it doesn't need to duplicate any data. At first glance, it seems that when ScheduleFileShadingLeapYear is false then you need to duplicate the data for Feb28 and shift the rest of the year down one.
Oh, I see, this is modeled after similar code here for Schedule:File. I think the fix is to change ScheduleFileShadingLeapYear to !ScheduleFileShadingLeapYear. Then you can put the shorter schedule data file back in place.
Details
Some additional details for this issue (if relevant):
- Platform (Operating system, version)
- Version of EnergyPlus (if using an intermediate build, include SHA)
- Unmethours link or helpdesk ticket number
Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
- Defect file added (list location of defect file here)
- Ticket added to Pivotal for defect (development team task)
- Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)

