Impedance options - ObjectVision/GeoDMS GitHub Wiki
Network functions Impedance options
The options parameter indicates how to calculate routes, which additional arguments are given, and which results will be produced. Each section is separated by a ';', starts with a label and indicates comma-separated extra arguments between '(' and ')'. Optional results are specified by name after a ':'. All sections, extra arguments and products must be specified in the order of the following description. All labels and names are case-sensitive, and no intermediate spaces are allowed.
The first section is obligatory and indicates the allowed traversal direction of each link (directed versus undirected graphs).
It can be:
- directed: only routes from a start point to an endpoint that traverses each link forward from node f1 to node f2 are considered and not vice versa.
- bidirectional: also, backward traversal is considered through each link, from node f2 to node f1.
- bidirectional(link_flag): indicates an additional argument Link → Bool, a boolean attribute of Link, that indicates for each link if it is to be considered as bidirectional. False indicates forward traversal only.
The optional startPoint(Node_rel,impedance,OrgZone_rel,OrgZone_loc):max_imp specifies a set of origin zones.
options:
-
the Node_rel, optional for impedance_matrix and impedance_matrix_od64, indicates the presence of an additional argument: startPoint → Node, a Node attribute of startPoint in order to select a subset of nodes as startPoints. Required for the impedance_table function. Default: when omitted with the impedance_matrix function, all Nodes are considered as startPoints and startPoint := Node.
-
the optional impedance indicates the presence of an additional argument: startPoint → Impedance, as departure impedance attribute of startPoint, useful mainly when origin zones contain multiple startPoints with specific departure impedances. Default value when omitted: zero.
-
the OrgZone_rel, optional for impedance_matrix and not allowed for impedance_table, indicates the presence of an additional argument: startPoint → OrgZone, an origin zone attribute of startPoint, in order to define multiple startPoints per origin zone. The default for the impedance_matrix function when omitted: all startPoints are considered as separate origin zones. This option is not allowed with the impedance_table, where all startPoints are assumed to belong to the same origin zone.
-
the OrgZone_loc is only allowed and required in combination with the euclid(maxSqrDist) option and indicates the presence of an additional argument: OrgZone → SPoint, indicating the location of each OrgZone for which the Euclidean distance to DstZones is calculated in order to filter out od-pairs that have a squared Euclidian distance of more than maxSqrDist.
-
the optional max_imp, indicates the production of a subitem OrgZone → Imp, an Imp attribute of OrgZone, named MaxImp that contains the maximum impedance for each OrgZone for all connected DstZones. This is especially useful in combination with the limit(OrgZone_max_mass,DstZone_mass) option with which one can produce the distance to the n-th unit of a DstZone specific quantity. When all Nodes are considered as separate OrgZones, one can specify startPoints:max_imp. This option is available in GeoDMS 7.168 and later versions.
-
when no additional arguments are indicated, this section should be omitted; startPoint() is a non-allowed syntax.
-
when no startPoints are specified (not allowed with impedance_table), all Nodes are considered as separate origin zones.
The optional endPoint(Node_rel,impedance,DstZone_rel, DstZone_loc) specifies a set of destination zones.
options:
-
the optional Node_rel indicates the presence of an additional argument endPoint → Node, a Node attribute of endPoint in order to select a subset of nodes as endPoints. Default: all Nodes are considered as separate endPoints
-
the optional impedance indicates the presence of an additional argument endPoint → MeasureType, an arrival impedance attribute of endPoint, useful mainly for when Destination Zones contain multiple endPoints.
-
the optional DstZone_rel indicates the presence of an additional argument endPoint → DstZone, a destination zone per endPoint, in order to define multiple endPoints per DstZone. Default: each endPoint is considered as a separate destination.
-
the DstZone_loc is only allowed and required in combination with the euclid(maxSqrDist) option and indicates the presence of an additional argument: DstZone → SPoint, indicating the location of each DstZone for which the Euclidean distance from each OrgZone is calculated in order to filter out od-pairs that have a squared Euclidian distance of more than maxSqrDist.
-
when no additional arguments are indicated, this section should be omitted; endPoint() is a non-allowed syntax.
-
when no endPoints are specified, all Nodes are considered as separate destination zones.
Optional filters can be applied to limit the resulting set.
options:
-
The optional cut(OrgZone_max_imp) specifies that a maximum route impedance will limit the route search, which requires an additional argument: OrgZone → Impedance, an impedance attribute of the origin zones or a single impedance limit parameter that is applied for all origin zones.
-
The optional limit(OrgZone_max_mass,DstZone_mass) specifies that a maximum amount of destinations per origin zone will limit the route development, which requires two additional arguments:
-
OrgZone → Mass or {∅} → Mass (must have the same value type as Impedance), a Mass attribute of OrgZone or a single Mass parameter, that sets a maximum on the amount of Mass to be reached at the DstZones.
-
DstZone → Mass or {∅} → Mass (must have the same value type as Impedance), a Mass attribute of DstZone or a single Mass parameter, that indicates a Mass for each DstZone, which is accumulated until the limit is reached for each OrgZone.
-
The optional euclid(maxSqrDist) specifies the maximum Euclidean search distance for destinations. The specified parameter is the maximum squared distance for an od-pair to be admittable. This option requires startPoint(OrgZone_loc) and endPoint(DstZone_loc).
Since GeoDMS 20.23.1 the squared distance between the OrgZone_loc and DstZone_loc of a pair is exact while it fits in 32 bits. The difference of the SPoint locations was taken in 16 bits, and wrapped for locations more than 32767 apart, so such a far pair was not pruned; results of such configurations may change.
The optional alternative(link_imp, link_attr):alt_imp,link_attr specifies that an alternative link impedance is to be used to calculate an impedance per od-pair for further use in the interaction potential calculation and/or an alternative link_attr to be used as
options:
- the optional link_imp requires an additional argument: Links → Impedance2, an alternative impedance per link, where Impedance2 must have the same value type as the original impedance, but may have a different metric.
- the optional link_attr requires an additional argument: Links → Impedance3, an alternative impedance per link, where Impedance3 must have the same value type as the original impedance, but may have a different metric.
- the optional product alt_imp indicates the production of an Impedance2 attribute of the resulting od-pair entity named alt_imp with the total alternative impedance of the found route for each od-pair.
- the optional product link_attr indicates the production of an Impedance3 attribute of the resulting od-pair entity named link_attr with the total
$e_l$ of the found route for each od-pair. - when this section is omitted, the original Impedance is used in the interaction calculation and the unit Impedance2 is set to be equal to Impedance.
- when no filtering applies, some od-pairs may represent combinations without connecting routes. The impedance is MAX_VALUE there but the alt_imp is null there. Both values will not be taken into account in an interaction distribution.
- by itself, this section does not influence which routes are found: routes are chosen on the original Impedance alone, and the alternative impedance is only accumulated along those routes. The pareto section below makes the alternative impedance a second search criterion instead.
The optional pareto, pareto(OrgZone_max_imp2), pareto(imp2_epsilon) or pareto(OrgZone_max_imp2,imp2_epsilon) switches the route search to a bi-criteria (Pareto) mode: the original Impedance and the alternative link impedance are BOTH search criteria, and a partial route is only discarded when another route is at least as good in both criteria (and better in one). The result holds one row per Pareto-optimal route, so per (OrgZone, DstZone) combination there can be several rows: each row is a route, identified by the tuple (OrgZone, DstZone, impedance, alt_imp). This answers questions a single-criterion search cannot, such as finding the cheapest route within a maximum travel time when the fastest and the cheapest route differ: a single-criterion search on time discards a fast-but-expensive route section even when it is the only way to stay within the time budget, whereas the pareto mode keeps it until it is genuinely worse in both time and cost. This option is available in GeoDMS 20.18 and later versions.
options:
- the optional OrgZone_max_imp2 indicates the presence of an additional argument: OrgZone → Impedance2, which can also be a single value (void), bounding the second criterion per origin zone: routes whose alternative impedance reaches this bound are discarded. Analogous to cut(OrgZone_max_imp), which bounds the first criterion.
- the optional imp2_epsilon (since GeoDMS 20.23.1) indicates a further argument, after OrgZone_max_imp2 when both are given: OrgZone → fraction, which can also be a single value (void), the relative tolerance of the second criterion for epsilon-dominance. Routes are found in the order of the first criterion, the fastest first; a slower partial route is then only kept when its alternative impedance lies more than that fraction below that of the cheapest route already kept at the node,
alt_imp < (1 - imp2_epsilon) * kept; the same test applies per destination zone to the result rows. With 0.01 a slower route must be more than 1% cheaper to stay.- there are no buckets: whether a route stays depends only on how much cheaper it is than the routes kept before it, not on where a bucket edge falls. A node keeps at most about log(max / min) / -log(1 - imp2_epsilon) routes, whatever the resolution of the link costs.
- without OrgZone_max_imp2 the test applies at every node and per destination zone, and the result approximates the exact front: every exactly Pareto-optimal route has a kept route at its node that is no slower and at most a factor 1 / (1 - imp2_epsilon) more expensive, but along a route these factors can compound. The first row per (OrgZone, DstZone) still carries the minimum impedance, as without imp2_epsilon.
- with OrgZone_max_imp2 (since 20.23.1) the test applies per destination zone only, and the search itself is exact: at a node a partial route that is at most imp2_epsilon cheaper can be the only one that stays within the bound on the second criterion, and pruning it there would lose routes that are feasible. The result per (OrgZone, DstZone) is then exactly the exact front thinned by the rule above, with no compounding, at the cost of an exact search. Measured on a car front searched on (distance, travel time) with the travel time bounded at 90 minutes: with the test at the nodes the cheapest route within the bound was longer than the exact one for 13.6% of the pairs and 1.8% of the pairs were not reached; per zone only, the cheapest route is exact and the fastest route kept is at most 1% slower than the fastest one, with 6.3 instead of 22.6 routes per pair and a search four times as long as with the test at the nodes.
- the argument is a dimensionless fraction from 0 to 1, a float32 or a float64 whatever the type of the impedances, also when they are integers; it is not unified with the unit of the alternative impedance. 0 is the exact search, and 1 keeps only the best route on the first criterion per node and zone. An argument with a metric, or above 1, is refused: the interim builds 20.21.0 to 20.22.0, and builds of 20.22.1 from before 5 October 2026, took it as a bucket width in the unit of the second criterion,
floor(alt_imp / imp2_epsilon), such as0.10[Euro], and a configuration written for those builds now stops with a message instead of having its width read as a fraction. - use it when quantising the alternative link impedance is not enough to keep the fronts small. The table function pareto_optimal_eps applies the same rule afterwards to any table, with a relative tolerance per criterion.
- this section requires the od result form (impedance_matrix or impedance_matrix_od64; not impedance_table), the alternative(link_imp) argument as the second criterion, and cut(OrgZone_max_imp): a bound on the first criterion is what keeps the set of Pareto-optimal routes bounded.
- the produced od-pair entity holds the Pareto-optimal routes per OrgZone, ordered per OrgZone by increasing impedance and, within one DstZone, decreasing alt_imp. The FIRST row per (OrgZone, DstZone) carries the same impedance as a run without the pareto section: the minimum-impedance route is always part of the front.
- the od-pair products keep their meaning, now per route: impedance and alt_imp are the two criteria of the row's route, and OrgZone_rel, DstZone_rel, StartPoint_rel and EndPoint_rel are attributes of that route -- which zones it connects and which startPoint and endPoint it used. LinkSet is not (yet) supported in this mode, and neither are the interaction section, limit(OrgZone_max_mass,DstZone_mass), alternative(link_attr) and precalculated_NrDstZones. The euclid(maxSqrDist) filter, bidirectional variants and startPoint/endPoint impedances (which apply to the first criterion) combine normally.
- in this mode the alternative link impedances and the startPoint/endPoint impedances must be nonnegative, like the original Impedance: they now drive the route selection.
- after the search: when the rows of several searches or of other modes are put together per (OrgZone, DstZone) combination, pareto_optimal reduces such a union to its front again, with the same dominance rule as the search, and pareto_optimal_eps to a thinned front (since 20.23.1).
- performance: without imp2_epsilon the number of Pareto-optimal routes per node is bounded by the number of DISTINCT alternative-impedance totals below the OrgZone_max_imp2 bound. Supply the alternative impedance in coarse units (for instance integer cents or tenths of euros rather than fractional euros) to keep the fronts, and thereby computation time and result size, small; the cut on the first criterion and OrgZone_max_imp2 are the other two controls, and the calculation remains exact for the impedances as given. When lumpy link costs still produce long fronts of routes that differ only a few cents and seconds, imp2_epsilon bounds the front directly at the price of the approximation described above.
Example: the cheapest-within-the-time-budget question for car trips, with the cost per link as the second criterion and a front resolution of 1%.
unit<uint64> od := impedance_matrix_od64(
'bidirectional;startPoint(Node_rel,OrgZone_rel);endPoint(Node_rel,DstZone_rel)'
';cut(OrgZone_max_imp);alternative(link_imp):alt_imp;pareto(imp2_epsilon)'
';od:impedance,OrgZone_rel,DstZone_rel'
, Link/traveltime // Link → Impedance, the first criterion
, Link/F1, Link/F2 // Link → Node
, StartPoint/Node_rel, StartPoint/OrgZone_rel
, EndPoint/Node_rel, EndPoint/DstZone_rel
, 90[min_f] // cut(OrgZone_max_imp): the time budget
, Link/cost // alternative(link_imp): Link → Euro, the second criterion
, 0.01f // pareto(imp2_epsilon): a slower route must be more than 1% cheaper
)
{
attribute<min_f> impedance; // travel time of the row's route
attribute<Euro> alt_imp; // cost of the row's route
attribute<OrgZone> OrgZone_rel;
attribute<DstZone> DstZone_rel;
}
Per (OrgZone, DstZone) the first row is the fastest route and each next row is slower and more than 1% cheaper than the row before it.
Since GeoDMS 20.24.0 the optional timedependent(link_profile_rel,profile_slot_factor,slot_duration,departure_time) makes the impedance of a link depend on the time at which a route enters it: the departure time plus the impedance of the route up to the start of the link. The Impedance argument is then the impedance at free flow, and a link with a profile is ridden at a speed relative to free flow that changes per time slot, as speed profiles such as those of TomTom give per road element and direction: one relative speed per 5 minutes of a day. A trip that reaches a busy road at 08:10 then rides it at the speed of 08:10, not at that of its departure.
options:
- the section requires four additional arguments, in this order:
- link_profile_rel: Links → Profile, the profile of each link, a row in the profile table. Profile is a unit of uint8, uint16 or uint32 with a range that starts at 0. A link without a profile (null) keeps its Impedance whatever the time.
- profile_slot_factor: ProfileSlot → factor, per profile and time slot the speed relative to free flow: 1 is free flow, 0.5 half that speed. A float32 or float64 without a metric, positive, also when the impedances are integers. ProfileSlot holds one element per profile and time slot, profile by profile, the order of combine(Profile, TimeSlot); the number of time slots follows from its count, which must be a multiple of the number of profiles.
- slot_duration: a parameter, the duration of a time slot in the unit of the Impedance, such as 300[s] for slots of 5 minutes.
- departure_time: OrgZone → Impedance or a single parameter, the time of departure in the unit of the Impedance, counted from the start of the first time slot. Not negative.
- the time on a link is an integral over the time slots, not the speed of the slot of entry for the whole link: a route that enters a link of 10 minutes at free flow 2 minutes before a slot of half the speed covers 2 minutes of it at free flow and the remaining 8 at half the speed, 18 minutes in all. So a route that enters a link later never leaves it earlier, and the search stays exact for the earliest arrival. With the speed of the slot of entry for the whole link, a route entering just before the end of a slow slot would leave the link later than one entering just after it, and a route could gain by waiting.
- the profiles repeat, as a daily profile does: a route that is still underway after the last time slot continues in the first.
- the alternative impedance, link attribute, interaction products, LinkSet, Link_flow and the traceback are those of the routes found with the time-dependent impedances. cut(OrgZone_max_imp) and the impedance of the od-pairs are travel times: arrival minus departure.
- with the pareto section the time-dependent impedance is the first criterion; the alternative impedance, the second criterion, does not depend on the time. The search stays exact, as a route that arrives at a node no later and no more expensive than another also stays so on every extension.
- timedependent_alt(link_profile_rel,profile_slot_factor,slot_duration,departure_time), with the same four arguments in the same place, applies the profiles to the alternative link impedance instead: the second criterion of the pareto section, which it requires. A search on distance first, with the distance as Impedance and the travel time at factor 1 as alternative(link_imp), then finds the shortest route exactly and keeps the faster routes with time-dependent travel times; alt_imp is that travel time, pareto(OrgZone_max_imp2) bounds it and imp2_epsilon applies to it. slot_duration and departure_time are then in the unit of the alternative impedance. The two sections cannot be combined.
- with integer impedances the time on a link is rounded to a whole unit.
- a profile with one factor throughout gives exactly the Impedance divided by that factor, so profiles of 1 everywhere give the same result as a run without this section.
- bidirectional links ride the same profile in both directions; give each direction its own link and profile when they differ.
- impedance_table accepts the section as well, with departure_time as a parameter.
- cost: one search per departure time, as before, with per link that a route enters one look-up of its time slot and factor. The factors are read as they are given, without a copy, so a profile per link costs the memory of the factor table itself: 4 bytes per profile and time slot in float32.
Example: car trips departing at 07:45, with TomTom speed profiles per road element and direction.
unit<uint32> Profile; // a profile per region and profile id of the day
unit<uint32> TimeSlot : nrofrows = 288; // 5 minutes
unit<uint32> ProfileSlot := combine(Profile, TimeSlot)
{
attribute<float32> rel_speed := ...; // the speed relative to free flow, 1 = free flow
}
unit<uint32> od := impedance_matrix(
'directed;startPoint(Node_rel);endPoint(Node_rel)'
';cut(OrgZone_max_imp)'
';timedependent(link_profile_rel,profile_slot_factor,slot_duration,departure_time)'
';od:impedance,OrgZone_rel,DstZone_rel'
, Link/freeflow_time // Link → s, the impedance at free flow
, Link/F1, Link/F2 // Link → Node
, StartPoint/Node_rel, EndPoint/Node_rel
, 5400[s] // cut(OrgZone_max_imp): 90 minutes
, Link/Profile_rel // link_profile_rel: Link → Profile, null without one
, ProfileSlot/rel_speed // profile_slot_factor
, 300[s] // slot_duration
, 27900[s] // departure_time: 07:45
);
The impedance per od-pair is the travel time of a departure at 07:45 through the traffic that the route meets on its way.
The optional interaction(OrgZone_min,DstZone_min,v_i,w_j,dist_decay,dist_logit(alpha,beta,gamma),OrgZone_alpha):NrDstZones,D_i,M_ix,SumImp,SumLinkAttr,C_j,M_xj,Link_flow indicates the application of a free or origin constrained interaction model following the thoughts and notation of Alonso's General Theory of Movement (GTM) with a fixed supply elasticity per destination of 1 (thus βj = 1.0; no constraint on the destination side). Based on De Vries, Nijkamp & Rietveld (2000).
theory:
This describes the theory of a free or origin-constrained interaction model following the thoughts and notation of Alonso's General Theory of Movement (GTM) with a fixed supply elasticity per destination of 1 (thus
For the wider theory, from the gravity model through Wilson's family of constrained models to the GTM, see Spatial Interaction Models in the Accessibility Modelling wiki. In Wilson's terms,
$M_{ij} = v_i \cdot w_j \cdot t_{ij} \cdot D_i^{α-1}$
in which:
-
$M_{ij}$ = potential interaction between i and j -
$v_i$ = trip generation weight per origin -
$w_j$ = trip distribution weight per destination -
$t_{ij}$ = facility of movement between i and j-
$t_{ij} = d_{ij}^{-γ}$ , in case of a normal distance decay specification. -
$t_{ij} = (1+exp(alpha)⋅d_{ij}^{beta}⋅exp(d_{ij})^{gamma})^{−1}$ , in case of a log-logistic distance decay specification.
-
-
$d_{ij}$ = impedance (e.g. distance or travel time) from i to j -
$γ$ = distance decay factor, and in the case of the log-logistic specification there are the$alpha$ ,$beta$ , and$gamma$ parameters.
Summations:
$D_i := \sum\limits_{j} w_j \cdot t_{ij}$ -
$M_{ix} := \sum\limits_{j} M_{ij} = \sum\limits_{j} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{α-1} = v_i \cdot \sum\limits_{j} w_j \cdot t_{ij} \cdot D_i^{α-1} = v_i \cdot D_i \cdot D_i^{α-1} = v_i \cdot D_i^α$ = summation of decayed impedances from origin$i$ . $SumImp_i := \sum\limits_{j} d_{ij} \cdot M_{ij}$ -
$SumLinkAttr_i := \sum\limits_{j} e_{ij} \cdot M_{ij}$ with$e_{ij}$ an aggregation of$e_l$ over each route$i \rightarrow j$ .$e_l$ must be provided as alternative(link_attr). $C_j := \sum\limits_{i} v_i \cdot t_{ij} \cdot D_i^{α-1}$ -
$M_{xj} := \sum\limits_{i} M_{ij} = \sum\limits_{i} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{α-1} = w_j \cdot C_j$ = summation of decayed impedances to destination$j$ . -
$LF_l := \sum\limits_{i,j: l \in (i \rightarrow j)} M_{ij} = \sum\limits_{i,j: l \in (i \rightarrow j)} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{α-1}$ = link flow over link$l$ .
options:
-
Note that if alt_imp is defined, the impedance within the interaction is the alt_imp. The first impedance is used for route decisions, while the alt impedance will be used to aggregate the interaction calculations.
-
the optional OrgZone_min indicates an additional argument:
$OrgZone → Impedance2$ , which can also be a single value (void), indicating a minimum (alternative) impedance to be used for each destination to avoid infinite auto interaction potential for each origin. The default value is 0. -
the optional DstZone_min indicates an additional argument:
$DstZone → Impedance2$ , which can also be a single value, indicating a minimum (alternative) impedance to be used for each origin to avoid infinite auto interaction potential for each destination. The default value is 0. -
From this we define the distance measure to be
$d_{ij} := max(impedance_{ij}, OrgZone min_i, DstZone min_j)$ . -
the obligatory v_i indicates an additional argument:
$OrgZone → Mass$ , which can also be a single value, indicating a trip generation weight per origin, aka$v_i$ . The value type should match the value type of the impedance. -
the obligatory w_j indicates an additional argument:
$DstZone → Mass$ , which can also be a single value, indicating a trip distribution weight per destination, aka$w_j$ . The value type should match the value type of the impedance. -
the optional dist_decay indicates an additional argument
$gamma$ : Float64 that indicates the rate of distance decay. The used interaction potential$t_{ij}$ is calculated as$t_{ij} := d_{ij}^{−gamma}$ .-
$gamma = 1.0$ thus indicates$t_{ij} = 1/d_{ij}$ - If no route exists from i to j (which can be visible in the results when no filtering was applied),
$t_{ij}$ is set to 0. -
$gamma = 0.0$ indicates$t_{ij} = 1$ , even when$d_{ij} ≤ 0$ , except when no route exists. -
$gamma = − 1.0$ indicates$t_{ij} = d_{ij}$ - when
$d_{ij} ≤ 0$ and gamma ≠ 0.0,$t_{ij}$ is set to zero to avoid incorporating infinite potentials when no minimum impedances nor departure or arrival impedances were specified. Auto-interaction is then excluded but included when gamma = 0.0.
-
-
the optional dist_logit(alpha,beta,gamma) indicates three additional arguments that can be used to alternatively define
$t_{ij}$ as a log-logistic distance decay function of$d_{ij}$ :$t_{ij} := (1+exp(alpha+beta⋅ln(d_{ij})+gamma⋅d_{ij}))^{−1} = (1+exp(alpha)⋅d_{ij}^{beta}⋅exp(d_{ij})^{gamma})^{−1}$ - The value type of all parameters should be float64.
- note that either
$dist_decay$ or$dist_logit(alpha,beta,gamma)$ must be specified in an interaction section. - note that we name the parameters in Latin characters instead of Greek characters. Since this alternative definition of
$t_{ij}$ uses the same parameter names as in the other interaction definitions. So, to avoid confusion, we use the Latin characters for the distance decay parameters.
-
the optional OrgZone_alpha indicates an additional argument:
$OrgZone −> Float64$ , which can also be a single value, indicating the elasticity of the origin's supply for the number of demand alternatives.$α = 1.0$ indicates an elastic model;$α = 0.0$ indicates a push model with fixed supply$v_i$ per origin. The default value is 0.
Calculated products (at least one should be specified):
- the optional NrDstZones, indicates the production of a subitem OrgZone → UInt32, an attribute representing the number of reachable destination zones for each origin zone.
- the optional D_i, indicates the production of a subitem OrgZone → Mass, a Mass attribute of OrgZone, named D_i, defined as
$D_i:= \sum\limits_{j} w_j \cdot t_{ij}$ . - the optional M_ix, indicates the production of a subitem OrgZone → Mass, a Mass attribute of OrgZone, named M_ix, defined as
$M_{ix} := v_i \cdot D_i^α = \sum\limits_{j} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{(α-1)}$ - Note that when
$D_i = 0$ ,$D_i^α$ and$M_{ix}$ are assumed to be zero, even if$α = 0$ , in order to respect the fact that if there is no demand potential at all, it cannot be raised to a set demand whatever the elasticity.
- Note that when
- the optional SumImp, indicates the production of a subitem, called OrgZone_SumImp, representing
$SumImp_i$ - the optional SumLinkAttr, indicates the production of a subitem, called OrgZone_SumLinkAttr, representing
$SumLinkAttr_i$ - the optional C_j, indicates the production of a subitem DstZone → Mass, a Mass attribute of DstZone, named C_j, defined as
$C_j := \sum\limits_{i} v_i \cdot t_{ij} \cdot D_i^{(α-1)}$ . - the optional M_xj, indicates the production of a subitem DstZone → Mass, a Mass attribute of DstZone, named M_xj, defined as
$M_{xj}:= w_j \cdot C_j = \sum\limits_{i} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{(α-1)}$ . - the optional Link_flow, indicates the production of a traffic flow network assignment, a subitem Link → Mass, a Mass attribute of Link, named Link_flow, defined as
$LF_l := \sum\limits_{i,j: l \in (i \rightarrow j)} v_i \cdot w_j \cdot t_{ij} \cdot D_i^{(α-1)}$ .
Since GeoDMS 20.23.1 the interaction products are also correct for zones with several start points or end points. Results calculated with an older version in the following cases were wrong and have to be recalculated:
- Link_flow of an origin zone with several startPoints, when one of them is reached through another or two of them lie on the same node: the flows of that zone were counted more than once.
- Link_flow with endPoint(Node_rel,DstZone_rel) and several endPoints in one destination zone: the flows to that zone were multiplied by its number of endPoints, or taken from an earlier origin zone.
- every interaction product, and the maximum impedance per origin zone of startPoint(...):max_imp, with an arrival impedance in endPoint(...,impedance,DstZone_rel), whenever endPoints and destination zones are numbered differently: an endPoint was given the arrival impedance of another endPoint, or a value read beyond the end of that argument.
Since GeoDMS 20.23.1 Link_flow can also be produced without v_i, each origin zone then weighing 1, as for the other interaction products; before, that stopped the application with an access violation. And startPoint(Node_rel,OrgZone_loc) with the euclid filter is refused for impedance_table, which has no origin zones, with a message instead of an access violation.
Since GeoDMS 20.23.1 NrDstZones counts the destination zones that an origin zone reaches, also without cut or limit. Without them every destination zone has a row among the od-pairs, and OrgZone_NrDstZones was that number of rows, the number of destination zones, for every origin zone, reached or not; results calculated with an older version without cut or limit have to be recalculated. Its values unit is now a count unit, UInt32, instead of the destination zone unit, in whose range the count of an origin zone that reaches every destination zone did not lie: an attribute that takes it over with the destination zone unit as its values unit has to be declared as uint32.
options:
- The optional node:TraceBack (only available for impedance_table) produces a subitem TraceBack : Node → Link, a Link attribute of Node, indicating for each node which Link of the grown tree(s) traces back to the origin of startPoint Node(s). For the impedance_matrix and impedance_matrix_od64 functions, producing this info is complicated by the fact that a traceback would be available for each origin.
the optional od(precalculated_NrDstZones):impedance,OrgZone_rel,DstZone_rel,StartPoint_rel,EndPoint_rel,LinkSet, indicates the production of a specific kind of od-pair entity and related attributes.
Routes are per (OrgZone, DstZone) combination: without the pareto section each found combination owns one row holding its least-impedance route, with the pareto section each Pareto-optimal route owns a row, so several rows per combination can occur and a row is identified by the tuple (OrgZone, DstZone, impedance, alt_imp). In both cases the attributes below are attributes of the row's route: which zones it connects, its impedance(s), and which startPoint and endPoint it used.
options:
-
the optional precalculated_NrDstZones indicates the usage of an earlier calculated number of destination zones per origin zone to avoid (repeated) counting of the number of OD-pairs. This precalculation will determine the resulting domain range. If, for each origin zone, the number of destination zones is less than or equal to the precalculated number, the remaining rows will remain undefined. If, for some origin zones, the number of destination zones is greater than the precalculated number for that origin zone, an error message will be provided, and no calculation result will be available.
Since GeoDMS 20.23.1 the option parses in this spelling; before, only the misspelling
precalculateted_NrDstZonesdid, which is still accepted. Also since 20.23.1 the remaining rows are null, as described above, where they were left with whatever the memory held, and the count given for the last origin zone is checked like the others: a count that was too small for it wrote past the end of the result. A null among the given counts is an error that names the origin zone. -
the optional impedance indicates the production of a subitem impedance : OD → Impedance, an attribute with the lowest route impedance per found od-pair. This impedance includes startPoint(impedance) and endPoint(impedance) but not OrgZone_min nor DstZone_min.
-
the optional OrgZone_rel indicates the production of a subitem OrgZone_rel : OD → OrgZone, an attribute with the OrgZone of each od-pair.
-
the optional DstZone_rel indicates the production of a subitem DstZone_rel : OD → DstZone, an attribute with the DstZone of each od-pair.
-
the optional StartPoint_rel indicates the production of a subitem StartPoint_rel : OD → startPoint, an attribute with the startPoint from which the shortest route of each od-pair departed. This only adds information beyond OrgZone_rel when startPoint(...,OrgZone_rel) puts several startPoints in one origin zone; it then tells which of them was used. Undefined for od-pairs without an available route. Warning: this option is only correctly implemented since version 20.18.0. Earlier versions do accept StartPoint_rel in the od: list and do produce the sub-item, but never fill it, so the attribute contains uninitialized memory rather than start point references. Results calculated with StartPoint_rel before 20.18.0 are therefore invalid and have to be recalculated.
-
the optional EndPoint_rel indicates the production of a subitem EndPoint_rel : OD → endPoint, an attribute with the endPoint at which the shortest route of each od-pair arrived, analogous to StartPoint_rel and similarly informative only when endPoint(...,DstZone_rel) puts several endPoints in one destination zone.
-
the optional LinkSet indicates the production of a subitem LinkSet : OD → Link-sequence, an attribute with the sequence of Links of each od-pair route.
When no od-pair-related products are requested (including no alt_imp), the memory footprint of the operation will be greatly reduced as intermediate potentials and route flows per od-pair are produced per OrgZone and directly aggregated to the OrgZone, DstZone, and/or Link level and no storage is required per od-pair simultaneously for different OrgZones.
In order to get
- When no alternative link impedance is given, define it as an extra subitem of the resulting od-pair unit:
attribute<float32> t_ij := impedance >= 1e+38f ? 0.0f : distDecay == 0.0f ? 1.0f : impedance^-distDecay;
Note that
attribute<float32> t_ij := impedance^-distDecay;
- When alternative(link_imp):alt_imp is used, use:
attribute<float32> t_ij := !IsDefined(alt_imp) ? 0.0f : distDecay == 0.0f ? 1.0f : alt_imp^-distDecay;
-
When OrgZone_min or DstZone_min were specified , replace the last impedance measure (impedance or alt_imp) by
- max_elem(impedance, min_imp[OrgZone_rel]) when min_imp is given per origin zone,
- max_elem(impedance, min_imp[DstZone_rel]) when min_imp is given per destination zone, or just
- max_elem(impedance, min_imp) when it is a single value parameter, applied for all od-pairs.
-
The Mij can then be calculated with
attribute<float32> M_ij := D_i[OrgZone_rel] <= 0.0f ? 0.0f : t_ij*D_i[OrgZone_rel]^(demand_alpha-1.0f);
- if the demand for each zone i is assumed to be inelastic, i.e. demand_alpha == 0f, this can be simplified to
attribute<float32> M_ij := D_i[OrgZone_rel] <= 0.0f ? 0.0f : t_ij*(1.0f / D_i)[OrgZone_rel];
An example of this can be found in the operator test configuration at /Network/UnTiled/dijkstra_all_interaction.