Prevent collision of blocks (Galapagos)

Hi,

I am trying to place multiple blocks (volumes of my programs) along a circle which defines the position of these blocks on each floor. I drew a yellow line that connects the center of the blocks to each other and measured the length of that line which I want to minimise with Galapagos. The green pipe in the center is the lift core for reference.


The genes connected to Galapagos are the distance the blocks can move perpendicular towards the core (white dotted) and the angle at which they are rotated (degrees) (yellow) relative to the core

The problem comes when I am running my iterations on Galapagos and the blocks collide with each other. Is there a way to prevent the blocks from colliding as some blocks literally sit within another block which is not what I want to achieve. I tried to refer to this link
but my blocks are still intersecting, does anyone have a solution to this?

TLDR: I want to iterate the positions of my blocks within each circle such that I can minimise the length of the yellow line with Galapgos without the blocks intersecting with each other at the final solution

help me please.gh (31.4 KB)

no sliders appear connected to the galapagos component in your file…you have many sliders…

sure - maybe (graphically) indicate which ones?

In the meantime, this example might help you ‘get closer to your goal’ :stuck_out_tongue_winking_eye:
help me please.gh (57.0 KB)

note: I only fed the solver the ‘degrees’ sliders and {edit} I chose to ‘project’ your blocks to the ground for redundancy/accuracy, but I think you can still rule out collisions of the blocks themselves (that is, without projections) using the same or similar approach.

The blocks are still there though, floating somewhere high above the projected curves.

Best

Hi, thank you so much for your help, I am taking a look at it now ! :smiley:

no sliders appear connected to the galapagos component in your file…you have many sliders…

Sorry about the sliders, they must have disconnected when I uploaded the new file, I have updated the file with the correct sliders in the original post (above)!

the distance the blocks can move perpendicular towards the core and the angle at which they are rotated (degrees) relative to the core

All the blocks have the flexibility to move towards the center, so below is graphically the direction (White dotted) of which the blocks are allowed to move and the direction of rotation (Yellow)

I hope this clarifies and thank you so much ! I will reply if I have questions about your file! :smiley:

1 Like

Hi, sorry for the late reply, but I only recently had the time to sit down and understand the file
I noticed you changed the maximum stagnant number to 7 instead of 50, may I know why you changed it and how does changing affect the results?

Thank you very much, I’m so sorry the reply was so late :frowning:
Other than that, what you did helped me a lot, thank you so much !!

1 Like

Feel free to change that - I was just trying to test the solver and have it stop quickly - forgot to leave it at defaults. Plus I was using a few sliders only.

the number corresponds to a sort of ‘runtime cap’ you put on the solver - when solutions aren’t varying much anymore a low number makes the solver stop sooner sometimes.

Best

Oh I see, ok thank you so much ! :slight_smile:

Another strategy I use is to check for intersections and if I find any, penalize the fitness value.

So if I wanted to maximise the fitness value (eg. 100), I would decrease it by a certain value every time a collision occurs (eg. -1), because with every lowered value, Galapagos would try to increase it. Is this what you mean by penalise the value?