Element Selectors and Iterators
In EMME/2, sub-network selection is implemented by a simple mechanism, in which a set of selection clauses is specified by the user, each clause being composed of an attribute and a corresponding value range. Network elements are selected if they satisfy the combination of all selection clauses. [Page]
In Enif, all network element selections are based on expressions. A selector is an expression which is used to determine which elements of a given type are used in a certain functionality. The expression is evaluated for each element of the given type and if the expression result is non-zero (or a non-empty string in the case of a string valued expression) the element is selected, whereas elements yielding a zero numeric value (or an empty string) are not selected. An exception to this rule is if the selection expression is empty, in which case all elements will be selected (this is different from EMME/2 where a selection without any clauses implied an empty set of network elements). In order to set a selector to select no elements, it suffices to set the selector expression explicitly to 0.
In order to allow an efficient handling of subsets, the selector expression is only evaluated once for each network element and the results are used to build a list of pointers to the selected elements which can then be traversed very efficiently for as many times as needed without any additional computational overhead.
<< 上一页 [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] ... 下一页 >>






