HB look up results for a set of rooms

hi @chris

When working with large thermal models with a lot of zones, would you know the best way to fetch the results only for a specific set of zones?

I was trying to add a crafty 3rd input into the “HB Read Custom Result” but didn’t manage to get it to work.
Either the input is the exact name of the zones of interest (out of the item selector) or we could input some keywords to search the zones that correspond.

best,
O

Hey @OlivierDambron ,

Sorry for the late response. We have a whole module in the core libraries that is just devoted to matching the imported data collections to specific rooms. You can use that match_rooms_to_data method to filter the data collections of rooms to get just the ones you care about.

It’s unfortunately not going to decrease the component runtime all that much since you still have to import all of the data collections for that output and then filter them but it will at least help with managing the output data collections.

If you need something that also decreases the component runtime, it’s a great deal more development work but you can do it by by using the native Python sqlite3 module and you’ll essentially be crafting your SQLite queries very specifically.

1 Like

Thank you so much @chris
Truely made easy…

1 Like

I’m also looking to filter results based on rooms - any idea why this isn’t working for me?

@SWalters
I faced the same issue at first. Right click your inputs on your python components and try the List type or tree type, one of them solves it.
If you’re still blocked, I can check later properly what I did to make it work.

1 Like

Thanks for that @OlivierDambron . Setting the input on ‘data_collections’ to List Access stopped the script error. However, I still don’t get a filtered output. I’m wondering if it has to do with the rooms being appended with a random UID in the result set?

@chris - On the input model, the rooms are simply named eg: ‘Bedrooms 11’ ; but in the sql result set, all rooms are appended with a uid suffix eg: BEDROOMS_11_C6157F4D.
Could this be why the component ‘HB Color Rooms’ also fails for me? with error: “1. Solution exception:None of the ColorRoom data collections could be matched to the input rooms”

It seems that the output can’t be directly operated by LB components.

Cause there’s an error occured:“1. Solution exception:_data must be a Data Collection. Got <type ‘tuple’>.”

The reason may supposed to be here:

Anyone have any ideas?

Hi @YZZhang,
try with this:

2 Likes

Thank you @MatteoMerli , it works!

1 Like

Note that the data_collections of the opaque components already contain the results of their sub-faces. Therefore, to avoid duplicate results for the apertures you shouldn’t connect the aperture geometries to faces. This is also valid for interior walls and interior apertures.

Sorry that I’m so late here in seeing several people struggling with the custom Python component. In light of all of this, I decided to add an official component for “HB Filter Room Results”

You can get the component on your end right now by running the LB Versioner and it will be included in the next Pollination installers. Also, as you can see in the screenshot above, the HB Rooms by Attribute component now has an new input for value_, which can be used to filter the input rooms/model for a particular value of an attribute. This way, it’s straightforward to get things like “all of the data collections for the cooling in the classrooms.”

Hopefully, this makes it easier for everyone. I guess I had previously thought that people were able to access this room result matching functionality tangentially through components like HB Color Rooms or HB Normalize by Floor Area but neither of these really did exactly what was needed for some workflows. Thanks again to everyone who brought this up.

3 Likes