NREL / OCHRE

A Python-based building energy modeling (BEM) tool designed to model flexible loads in residential buildings
https://www.nrel.gov/grid/ochre.html
BSD 3-Clause "New" or "Revised" License
40 stars 2 forks source link

Schedule issues with OS 1.7: Vacancy #124

Open jmaguire1 opened 3 months ago

jmaguire1 commented 3 months ago

Spotted by Andrew P at IBACOS.

When running with recent ResStock runs, an issue comes up related to the schedules:

File "C:\Users\AndrewPoerschke\anaconda3\envs\ochre\Lib\site-packages\ochre\utils\schedule.py", line 404, in import_occupancy_schedule

    category, ochre_name = ALL_SCHEDULE_NAMES[hpxml_name]

                           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

KeyError: 'Vacancy'

It looks like there is no vacancy column in these schedules, but it definitely can be in some files. So this may be something that only is there if there is some vacancy in the building.

jmaguire1 commented 3 months ago

Here's a test case:

run1.zip

mnblonsky commented 3 months ago

I'm a little confused, since Vacancy isn't in the OS-HPXML schedule. Are you sure this is a valid schedule file? https://openstudio-hpxml.readthedocs.io/en/latest/workflow_inputs.html#schedules-detailed

jmaguire1 commented 3 months ago

100%, this is from a pretty recent ResStock run.

That said, we could completely ignore the "vacancy" column, it's not used for anything other than if it's vacant a bunch of other schedules (that we do use) get zeroed out: https://openstudio-hpxml.readthedocs.io/en/latest/workflow_inputs.html#hpxml-unavailable-periods

Anything with a 1 in there is affected during a vacancy/power outage, 0 is unaffected. We assume if vacant there's still HVAC, WH, and refrigerator plugged in, but pretty much everything else gets zeroed out.

mnblonsky commented 3 months ago

Maybe ResStock is changing how the schedule files are saved. I can make a quick fix for this, but we should review it again in case ResStock/OS-HPXML switches it back.

mnblonsky commented 3 months ago

see https://github.com/NREL/OCHRE/commit/e3f13d5164e923a65f6728dae107610c20f7df4d

jmaguire1 commented 3 months ago

Good point: I'm not entirely clear right now if the vacancy schedule is something that's written out just in ResStock, or part of OS-HPXML itself. I think OS-HPXML but not 100%, if it's just ResStock then we'd have some cases where this is there and some where it isn't.

I think just ignoring is the right approach, since these schedules are only there to make analysis easier and the other schedules are directly affected no reason to read them, we can just ignore if they're present. It's easy enough to tell when these changed based on all the other schedules going to zero.