Ladybug or Insight? Stuck during creating process of insolation analysis in Dynamo

I just need a general help, a brainstorm, some idea or advice. I am student who learn Dynamo by working on my master thesis and I am just stuck as hell.

My general idea/topic is ‘Optimization of building insolation by application of genetic algorithms’, but for Optimo Package is a long way to go, I think.
In a short brief:
A. I’ve made a model of house in Revit which basis on architectural and structural documentation. I’ve modeled foundations, walls, floors and wooden structure, also needed for my dome.
B. In Dynamo I’ve transported only arc wooden structure geometry needed to create dome panels - this is all my idea to put panels ‘between’ the structure.
C. I’ve written (my teacher did to be true) a Code Block which randomly choose which panels will be made of glass - two from upper lever of dome, and two from lower level of dome. The rest of panels would be not transparent (made of hempcrete, but it does not matter). And it works. Everytime I Run the script the Code Block gives me a vector consists of 34 x 0 and 2 x 1 : 1x36[0 0 0 0 1 0 0 0 1 … ] for upper level and 16 x 0 and 2 x 1 in random order. 0 for hempcrete (not transparent) and 1 for glass.
D. I tried Insight add-in to run if Revit sees properly the materials of panels and the answer is ‘yes’. To convert Dynamo geometry into Revit panels with only one attribute ‘metarial’ I used Spring Node ‘SpringsBrepShapeByGeometry’.
E. Then I tried to read the material in new Dynamo script, but apparently it’s not written anywhere. I searched forum for this info, but this is true that Spring Node only set material to the panel and nothing more. No more metadata.
F. So I’ve installed Ladybug and Honeybee to make analysis inside Dynamo - because at the end I want Optimo to calculate different possibilities in some loop. Different possibilities mean that only first vectors 1x36 and 1x18 would be choose randomly and next ones would be optimized = changed by Optimo to get the best arrangement of dome panels.
G. As I can see only some zones can be analyzed, but my model is too complicated now. For example I can’t make a Room Tag in Revit for my space under the DOME (1st level) because the floor is not surrounded by wall. There is no wall, because I have got panels (glass and hempcrete, amount 54) above that floor sent from Dynamo.

This is the point where I stuck and consider some ways to go, but with my incomplete knowledge it’s hard to choose any way to go further. My ideas were:
A. Choose Ladybug and Honeybee, BUT as I can see from YT tutorials, geometry of the building should be easy and should be made of closed polygons - mine is not. In the end I should have HBZones. I have no idea how to make them. I want to analyze only one floor under the dome - it’s open space. Anyone can help me with making zone under dome consists of 54 panels which are Generic Models in Revit?
B. Insight gave me some data in .csv in Schedules/Quantities. I run it by clicking from inside the Revit buttons and then get into some numbers by open a new Dynamo File but can I operate and manage Insight from the inside of Dynamo?

I would really love to use Ladybug Tool because it’s very complex and looks like easy to making changes like time and date period. I use Revit 2018 and Dynamo 2.0.1.
I am attaching my whole work in .rvt and .dyn because I feel hopeless.
It’s link to OneDrive and .rar
https://1drv.ms/u/s!ArKuzImFe2C_oGxMQq9sQ_dVl2cR

@izafolga Below is a definition that provides insolation values using the package Solar Analysis for Dynamo (ver 1.2.2)
While your model was used as the base, the approach in creating the glazed panel is altered. (Wouldn’t matter if you stick to your approach, though)

solarPackage
ŁĄCZONE.dyn (208.9 KB)

2 Likes

Thank you very much for your reply. Looks like it would be very helpful for me. My code is very messy because this is the first time I use Dynamo so everything I learn, I learn by myself. It’s great to see an alternative way - more clear and logic to do the same. I would like to use your approach also but unfortunately the seqn() node is not visible as a whole. It would be great if you could past that code block here to be used. Thank you very much once again.

1 Like

Seems like I’d attached the wrong Dynamo file earlier.
Below is the file and code. Hope it helps.
ŁĄCZONE-Vikram-20180821.dyn (131.6 KB)

def seqn (ar:var[]..[],pl)
{
pt = List.Flatten(ar.Intersect(pl),-1);
ct = Point.ByCoordinates(Math.Sum(pt.X)/List.Count(pt),Math.Sum(pt.Y)/List.Count(pt));
qa = Math.Round(Vector.ByTwoPoints(ct,pt).Normalized().AngleAboutAxis(Vector.YAxis(),Vector.ZAxis()));
q0 = List.GroupByKey(List.SortByKey(ar,qa)["sorted list"],List.SortByKey(ar,qa)["sorted keys"])["groups"];
q1 = List.Flatten(q0.Intersect(pl),-1);
q2 = List.Flatten(List.SortByKey(q0<1>,(Point.ByCoordinates(q1.X,q1.Y).DistanceTo(ct))<1>;)["sorted list"],-1);
return = q2;
};

My master thesis is just likes yours,I’m trying to optimize energy performance with optimo and other energy simulation pakages but can’t find a way to combine them,it’s will be a pleasure to know if you have succeeded

Unfortunately not. I am afraid that for the begginer user who can’t write code in Python Script in Dynamo it would be hard. The main reason is that the code is not optimized. As you can see on my example, I made a whole script with some OUTPUT and it did not work. Vikram_Subbaiah did the different script basics on the same data, OUTPUT theoritically is the same, but the script works with his output, not with mine. But I’ve become a Master od Science anyway. :smiley: My teachers appreciate the idea and amount of work putted into the thesis.

Thanks a lot for your quick reply!:smile: