Relations with conditions
What are relations with conditions?
You can use this function to restrict relations that refer to several objects without explicitly using a filter for them. The relation only refers to the objects that fulfill a predefined condition.
The following list of use cases shows evaluations that you can perform using relations with conditions:
- Volumes at nodes of straight turns only
- Number of incoming lanes of a particular link type
- Shares of bus and train in PuT links for distance and travel time
- Shares of PrT paths by road category
- First or last PuT path leg of a PuT path on which the passenger, for example, has traveled by intercity traffic.
How are relations with conditions defined?
Relations with conditions can only be defined in the formula editor. The syntax of the condition must be entered manually and correctly, since no special input support is offered via the buttons.
To use it in your model, you create a user-defined attribute with a corresponding formula, which you can display in the respective list. Alternatively, you can define variables whose values you can view in the Procedure variables: Values list.
The following table shows some examples:
Evaluation |
Network object of the UDA or variable |
Formula |
Share of the bus route in the PuT path (without connector) in % |
PuT paths |
[SUM:PUTPATHLEGS([PUTTSYS\CODE] = "Bus")\DIST]*100/[RIDEDIST] |
Number of the first path leg of a path with intercity traffic |
PuT paths |
[FIRST:PUTPATHLEGS([PUTTSYS\CODE] = "ICE")\PATHLEGINDEX] |
Departure of the first path leg of a path with intercity traffic |
PuT paths |
[FIRST:PUTPATHLEGS([PUTTSYS\CODE] = "ICE")\DEP] |
Sum of trips in the network with mode C |
Variable |
[SUM:MATRICES([MODECODE]="C")\SUM] |
Maximum number of lanes of an incoming link with type 20 at the node |
Nodes |
[MAX:INLINKS([TYPENO] = 20)\NUMLANES] |
Sum of all straight turns at the node |
Nodes |
[SUM:TURNS([TYPENO]=2)\VOLVEHPRT(AP)] |
The condition is entered in round brackets after the aggregate function. The attribute of the network object to which the relation leads is enclosed in square brackets.