DATEX II Interface methodology
Appropriate subsets of events mostly refer to the SituationPublication category in DATEX II format.
The Optima DATEX II interface calculates the corresponding impact in terms of capacity reduction and the maximum speed on the road edges to which the event applies.
Calculating the impact involves the following steps:
- Determine the Optima links that are affected by the event.
- Determine the event validity period.
- Calculate the coefficient in terms of maximum speed and remaining capacity.
The first two steps are solved by using the information contained in the DATEX II classes:
- GroupOfLocations
- Validity
The step 3 is explained through the next sections.

The impact of an event is quantified by the residual maximum speed, obtained according to the formula:
OriginalSpeed is the original value of the free speed for each element (j) affected by the event, as derived from the reference street dataset.
Δv represents the coefficient of residual speed for each event between 0 (zero speed) and 1 (no speed reduction). It is expressed as a constant and defined according to the scheme contained in the table given in → Default rules.
The term on the right side of the equation is the LinkOriginalSpeed.
It refers to the original value of the minimum traveling speed of each element involved in the event.

The Capacity Remaining Coefficient (CRC) is a value between 0 (null capacity) and 1 (no capacity reduction). It is given by a constant or by a function of DATEX II attributes. When the number of lanes that are present simultaneously is not provided within the event DATEX II message, the coefficient is generated according to the formula:
ℵ(l) is the subset of road elements involved in the event.
NLRi represents the carriageway limitation by the event.
ONL(α) is the number of lanes simultaneously present on each road element involved in the event, as derived from the street index reference.
At the denominator, the LinkOriginalNumOfLanes represents the maximum number of lanes of each road element simultaneously present, as derived from the street index reference.

Each imported event is checked against a set of rules to convert the event to a corresponding effect (impact) in Optima. If at least one impact is evaluated, it is stored in the Optima DB table eimp.
Multiple rules
Any number of rules can be added. Rules are evaluated in the same order as they are given under the <impactRule> node (→ Main configuration of the DATEX II Interface). However, subsequent rules do not overwrite the impact produced by previous rules.
Example: There are 3 rules named A, B, and C.
- Rule A is applied and calculates a speed reduction.
- Rule B is applied and calculates a speed reduction and a capacity reduction.
- Rule C is applied and calculates a capacity reduction.
The resulting impact is A.speed and B.capa. Actually C is not evaluated because SPED and CAPA have already been evaluated.
Conditions
A rule is applied only if all of its conditions have been fulfilled.evaluated as active.
A condition applies to a specific query on the XML representation of the event. The condition looks for a specified node or a specified attribute, or it evaluates a custom XPath query.
Only two 2 types of conditions are available:
- <element> must return an XML node (see → impactRules/rule/conditions/element).
- <attribute> must return an XML attribute (see → impactRules/rule/conditions/attribute).
Functions
The configuration options are the same for both types of conditions.
The <impacts> node contains the functions that are used to calculate the impact of an event.
The functions are evaluated as JavaScript code, so any mathematical function can be used here (see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math).
A global strt object, containing the original traffic values of all the streets that are affected by the event, can be used within the functions.
It contains:
- strt.gren: aggregated value for original green share of all the streets that are affected by the event.
- strt.sped: aggregated value for original speed of all the streets that are affected by the event.
- strt.nlan: aggregated value for original number of lanes of all the streets that are affected by the event.
- strt.capa: aggregated value for original capacity of all the streets that are affected by the event.
The values are aggregated with the rules listed:
- sped is the average weighted by the length of each link.
- nlan is the minimum value.
- gren and capa are the values used in minimum gren*capa product.
For each previously evaluated condition, if its result is a valid number, then it can be used inside the impact function.
The syntax used is: #[attribute name]#
For details, see → impactRules/rule/impacts

The table lists a meaningful set of rules used to evaluate the impact of events. The impact depends by the combination of attributes (<SituationPublication> tag) used to define the nature of an event.
The attributes can be selectables:
- Through TS, in the Event GUI
- Through Traffic Events API
In the table:
-
The attributes are combined in logic AND or in logic OR:
- [Attr1] AND [Attr2]: The impact rule is enabled if both attributes are present in the event definition.
- [Attr1] OR [Attr2]: The impact rule is enabled if at least one attribute is present in the event definition.
-
The first (leftmost) column shows the attributes available in the TS Event GUI that must be selected for defining the event.
Important: In TS GUI, attributes used to enable rules are classified in Dictionaries. A dictionary identifies a specific event type. In the table are generally indicated attributes available for all dictionaries. If an attribute belongs to a specific dictionary, it is associated to the indication: (DictionaryName dictionary).
-
The second column shows the conditions to enable the rules of impact indicated in the third and fourth column.
Important: The table is not an exhaustive collection of ALL applicable impact events rules. Other and different rules can be set, according with specific customizations.
Attributes selectables in TS GUI |
<SituationPublication> condition |
Maximum residual speed [km/h] |
Capacity remaining coefficient |
---|---|---|---|
Capacity remaining |
[capacityRemaining] |
0.80 × LinkOriginalSpeed |
[capacityRemaining] |
Number of lanes restricted Original number of lanes |
[numberOfLanesRestricted] AND |
0.80 × LinkOriginalSpeed |
1 − [numberOfLanesRestricted] / [originalNumberOfLanes] |
Number of operational lanes Original number of lanes |
[numberOfOperationalLanes] AND [originalNumberOfLanes] |
0.80 × LinkOriginalSpeed |
[numberOfOperationalLanes] / [originalNumberOfLanes] |
Number of lanes restricted Original number of lanes Traffic constriction type = "lanes partially obstructed" |
[numberOfLanesRestricted] AND |
0.80 × LinkOriginalSpeed |
1 − 0.5 × [numberOfLanesRestricted] / [originalNumberOfLanes] |
Number of operational lanes Original number of lanes Traffic constriction type = "lanes partially obstructed" |
[numberOfOperationalLanes] AND |
0.80 × LinkOriginalSpeed |
1 − 0.5 × ([originalNumberOfLanes] - [numberOfOperationalLanes]) / [originalNumberOfLanes] |
Number of lanes restricted |
[numberOfLanesRestricted] |
0.80 × LinkOriginalSpeed |
1 − [numberOfLanesRestricted] / LinkOriginalNumOfLanes |
Number of operational lanes |
[numberOfOperationalLanes] |
0.80 × LinkOriginalSpeed |
[numberOfOperationalLanes] / LinkOriginalNumOfLanes |
Number of lanes restricted Traffic constriction type = "lanes partially obstructed" |
[numberOfLanesRestricted] AND |
0.80 × LinkOriginalSpeed |
1 − 0.5 × [numberOfLanesRestricted] / LinkOriginalNumOfLanes |
Original number of lanes Number of operational lanes Traffic constriction type = "lanes partially obstructed" |
[originalNumberOfLanes] AND |
0.80 × LinkOriginalSpeed |
1 − 0.5 ×([originalNumberOfLanes] - [numberOfOperationalLanes]) / LinkOriginalNumOfLanes |
Traffic constriction type = “carriageway blocked” OR “road blocked” |
[trafficConstrictionType] = “carriagewayBlocked” OR “roadBlocked” |
LinkOriginalSpeed |
0 |
Traffic constriction type = “carriageway partially obstructed” OR “road partially obstructed” |
[trafficConstrictionType] = “carriagewayPartiallyObstructed” OR “roadPartiallyObstructed” |
0.80 × LinkOriginalSpeed |
0.5 |
Abnormal traffic type = “stationary traffic” ( Abnormal traffic dictionary) |
[AbnormalTrafficType] = “stationaryTraffic” |
0.1 × LinkOriginalSpeed |
Not applicable. |
Abnormal traffic type = “queuing traffic” ( Abnormal traffic dictionary) |
[AbnormalTrafficType] = “queuingTraffic” |
0.25 × LinkOriginalSpeed |
Not applicable. |
Abnormal traffic type = “slow traffic” ( Abnormal traffic dictionary) |
[AbnormalTrafficType] = “slowTraffic” |
0.60 × LinkOriginalSpeed |
Not applicable.
|
Abnormal traffic type = "heavy traffic” ( Abnormal traffic dictionary) |
[AbnormalTrafficType] = “heavyTraffic” |
0.80 × LinkOriginalSpeed |
Not applicable. |
Temporary speed limit < LinkOriginalSpeed ( Speed management dictionary) |
[temporarySpeedLimit] < LinkOriginalSpeed |
[temporarySpeedLimit] |
Not applicable. |
Road or carriageway or lane management type = “carriageway closures” or “closed permanently for the winter” or “overnight closures” or “road closed”. ( Road or carriageway or lane management type dictionary) |
[roadOrCarriagewayOrLaneManagementType] = “carriagewayClosures” OR “closedPermanentlyForTheWinter” OR “overnightClosures” OR “roadClosed” |
LinkOriginalSpeed |
0 |
Original number of lanes Road or carriageway or lane management type = “narrow lanes. ( Road or carriageway or lane management type dictionary) |
[originalNumberOfLanes] AND |
0.80 × LinkOriginalSpeed |
([originalNumberOfLanes] − 1) / [originalNumberOfLanes] |
Road or carriageway or lane management type = “intermittent short term closures” OR “lane closures” OR “narrow lanes”. ( Road or carriageway or lane management type dictionary) |
[roadOrCarriagewayOrLaneManagementType] = “intermittentShortTermClosures” OR “laneClosures” OR “narrowLanes” |
0.80 × LinkOriginalSpeed |
0.75 |
Road or carriageway or lane management type = “single alternate line traffic”. ( Road or carriageway or lane management type dictionary) |
[roadOrCarriagewayOrLaneManagementType] = “singleAlternateLineTraffic” |
0.50 × LinkOriginalSpeed |
0.50 |