~o|16 ~?!i&32768 ~o=39 ~$>end_of_copyright ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~/Copyright (C) Heinz Spiess, CH-2558 Aegerten, 1996. All rights reserved. ~/ ~/The right to use this macro is granted to all EMME/2 users, provided the ~/following conditions are met: ~/ 1) The macro cannot be sold for a fee (but it can be used and distributed ~/ without charge within consulting projects). ~/ 2) The user is aware that this macro is not a part of the EMME/2 software ~/ licence and there is no explicit or implied warranty or support ~/ provided with this macro. ~/ 3) The comments in this macros must not be removed and any additions or ~/ modification must be appropriately identified as such and give at least ~/ date, name and the reason of the modification. ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~:end_of_copyright ~/*************************************************************************** ~/ S2STIMES 1.1 - Macro which generates a report or a punch file containing ~/ stop-to-stop times for all or selected transit lines. These stop-to-stop ~/ times are accumulated from the corresponding segment times (timtr). ~/ ~/ (Heinz Spiess, Haldenstrasse 16, CH-2558 Aegerten, Switzerland 96-12-18) ~/ ~/ Calling sequence: ~ [] ~/ where File name for punch file. If empty a report will be ~/ generated. If this parameter is set to "-" a report ~/ will be generated on the terminal. ~/ Optional line selection argument. If absent, all lines ~/ will be selected by default ~/ ~/ Stops are taken to be the I-nodes of those segments for which either ~/ the NOALI, the NOBOA, or both flags are set to zero, i.e. nodes at ~/ which passengers are allowed to alight or to board. ~/ ~/ The report or punch file contains one record for each stop-to-stop ~/ section with the following fields: ~/ tmps1: from-stop ~/ tmps2: to-stop ~/ tmps3: number of segments between stops ~/ tmps4: total distance between stops (accumulated segment lengths) ~/ tmps5: total time between stops (accumulated segment times TIMTR) ~/ tmps6: average stop-to-stop speed ~/*************************************************************************** ~x=%0% ~?x<1 ~$stop ~/ ~t1=%1% ~?!t1=- batchout=%1% 2.41 / enter module 2.41 ~+|5|n|n|n|n|r / set module parameters as needed ~/ step 1: propagate node number of last stop (optional) 1 y tmps1 put(get(2)*put((noali+noboa)==2&&index2>1)+(1-get(1))*i)*((noboan+noalin)!=2) ~t2=%2% ~?t2= ~+|all|~$>line_selection_done %2% ~:line_selection_done ~+|all|5|r ~/ step 2: save node number of current stop (optional) 1 y tmps2 j*((noboan+noalin)!=2) ~+||all|5|r ~/ step 3: count number of segments between stops (optional) 1 y tmps3 put(get(2)*put((noali+noboa)==2&&index2>1)+1)*((noboan+noalin)!=2) ~+||all|5|r ~/ step 4: propagate segment length to obtain stop-to-stop lengths 1 y tmps4 put(get(2)*put(noali+noboa==2&&index2>1)+length)*(noalin+noboan!=2) ~+||all|5|r ~/ step 5: propagate segment times to obtain stop-to-stop times 1 y tmps5 put(get(2)*put(noali+noboa==2&&index2>1)+timtr)*(noalin+noboan!=2) ~+||all|5|r ~/ step 6: generate report or punch 1 y tmps6 0*(tmps1+tmps2+tmps3)+(60*tmps4/(tmps5+(tmps5.eq.0)))*(tmps5!=0) ~+||all ~?!t1=- ~+|3|q|batchout=^|~/File %t1% written.|~/|~$stop ~+|1|~o=6|~?q=2|1 ~+|~*|~?e|~$|~?m=0|~$stop|~?q=0|~$ q ~:stop ~o=6