next up previous
Next: User Data now also on Up: EMME/2 News 1 October 1986 Previous: New Link and Node Selection

The Network Calculator is Here!

Release 2.0 contains a new module, 2.41 "Network Calculations". Its main goal is to evaluate expressions combining link and node attributes, in whatever form the user decides, and to report, punch and/&or save the results of the calculations. Under normal circumstances, the results, if saved, are placed into one of the node or link user data items, but, with a special setting of the module parameters, it is also possible to use the Network Calculator to modify systematically any other basic link or node attribute.

A second function performed by this module is to import attribute values from other scenarios into the current scenario. This is very useful when, e.g., the assigned volumes of one scenario are to become the fixed additional volumes in another scenario. Also, this feature opens the possibility of stepwise evaluating more complex expressions that involve data from more than one scenario.

Now let's look at the type of expressions and parameters accepted by the Network Calculator. The possible parameters and their keywords correspond exactly to those that are used in the new link and node selection (discussed elsewhere in this issue), except for the MODES attribute which is non-numeric and, hence, cannot be used in calculations. All node attributes appear in their I- and J-form. The I-form will always refer to the corresponding attribute of the I-node of the link, when combined with link data. Similarly, the J-form refers to the attribute of the J-node of the link. The I-form must always be used when working with nodes only. If an expression contains any J-form node attribute or a link attribute, it is always evaluated on a link basis. If the expression contains only I-form node attributes, it will be evaluated node by node. It is possible to save a link type expression in a node attribute; in this case, the user is prompted to choose the type of link to node aggregation to be used. Possible choices are: minimum, maximum, average and sum.

As for operators, intrinsic functions and constants, the same rules apply as anywhere else in the EMME/2 system.

The resulting values may be saved or not in a attribute vector. In any case, the user has the choice of producing a report or a punch of the calculations. For each element processed, the detailed report or punch contains the values of all attributes used in the expression (in the order they appear in the expression) followed by the result value. Thus, module 2.41 gives the user a powerful tool to generate reports or sequential data files that contain precisely the attributes he decides.

The following table contains the keywords that may be used in expressions. The FORM column indicates L for a link attribute and I or J for the I- or J-form of node attributes. The column SAVE indicates "yes" if it is always possible to save into this attribute, "no" if it is not possible and "cond" if it depends on the setting of the corresponding module parameter. Truncation will occur if the resulting value lies outside the specified range for attributes having a limited value range.

KEYWORD(S)ATTRIBUTEFORMSAVECOMMENTS
iI-nodeIno
jJ-nodeJno
lanes lanno. of lanesLcond0.1<lan<9.9
length lenlink lengthLcond0.01<len<99.99
timau tauAuto time on linkLnoafter assignment
type typlink typeLcond1<typ<999
ui1I-node user data 1Iyes
ui2I-node user data 2Iyes
ui3I-node user data 3Iyes
uj1J-node user data 1Jno
uj2J-node user data 2Jno
uj3J-node user data 3Jno
ul1link user data 1Lyes
ul2link user data 2Lyes
ul3link user data 3Lyes
vdfvolume delay fct.Lcond1<vdf<mfunc
volad vadAdd. volume on linkLnoafter assignment
volau vauAuto volume on linkLnoafter assignment
volax vaxAux. volume on linkLnoafter assignment
xiX-coord. of I-nodeIyes
xjX-coord. of J-nodeJno
yiY-coord. of I-nodeIyes
yjY-coord. of J-nodeJno

In the following, we show two examples of how the network calculator can be used.

In the first example, the coordinate system of the current scenario is rotated counter-clockwise by 35 degrees. First, the new X-coordinate is saved in ui1, since the old value will still be used to calculate the new Y-coordinates. Second, the new Y-coordinate is calculated and replaces the old value. At last, the new coordinates, saved in ui1, are copied to xi to replace the old values. A network plot (module 2.13) shows the rotated Winnipeg network. (Note that, since the terms "sin(6.28/360*35)" and "cos(6.28/360*35)" are constants, they could be replaced by their values 0.5745 and 0.8192 in the expressions, saving some calculations.)

In the second example, the ratio between the link length and the Euclidean distance between I and J-node of the link is computed for all links longer than 2.5 miles. The result is not saved, but a report is generated showing the corresponding attributes and the result for each selected link. .KS a) rotating coordinates by 35 degrees

 2.41  NETWORK CALCULATIONS

 Select: 1= network calculations
         2= copy attribute from other scenario
         3= change module parameters
         4= end
          3

 Modify only user defined data items?no
 Output only result values?no

 Save current values of module parameters on disk?y

 2.41  NETWORK CALCULATIONS

 Select: 1= network calculations
         2= copy attribute from other scenario
         3= change module parameters
         4= end
          1

 Save result?y

 Enter: Attribute to save result in=ui1

 Possible keywords: type length lanes vdf   ul1   ul2   ul3   i      
                    xi   yi     ui1   ui2   ui3   j     xj    yj     
                    uj1  uj2    uj3   timau volau volax volad  

 Enter: Expression to calculate ui1
 =xi*cos(6.28/360*35)-yi*sin(6.28/360*35)
 = 

 ui1  =   xi * cos(6.28 / 360 * 35) - yi * sin(6.28 / 360 * 35) 

 Enter: Selected node number or attributes (from, to)
 =all

 Select: Type of output
         1= full report
         2= summary report
         3= punch
         4= none
          4

 Number of nodes processed:        1057
 Number of values changed:         1056
 Minimum result value:        -12.13943
 Maximum result value:         10.20963
 Sum of result values:       -236.99174
 Average result value:         -0.22421


 2.41  NETWORK CALCULATIONS

 Select: 1= network calculations
         2= copy attribute from other scenario
         3= change module parameters
         4= end
          1

 Save result?y

 Enter: Attribute to save result in=yi

 Possible keywords:  type   length lanes  vdf    ul1    ul2    ul3    i      
                     xi     yi     ui1    ui2    ui3    j      xj     yj     
                     uj1    uj2    uj3    timau  volau  volax  volad  

 Enter: Expression to calculate yi
 =xi*sin(6.28/360*35)+yi*cos(6.28/360*35)
 = 

 yi        =   xi * sin(6.28 / 360 * 35) + yi * cos(6.28 / 360 * 35) 

 Enter: Selected node number or attributes (from, to)
 =all

 Select: Type of output
         1= full report
         2= summary report
         3= punch
         4= none
          4

 Number of nodes processed:        1057
 Number of values changed:         1056
 Minimum result value:        -12.84167
 Maximum result value:          8.08890
 Sum of result values:       -875.10706
 Average result value:         -0.82792


 2.41  NETWORK CALCULATIONS

 Select: 1= network calculations
         2= copy attribute from other scenario
         3= change module parameters
         4= end
          1

 Save result?y

 Enter: Attribute to save result in=xi

 Possible keywords:  type   length lanes  vdf    ul1    ul2    ul3    i      
                     xi     yi     ui1    ui2    ui3    j      xj     yj     
                     uj1    uj2    uj3    timau  volau  volax  volad  

 Enter: Expression to calculate xi
 =ui1
 = 

 xi        =   ui1 

 Enter: Selected node number or attributes (from, to)
 =all

 Select: Type of output
         1= full report
         2= summary report
         3= punch
         4= none
          4

 Number of nodes processed:        1057
 Number of values changed:         1056
 Minimum result value:        -12.13943
 Maximum result value:         10.20963
 Sum of result values:       -236.99174
 Average result value:         -0.22421

rotated network

b) ratio of link length divided by Euclidean distance (detour factor)

 2.41  NETWORK CALCULATIONS

 Select: 1= network calculations
         2= copy attribute from other scenario
         3= change module parameters
         4= end
          1

 Scenario  1000 is protected against modifications. Results may not be saved.

 Possible keywords:  type   length lanes  vdf    ul1    ul2    ul3    i      
                     xi     yi     ui1    ui2    ui3    j      xj     yj     
                     uj1    uj2    uj3    timau  volau  volax  volad  

 Enter: Expression to calculate result
 =sqrt((xi-xj)^2+(yi-yj)^2)/len
 = 

 result    =   sqrt((xi - xj) ^ 2 + (yi - yj) ^ 2) / length 

 Enter: Selected link types or attributes (from, to)
 =len=2.50,99.99
 =?
 Current set contains   24 links, selected by:
  1:   length=2.50,99.99                     
 Continue link selection:
 = 

 Select: Type of output
         1= full report
         2= summary report
         3= punch
         4= none
          1

 Select: List device
         1= Terminal
         2= Printer
          1

 EMME/2 Module: 2.41          Date: 86 10 30             User: SPIESS.....HS
 Project:       INRO CONSULTANTS - EMME/2 on IBM PC XT/AT w. DSI-32 
 Scenario 1000: Winnipeg 1981 Road and Transit Network
 ---------------------------------------------------------------------------


 NETWORK CACULATIONS
 *******************

 result    =   sqrt((xi - xj) ^ 2 + (yi - yj) ^ 2) / length 

 Selected links:   length=2.50,99.99                     


 inode jnode       xi     xj     yi     yj length    result

   272   405    8.826   8.55  -.646  -4.64   3.84   1.04258
   374   375    3.517  3.728  -7.06 -7.449   2.76    .16034
   375   374    3.728  3.517 -7.449  -7.06   2.76    .16034
   404   405    5.546   8.55 -2.952  -4.64   3.15    1.0939
   405   272     8.55  8.826  -4.64  -.646   3.84   1.04258
   405   404     8.55  5.546  -4.64 -2.952   3.15    1.0939
   405   406     8.55  5.563  -4.64 -5.517   2.87    1.0847
   406   405    5.563   8.55 -5.517  -4.64   2.87    1.0847
   545   546   -3.968  -8.79 -6.037 -9.089   5.26   1.08492
   546   545    -8.79 -3.968 -9.089 -6.037   5.26   1.08492
   546  1065    -8.79 -3.643 -9.089  -9.56   4.84   1.06787
   561   562   -9.083 -12.59   -2.4 -2.432   3.44   1.01952
   562   561   -12.59 -9.083 -2.432   -2.4   3.44   1.01952
   562   563   -12.59 -14.25 -2.432 -2.432   2.78    .59568
   563   562   -14.25 -12.59 -2.432 -2.432   2.78    .59568
   565   566   -12.57 -9.131 -4.575 -4.299   3.37   1.02464
   566   565   -9.131 -12.57 -4.299 -4.575   3.37   1.02464
   572   578   -7.849 -5.056 -4.186 -3.845   2.52   1.11656
   578   572   -5.056 -7.849 -3.845 -4.186   2.52   1.11656
   758   759    -8.06 -4.472  7.131   7.18   3.56   1.00796
   759   758   -4.472  -8.06   7.18  7.131   3.56   1.00796
   759   860   -4.472 -1.013   7.18  7.164   3.17   1.09118
   860   759   -1.013 -4.472  7.164   7.18   3.17   1.09118
  1065   546   -3.643  -8.79  -9.56 -9.089   4.84   1.06787

 Number of links processed:          24
 Minimum result value:          0.16034
 Maximum result value:          1.11656
 Sum of result values:         22.77973
 Average result value:          0.94916

 -->q


next up previous
Next: User Data now also on Up: EMME/2 News 1 October 1986 Previous: New Link and Node Selection


Heinz Spiess, EMME/2 Support Center, Thu Jun 6 14:03:06 MET DST 1996