I would like to uniformly generate weights for n different objects. I understand this is the same as sampling from the Dirichlet distribution with alpha = 1 or sampling uniformly from the standard n-simplex which i can do in the same way as covered here: Generate uniformly distributed weights that sum to unity?
If I wanted to add further constraints, such as maximums and minimums for each weight, is there a way I can do this without repeatedly sampling until the values fall within my constraints?