This example illustrates a method to be used to permit randomization with the constraint that no two consecutive trials present the same condition.
In this example, the conditions are entered as separate Nested List objects. Script is used to randomize the conditions in an array, and check for the criterion of consecutive trials presenting different conditions. When the random order is acceptable, the TrialList is then populated to set
the Nested column, and to run in Fixed order. No two consecutive trials select from the same Nested List object, so the result is that no two consecutive trials are from the same condition.
This example lists the Nested Lists in the TrialList object to 1) include them in the tree structure
where they will be used at run-time, and 2) allow them to be added to the Context. If this is not
done, the user must manually add them to the Context with Add method.