How to generate random sets with different numbers in each set

So I want to generate a set with random numbers in each set, but for each set the numbers are all the same, is there a different randomization function I should use? or should I just generate a bunch of different sets and combine them into one?

as you can see, 0 is always -.07, 1 is always .22753, Etc…

Use a second Random component to generate seed values (0 to 300) for each branch.

Thanks man! worked like a charm

I can’t be sure from the screen shot alone but that looks wrong…

haha its working for the purposes that I need it for, I disconnected the first random from the Cset and it works perfectly

1 Like

Does understanding it matter? The second image you posted doesn’t follow my suggestion at all.

Yeah I did, but I need a specific number for the list length going into the N, so I can’t follow it exactly

:man_facepalming:

Hi, Is it possible to add up all the numbers from the first set and then the numbers from the second set, etc.? What I want to create is a list with how many people can live in a building. So Grasshopper may choose between 15 to 20 families in a buidling and each family can exist between 1 to 6 people. Eventually, I want to know how many people are living in the building in total. And the sets are different buildings. I made already the first steps with your script.

Are you familiar with the Mass Addition component? Where’s your code?


random_2023Jan11a.gh (8.9 KB)

1 Like


I used mass Addition indeed, but the problem with that is that it generates 1750 numbers, instead of the 23 sets it made. I solved it, by very “stupidly” splitting the list.

I can’t do anything with only a screen image of your code. So I’m done here, good luck.