I am trying to figure out a way that I can discover the number of total minutes that a test surface receives at least 50% (at any given moment) of direct sunlight exposure between 9am-3pm.
Is there an easy way to do this in ladybug? Please see my grasshopper script and .3dm file below.
yes, Aurelien is correct. I want to know the number of hours for which the test surface is at least 50% exposed to the sun. So for how long is there >%50 sun exposure on the surface - does that make sense??
Hey - to elaborate further than below, I am not concerned if one point receives sunlight for 50% of the time. I need to find out for how long is the entire surface receiving at least 50% sunlight coverage. So if at 10am only 40% of the surface is getting sunlight then that time wont count, but if at 11am the surface is getting 50% sunlight coverage then that will count towards how long in total it receives 50% or more.
Use sunIsVisible output, flip the matrix, count the number of True values and divide it by the number of total hours, count the number of values that are larger than 0.5.
Please find a sample attached. I have added a small component that helps you calculate the number you’re interested in. The component has tooltip descriptions.
In the attached file, I am calculating the number of minutes as you mentioned in the original post. However, you can change the timeStep on sunpath and set it to 1 to get the number of hours.
I ran a quick study on your model. I was looking into the number of hours everyday between 9am to 3pm every month when at least 50% of test geometry would receive sunlight. Following are results.
I was wondering if you may be able to help me find a solution for another extension I have made to this script? I am trying to use galapogas to solve the best solution for maximum floor area whilst remaining above the 180mins sunlight coverage at 50%. I have it currently solving for the greatest floor area but i am not sure how to add the other criteria of only finding solutions that are above the required sunlight hours (180mins) - do you have any ideas/ tips??
Please see my attached files to get a better idea of what I mean
Galapagos allow you ONLY one fitness function. In your case either the time or the coverage. If you want to combine them you need to create your own function that gives you one value that you can connect to galapagos.
The other option is using Octopus instead Galapagos, that will receive multiple functions.
As Abraham pointed out, Octopus will be a better match for a multi objective optimization. However, the current Octopus version does not work with Gh 9.0076 (Crashes Rhino) so I am not able to provide a workflow for Octopus.
I have set up something using Galapagos that meets your criteria.