DESCRIPTION
This user object component takes a list of objects and randomly distributes them into a user specified number of sets. The resultant item count per each set will be equal if the total items is a modulus of the specified set count, or will max the floor total required then add an additional item onto randomly selected sets till the remainder is satisfied.
INPUTS / OUTPUTS
SIDE DATA TYPE STRUCTURE VARIABLE DESCRIPTION
INPUT Object List L A list of objects to be randomly distributed
INPUT Integer Item N The total number of sets for random distribution
INPUT Integer Item S The seed value for the random function
INPUT Integer Item X An optional cap for the number of runs to try before failing if an impossible or improbable scenario is provided
OUTPUT Integer List A The indices of the random selection for the total number of sets
OUTPUT Object Datatree B A datatree of the list objects distributed to branches matching the set indices
OUTPUT String Item R Notification if the run limit was hit before the goal was achieved
DOWNLOADS
gha | Download User Objects
gh | Download Grasshopper Sample Files

 

MINIMUM REQUIREMENTS
Platform | Rhino 5, Grasshopper
Version | Grasshopper 0.9.0075
Type | Visual Basic Component