Is there a way to reload results for the ‘Solar Access’ recipe as well, as the component doesn’t have the option to reuse the matrices?
I have the resulting .ill files from a simulation I ran on another (Linux) machine, and I was now hoping to load the results back in grasshopper but couldn’t figure out how to do it properly…
Any hints would be appreciated (and apologies if I am missing something obvious)
from honeybee.radiance.analysisgrid import AnalysisGrid
pts_file = r'path_to_points_file.pts'
ill_file = r'path_to_ill_file.ill'
hoys =  # list of hours of the year. You can get this from sun_path or recipe.
# first let's create an analysis grid from pts file
ag = AnalysisGrid.from_file(pts_file)
# now let's load the results
# mode is set to 1 to convert the results to 0-1
ag.set_values_from_file(ill_file, hoys, mode=1)
# output this ag and you can use the standard honeybee[+] components to get the values.
Btw, Mostapha, I didn’t get mode = 2 in set_values_from_file
mode – 0 > load the values 1 > load values as binary. Any non-zero value will be 1. This is useful for studies such as sunlight hours. 2 > load the values divided by mode number. Use this mode for daylight factor or radiation analysis.
Why would we want to divide the values by the mode number i.e. division by 2?
In mode 2 results will be divided by mode value which can be 2 or any other value larger than 2.
Imagine the case for daylight factor that we run an illuminance study under an overcast sky with total horizontal illuminance of 10000 lux. Now to get daylight factor we should divide the values by 100 ( 10000 / 100). In that case we can use mode = 100 to get the correct values.
Here is how it is used for daylight factor recipe:
Maybe it would help to change the description in the API documentation, as at least to me, it was not clear that I can set the mode to 100, or 1000 or to any other arbitrary number I like… I thought it maxed out at ‘2’
Could you please share your *.ill file and *.pts file that you are trying to load? Also, please attach the hoys list (maybe as a normal text file or grasshopper file, whatever works for you) that you are using? It would allow me to take a closer look.
see in the link below.
What I would like to be able to do is load much heavier files (after processing them externally to recompose blind combs outside of GH) but let’s start with this lighter one (still 1700 points).
A quick alternative but hacky way would be to open a same grasshopper definition that wrote the file you processed externally and run the simulation in GH (also make sure that the reuse mtx is turned to true). As the black window appears let it run until the oconv or rcontrib functions appear (10 sec) and CTRL+C to close. This will write empty result files in the result folder inside your ladybug folder.
Collect the scene.ill or any other relevant result you processed externally and overwrite the files there. While the toggles in GH were left to true, you just need to induce a small change upstream in the definition for it to refresh (what I was doing was to change plug or unplug a panel in the radparameters (adding “-ab 5” for example), this will not make any change to the simulation.
Wait for the reload of the results and there should show up.
I am also getting the same error, and honestly, I am puzzled myself. Out of curiosity, where did you generate the list for the hoys ? I am assuming this is the same list you supplied to the SkyMatrix component earlier to run the simulation as well?
In the meantime, you can follow the excellent the suggestion from @OlivierDambron. Just make sure you set the ‘reuse Dmtx’ input to true. However, I believe you don’t need to manually close any terminal windows that pop up. Just run the simulation again and let it do it’s thing, and hopefully it should present you the results without any hassle.
Thanks for the solution, indeed that was the issue and the files now load nicely and quickly !
I should have thought about the data format !
thanks @OlivierDambron for the tip as well - I have tried to reload the results using ReuseDmtx before but the calculation time for the first step of calculating the daylight matrices was still taking some useless time. Your trick would work to avoid that I guess.
For the record, I am now able to load a 1.7Gb .ill file (about 27k points for 2800 hours) in 4.4min, which is acceptable.
Next step for me is to figure out how to lighten the .ill files (write an integer lux value rather than the full scientific float ?), or do the addition of several window groups contributions externally.
Using the component of @MohammadHamza on reloading a large file with 11k points for 8760 hours, all my ram got taken and it takes a long time. Did you find an effective way to split the results in post-processing?
perhaps a sub-annual simulation leaving out the night hours where 0 takes considerable space in the .ill files.
Yes I always remove the night hours by testing if the global horizontal illum is > 100 lux.
When combined to an occupancy schedule 8am-6pm, that leaves me with only 2800 hours which is slightly better.
Then I am lucky enough to have a decent of RAM on my work machine (64gb) but 2800 hours x 27k points = 1.7Gb still takes 4min to load and makes the rhino session to use 20gb of RAM.
It is my understanding that DA should only account for hours that are both occupied AND daylit … ie the dark hour between 8am-9am in winter doesn’t burden your results.
But I’d be glad to hear I am not the only one interpreting it as such