Open AlejandroCN7 opened 2 years ago
Hello @AlejandroCN7, thanks for using opyplus
, and reporting this bug back to us !
Indeed it seems there is a contradiction between how EPLaunch works and the Energy+.idd
file that indicates only ScheduleTypeLimits
objects can be referenced. (See below)
Schedule:Compact,
A1 , \field Name
\required-field
\type alpha
\reference ScheduleNames
A2 , \field Schedule Type Limits Name
\type object-list
\object-list ScheduleTypeLimitsNames
Under the hood, opyplus
corrects several bugs in IDD files, so I think this is the way to go about this bug. I made a quick test by modifying the IDD and was able to load the IDF file without any error raised.
Schedule:Compact,
A1 , \field Name
\required-field
\type alpha
\reference ScheduleNames
A2 , \field Schedule Type Limits Name
\type choice
\key On/Off
\object-list ScheduleTypeLimitsNames
I still have to validate this fix and if it works properly, I will make a PR to fix this next week. Until then, modifying the schedule type limit to "Any Number" (present in the IDF file) should do the trick.
Hello @AlejandroCN7, thanks for reporting this bug. Hello @thomascerbelaud , thanks for the fix.
Energy+ seems to behave as if a pre-existing ScheduleTypeLimits named On/Off had been defined (even though not declared in idf). The proposed fix changed the field type to a choice, rather than an object-list. This breaks the way opyplus manages reference fields (opyplus will think that the field "Schedule Type Limits Name" is a string, rather than a link to other records). => I think we need to implement a new concept of "pre-existing" records. We could define an On/Off ScheduleTypeLimits at each new Idf creation, but this record would be registered as "pre-existing" or "virtual" and would never be written to a .idf file and always stay in-memory. Moreover, it would be interesting to find an explanation in Energy+ documentation (and maybe find out that other records are pre-defined?).
Describe the bug I am trying to load a building IDF file with opyplus, but apparently it does not have support for the On/Off Schedule Type Limits Name.
To Reproduce Steps to reproduce the behavior:
Expected behavior building should be an Epm object, but the next Traceback happens:
With Energyplus 9.5.0 this type (On/Off) is a valid type. The lines in the IDF that cause the error are as follows:
If On/Off is changed to Any Number value, for example, The Epm.from_idf() function is executed successfully.