Often, one is not interested in analyzing all agents or all vehicles, but only on a subset, for example only transit or drt vehicles, only passengers of a specific transit line, or some other subset of agents. Via allows to specify so-called ID sets, each containing a list of IDs, that can be used to filter persons, vehicles, or other elements in Via. For this reason, ID sets are sometimes also referred to as “agent groups”.
The list of currently loaded ID Sets is visible when switching to “ID Sets” in the Control section, which can also be invoked by pressing Ctrl+3 (on macOS: Command+3).
At the top, a popup-menu offers several options to create new ID sets, among them the option to create an editable ID sets which is useful if the content of the set needs to be changed repeatedly. Alternative, ID sets can also be loaded from simple text files that contain one ID per line. Such files can also be dragged and dropped onto the ID Sets area, in order to be loaded and added.
Some layers automatically create ID sets when being added to the visualization. The Transit Schedule layer for example adds two ID sets when being loaded: A set containing all transit vehicle IDs, and a set containing all transit driver (agent) IDs.
In addition, some layers or queries provide the option to create ID sets (or agent groups) on the fly. As an example, the Select Link Analysis provides a button to create an ID set containing the vehicles on the selected link.
Via can load a list of IDs as ID Set from simple text files, where each line in the file represents one ID. Such a file can either be dragged and dropped onto the ID Set area, or the file can be selected after choosing
Select Source > Read from File.
If only very few IDs should be managed, or the IDs might change during the work with the data, it’s helpful to create an editable ID Set. Chosing
Select Source > Editable ID Set opens a window, where the name of the ID Set as well as the IDs can be entered. Once the ID Set is created, a click on the small triangle in the ID Sets title bar offers an option to edit the list of IDs again.
Often when working with special persons or vehicles (e.g. a fleet of taxis, or some special persons), these persons/vehicles have distinguishable IDs, e.g. by using a prefix or using a specific number range.
Select Source > Filtered Agents/Vehicles Id Set provides an option to filter the existing person and vehicle IDs with a filter expression containing wildcard characters. This allows filtering prefixed IDs, for example with
taxi_* to match all IDs starting with
taxi_, or with
99??? filtering all IDs consisting of 5 characters that start with
ID Sets can be used in various parts of Via. The following text can only give some examples on where ID Sets can be used. Additional details are available in the documentation of the respective layers or queries.
In many simulations, a special vehicle fleet is of interest. This could be the fleet of transit vehicles, some taxi or DRT services, a fleet of electric cars. In all these cases, the list of vehicle IDs should be loaded as an ID Set (in the case of transit vehciles, such an ID Set is automatically created when loading a Transit Schedule layer with events). Then, a vehicle group can be created based on this ID Set, and the styling set separately for this group. The documentation for the Vehicles layer provides additional details to achieve this.
This is very similar to visualizing a group of vehicles differently, as desribed above, with the major difference being that the ID Set only contains a single ID. The “Editable Id Set” is often best suited for this, as it allows to quickly change the highlighted vehicle.
Imagine you want to know where agents travelling on a specific link perform activities. By doing first a Select Link Analysis, one can create an ID Set containing all passengers IDs that travel on that link (drivers of private cars are also considered as passengers in this case). Next, this ID set could be used to create an agent group in the Agents layer, setting the colors of the default group to fully transparent colors, so that only the specific agents’ activities are visualized. Alternatively, the ID Set can also be used in the Aggregation or OD Aggregation layer to filter the available data sources (e.g. the Activity locations).
The How-To “Activities of Passengers of a Single Transit Line” provides a very similar example in much more detail.