Combinatorial optimization

Hello
I would like to try combinatorial optimization.
The model to be optimized is a two-dimensional wall, and the panel arrangement is a parameter.
I am trying to optimize it with Galapagos now,
It do not work becouse It is a discrete problem and it has many exceptions.
If possible, I would like to extract all possible patterns in C # script and extract the best solution from all patterns.

[Panel placement rules]
· Do not arrange 2 panels continuously in the row
· Do not arrange 3 and more panels continuously in the column.
· All panels are connected
· There are places that are determined not to be placed in advance.
・The minimum number of panels to put in a row is determined.(50% or 30%)

[How to guide optimum solutions]
If there is a panel on the left side of the column, that column has -1,
If you have a panel on the right side of the column, think that the column has 1,
The average of the absolute values ​​of the values ​​obtained by adding all the column values ​​of the same column is small
It is the optimal solution.

I am glad if someone tells me.
Thank you in advance.

conbinatorial optimization.gh (27.3 KB)

I have something that does (well … it doesn’t implement your rules100% … but with some lines of code more it could) what you want but is carried over entirely via code (C#) and thus I suspect that is not the thing that you want.

Using recursion (a Method calls itself until some condition happens and the loop terminates). Each loop is recorded in a DataTree branch … meaning that you can inspect the Cells made per loop. See a small demo with regard the “evolving” creation (pay attention to the rules as exposed in the text Dots).

And this is related with recursion loops control:

1 Like

:thinking: