Skip to main content

Sequences

The output of command expansion is not only time-ordered commands per activity, but rather complete sequence products. These sequences can contain commands from multiple activities from a simulation dataset. Users can query these sequences through the Aerie API to get them in the seqJSON format. In order to generate these sequences, Aerie requires sequence ids (seqIDs) to be declared, and mapped to simulated activities. To do so users should first open the "Expansion" panel in the Aerie Planning UI, from any open panel as shown below.

Aerie UI - Plan Expansion Panel
Figure 1: Plan Expansion Panel

Adding Sequences to a Simulation Dataset

There are two ways to create a sequence - from a filter, or directly. Independent of this, the recommended order of operations is:

  1. Finalize activity planning
  2. Run simulation
  3. Optionally, create filters selecting simulated activities
  4. Create sequences for simulated activities (either directly or from the filters from the previous step)
  5. (If sequence made without a filter) Manually map activities to sequences
  6. Run command expansion
caution

Since Aerie expands simulated activities from a simulation dataset, currently we only allow seqIDs to be associated with the simulation dataset. This means that when you re-run a simulation, seqIDs have to be declared again for the new simulation dataset. We are exploring several options to mitigate the rework.

This page will pick up after the third step.

To create a filter, select the following:

Aerie UI - Sequence Filter Creation
Figure 2: Sequence Filter Creation

name it, and then select all relevant options to narrow down the set of simulated activities that you would like to associate with the sequence you will be creating.

Aerie UI - Sequence Filter Options
Figure 3: Sequence Filter Options

From here, mouse over the filter, click the play icon, and then select the dates you want the sequence to apply over and then you will create a sequence from this filter.

Aerie UI - Create a Sequence from a Sequence Filter
Figure 4: Create a Sequence from a Sequence Filter

The created sequence will bear an ID of "{filter name} Sequence". Alternatively, you can directly create a sequence by selecting Sequence instead in the New button field. The name of this sequence is its ID.

Manually assigning Simulated Activities to Sequences

Simulated activities can be manually assigned to sequences if a filter isn't used, or if associations with a sequence created from a filter need to be tweaked manually.

To do so, open the "Selected Activity" panel, and scroll down to the "Sequencing" section as shown on the bottom right corner of Figure 5 below. Clicking on the Sequence ID input field lists all of the declared sequence IDs and allows the user to choose one. Note that this association is the mechanism for mapping expansion output of multiple activities to the same sequence output.

Aerie UI - Assign a Simulated Activity to a Sequence
Figure 5: Assign a Simulated Activity to a Sequence
note

Aerie recommends automating the seqID declaration and seqID-activity association steps using Aerie API, such that the information can be recreated automatically after every simulation run.

Command Sorting

As of Aerie v1.5.0, during expansion if more than one activity targets a single sequence then the commands are sorted time-ascending if all commands use either absolute or relative time tags, and the first command for each activity uses an absolute time tag. Otherwise none of the commands are sorted. If the commands are sorted then all time tags are converted to absolute time.

Additionally a timeSorted boolean property has been added to the expanded sequence metadata indicating if the commands have been sorted (true for sorted, false otherwise).