I have this geometry and my main goal is to maximize terrace surface area while minimizing total shadow onto this terraces, with galapagos, but first I need the measurements. Total surface area is easy, got it. I need help with the total occlusion measurment.

Although all these are useful for defining constraints like sun position, time, etc, I havenât found a way to measure what I want to measure. Searched the forums and most discussions are about a buildingâs shadow onto the floor, not onto itself.

If i can measure it once for any given sun position, the rest is simply an average of multiple hours and sun positions. Thanks in advance for any help.

Any ideas? I think the basic approach would be to project each surface onto the one below and compute the intersection, but that fails when a upper surface also shadows a surface that is below by two levels or more.

And then there is the problem of the shadow angle. If the light is directly above, the geometry is already there, but if the light angle changes so does the shadow, and there projection would not suffice, as you would need to create a surface that has the shape of the shadow firstâŚ

even If you are aware of ladybug, thatâs something I would have a look at. It has right what you want, and I think also as example. Your sunhours position etc, and a shadow analysis. Using more balconys at once is no problem.

Ofc you can do shadow analysis without ladybug or diva, but this would be the easiest way in my opinion

Alright Tim, thanks for the response. I will take a look, but just to clarify, sun position and etc its not really what I want, the link I posted has a C# script for that. The important part is the shadow m2 exerted over the building by itself.

Canât look at your file. But maybe have look at a thread I created a while ago. Not at my initial question, but there were some scripts that used mesh ray/shadow etc. Maybe this could help you a bit.

Yikes + Yikes! Completely forgot that Iâve promised to do something. Blame the advancing Alzheimer and some VERY poor results on matters that count the most (Lewis in F1 and Vale in MotoGP).

Alright I have been checking some LadyBug examples here: https://hydrashare.github.io/hydra/?keywords=LBExampleFiles
But unfortunately none seem to be oriented for what I need, should I maybe ask back on their forum? I wasnât able to post there thoughâŚ

But it got me thinking, maybe I donât need to minimize the shade surface area, instead maximize the total sunlight hours on the geometryâŚ (which an examples seems to calculate already) Hmmm will try to adapt it to my geo and report back.

I downloaded an example: âShadow_Range_Analysisâ Which calculates the hours of sunlight for a given context on a grid.

What I did is put my solid brep both on the context input and the _geometry input, meaning it should construct the grid on the brep itself and not a grid on the ground. I dont know if its working correctly, but it seems like it.

What is baffling me are the outputs. I realized that for Galapagos I need the hours of shade not the hours of light. To minimize this value while maximizing surface area. I can obtain this with sunIsVisible. But, the results seems to differ from totalSunlightHours. By the descriptions I am not sure what totalSunlightHours is doingâŚ I think it has to do with one considering only the hours when the sun is out and the other one considering them all? Dunno.

totalSunlightHours The average number of hours of direct sunlight received by the test _geometry.

sunlightHoursResult The number of hours of direct sunlight received by each of the test points of the input test _geometry. Note that is is the number of hours out of the total number of connected _sunVectors.

sunIsVisible A grafted data stream for each test point with a â1â for each hour of the sunVectors that the sun is visible and a â0â for each hour of the sunVectors when the sun is blocked.

This sounds like multi objective optimization. How wood you do that in Galapagos?

About the output:

Minimizing hours of shade = maximizing hours of sun.

If you use something like octopus for multi objective, you always need to minimize you goals. But if there is something you want to maximize, you easily make the number negative. This will give you the maximum while optimizing for minimum.

I think the output is relatively good described. You can use any of these for your optimization.

You can minimize and maximize with formulas in Galapagos, as David explained here:

In my case the simple formula -A+B = Fitness, will do.
-A is minimizing and B is maximizing.
But I need to minimize the shade hours. In case I would maximize hours of sun, there is no inversion for surface area. I would still need to maximize surface area and hours of sun. That Galapagos cant do, or at least you need to start inputing weights into your formula to decide which variable predominates over the other. Not ideal.

I still not understanding what totalSunlightHours is doingâŚ or why it gives a different amount of hours than sunlightHoursResult. The difference in both results is huge.

I really donât get it. Maybe itâs because English is not my native language, maybe because Iâm trying to help you from my phone and not having access to your file.

why do you need to minimize shading hours? Maximize sun light hours.
If you need a minimization for the formula, just get a negative component after the output of ladybug. This will result in a minimization.

didnât read the whole thread you mentioned, but for multiple fitness with Galapagos you need to know your min/max to set up the formula right. How do you do that? I mean for surface ok, but how for ladybug result?

I am trying to achieve the least shadow with the greater surface area.
I prefer not to try to maximize 2 values on Galapagos. (Sun hours and surface area)
Instead, it is better to minimize a value and maximize another. Sun hours can be inverted into shade hours. Surface area cannot be inverted into anything. Thus surface area always has to be maximized. And I need to use the inverse of sun hours, which is shade hours, to minimize.

Yup.

I dont need to know the max or min. I just need to calculate the surface area and the hours of shade each time a slider is changed. Which I think I was able to achieve already.

Right, we diverted from my original question. It was more oriented towards LadyBug outputs:

So I am no really sure which output to use, but maybe the optimization still works the same with any?
The only output I was able to invert into shade hours was sunIsVisible. If you look at the panels on the screenshot:

sunlightHoursResult = 1,035,392 h sunIsVisible = 1,035,392 h totalSunlightHours= 12,066,000 h

Unfortunately, I canât help you with that. Canât explain it either. Maybe ask this at the ladybug forum: https://discourse.ladybug.tools/
But I think, you can use all the outputs for the optimization.

Just a fast test with octopus: 1 Day, 24 hours, 1 domain as genome Just tested top surface, the others are context.

Hi guys.
Probably a little out of threadâŚ messing around with region intersect components led me to make this:

This give out the real shape of the illuminated/shaded areas.
Works only with flat horizontal shapes. Terraces 1.0_re2.gh (42.3 KB)
(Descriptions inside definition:)

That looks great Riccardo! Thank you!
Could you please upload a canvas image? I seem to be missing the evaluate surface and a subtraction. I figured the eval goes at start but not sure how the subtraction connects.