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

The recommended order of operations is:

  1. Finalize activity planning
  2. Run simulation
  3. Declare sequences for simulated activities from previous step
  4. Map activities to sequences
  5. 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.

The figure below lists all sequences declared for the last simulation dataset. To declare a new sequence, simply type the seqID and press "Create".

Aerie UI - Plan Create Sequence
Figure 2: Plan Create Sequence

Assigning seqIDs to Simulated Activities

After the seqIDs are declared they must be associated with the simulated activities. To do so, open the "Selected Activity" panel, and scroll down to the "Sequencing" section as shown on the bottom right corner of the Figure 2 above. 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.

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).