Gets or sets the maximum number of times a given value can be consecutively selected by a list.
<list>
list.name.maxRunSize
Read Only
integer
The maxRunSize attribute places a constraint on random selection to ensure that a given item isn't selected multiple times in a row. If set to 1, for example, maxRunSize ensures that no value is selected twice or more in a row. A value of 2 would prevent runs of 3 or greater. By default, runs of any size are permitted. This attribute can only be specified if selectionmode is set to 'random'.
Random selection is done on the fly, so if multiple selection constraints such as not or replace are in place, it may not be possible to satisfy them all on a give trial, especially if there are only a few remaining items in the selection pool. In that case, the list will suspend one of the constraints and try again. If it still can not satisfy the remaining constraints, it suspends another and tries again, and so forth. By default, the maxRunSize constraint is suspended first, then replace, and finally the not constraints. If a procedure requires that the constraints always be satisfied, pregenerate a set of selection sequences that satisfy the constraints and then randomly select one of the pregenerated sequences to use for a given session.
The following sets maxRunSize to 1 on a list:
<trial example>
/ onTrialBegin = {list.primenumbers.maxRunSize = true;}
</trial>