algorithmic modeling for Rhino
It would be great if you could share your experience and bring your brainpower to solve this problem.
I would like to generate all permutations of a collection of numbers.
0, 1, 2
0, 1, 2
0, 2, 1
1, 0, 2
1, 2, 0
2, 0, 1
2, 1, 0
Is it possible to make without coding? Has anyone tried this? If no, I found examples writen on C#, can anyone help to adapt it to grasshopper?
Here you can see examples.
Brute force algorithm. TT Toolbox has this component.
Gracias, Daniel. It is really imazing tool.
Can you tell me permutations can be solved without iterations using brute force algorithm?
Thank you, Mateusz. It is the perfect solution.
Hi Mateusz...does it make sense also with 6 number?
am I going to get all the possible combination?
Yeah, it's a fully scaleable approach, just keep adding more inputs to the CrossRef components.
Do note that the number of permutation is n!, so 6=720, 7=5040, 8=40320, and it just keeps going up faster and faster.
I have a similar issue but with much more inputs. My goal is to ask galapagos to find the best permutation among the set of all possible permutations.
I would like to have a slider with the amount of possible permutations as genome. The problem is that it will not be possible to compute all the possible permutations and then pick one of them with the slider (this would take to long to compute).
I place in attachment a simplified definition to present the problem, but for information my goal is to place elements with fix various lengths in the best location in a geometric model.