ModelToOSM for multithreading

I find that ModelToOSM create osw file one by one, which is time-consuming for lots of buildings, can ModelToOSM use multithreading just like HBRunOsw?

OSW creation is already really fast compared to OSM/IDF creation or the actual simulation. Note that you can parallelize the OSM translation and the simulation using the HB Run OSW component.

How many models are you running that OSW creation is the bottleneck?

Technically, there are ways of doing some parallelization of OSW writing but you’ll have to do some custom scripting inside a GHPython component.

I rewrite the code in ModelToOSM using function called “run_function_in_parallel” in RunOSW, it works, thank you!

1 Like

Hi @ZYH,

Would you mind sharing your code from ModelToOSM?

Kind regards,
Marc