Find all possible solutions within a range that equals 1,000

I am working on a proposal for an exhibition that will curate 1,000 objects. A number of them will be stacked on top of the rest of them. I need to find all possible layouts when splitting them into two groups.

In my Grasshopper script I have 4 number sliders. Each have their own range. Two sliders are set to be even numbers and the other two are set to odd numbers.

I need to find all possible solutions within a range that equals 1,000.

For example, one solution is:

18 x 31 = 558
26 x 17 = 442
558 + 442 = 1,000

I tried Galapagos and it found several solutions. However, it would stop before finding all possible solutions. The ranges I am working with are not too wide so it shouldn’t take too long to crunch these numbers.

If I am successful at finding all possible solutions with 4 sliders (two layers of stacking) I would like to try my luck with 6 sliders (3 layers).

Any help would be greatly appreciated!

AllPossible1000.gh (7.3 KB)
AllPossible1000.3dm (6.2 MB)

Hi @ryan.odom

You might want to try anemone. This means that you can loop through a range of possible values and then get a list of true false on whether it will work or not.

1 Like

Here with this code I found 94 sets of parameters that can give you the result.

AllPossible1000 _Re.gh (14.3 KB)

1 Like

And here you can see the different solutions.

AllPossible1000 _Re 2.gh (15.1 KB)

3 Likes