Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Randomize list elements and divide them in 3 groups

Good afternoon, gentlemen, hope you are doing well.

Currently, using Lighthouse Studio, version 9.4.

I have a list with 30 elements. First, I want to randomize this list. Then, I would like to split this randomized list in 3 groups. I thought about the following steps:

1) Create a constructed list with the randomized elements
2) Create another constructed list by using the mirror function
3) Split the mirrored list in the three groups.

Is the thinking correct?

Thanks a lot for your time.

Best Regards,

Mauricio.
asked Oct 30 by Mauricio Belleza (430 points)

1 Answer

0 votes
There are certainly multiple ways to do this, but I think the simplest would only require three constructed lists using the Remove instruction to prevent the lists from sharing members.  Each constructed list would require one of these three codes:

Add(list0)
Randomize()
SetListLength(3)


Add(list0)
Remove(list1)
Randomize()
SetListLength(3)


Add(list0)
Remove(list1)
Remove(list2)
Randomize()
SetListLength(3)


"list0", "list1", and "list2" must be replaced by the names of the predefined list, the first constructed list, and the second constructed list, respectively.  The SetListLength command can be updated with however many items you want in each list.
answered Oct 30 by Zachary Platinum Sawtooth Software, Inc. (63,475 points)
...