Log Composite traffic general nodes Contains functions, indexes, and nodes that are used in several modules, and log nodes. jtue 2. Aprta 2004 14:19 ktluser 11. Novta 2008 15:19 48,24 1,0,0,1,1,1,0,,0, 1,433,24,544,530,17 0,Linkmodule Composite_traffic_ge,2,2,-32766,1,Composite traffic general nodes.ANA Choose flexible Flexible passengers mean those who are willing to start their trip 12 min earlier to improve the trip aggregation. This increases the volume of the time point (and respectively decreases it in the next time point), which has a positive net effect on trip aggregation. Choice(Flexible_fr,1,True) 296,88,1 48,16 [Formnode Choose_flexible1, Formnode Choose_flexible2] 52425,39321,65535 ['item 1'] Choose large The areal coverage of composite traffic can be defined in two ways. First, all requested trips within a certain area will be organised (i.e. both the origin AND the destination are inside the area). Second, all trips in the metropolitan area will be organised, if either the origin OR the destination is inside the area. The latter is denoted 'Large guarantee' in the model. That approach could be used, if an important aim is to reduce the need for an own car by offering a service that can handle most trips for those people who live in the area. The first approach is the default in the model. Choice(Large,2,True) 296,56,0 48,16 1,1,1,1,1,1,0,0,0,0 [Formnode Choose_large1, Formnode Choose_large2] 52425,39321,65535 ['item 1'] Choose nochange You can choose which nochange fraction(s) is (are) calculated. The number means the fraction of passengers that request a trip without a transfer. If you choose All, you will get a more thorough result, but it will take more memory and computation time, especially if 'Choose guar' or 'Choose period' are also All. Choice(Nochange_fr,1,True) 296,24,1 48,16 2,46,180,476,369 [Formnode Choose_nochange1, Formnode Choose_nochange2] 52425,39321,65535 [Choose_comp,['item 1']] [Variable Choose_comp] Mode The transport mode: either personal car or composite traffic. ['Car','Composite'] 176,280,1 48,12 1,0,0,1,1,1,0,,0, 2,220,199,476,224 ['Car','Composite'] Trip length km The lengths of the trips shown as a frequency distribution. var comp:= aggr_period(All_trips); comp:= comp[Mode1='Composite']; var car:= comp[Mode1='Car']; var a:= array(Vehicle_1,[comp,0,0,0,0,car]); index length:= 1..50; for x[]:= length do ( var e:= if round(distances)=x then a else 0; e:= sum(sum(e,from),to1) ) 56,88,1 48,24 2,102,90,476,407 2,55,202,932,513,1,MIDM Hma_zone The areas are classified into three categories: 1) downtown (downtown of Helsinki), 2) centre (other major centres within the Metropolitan area), and 3) suburb (all other areas). Table(Self)( 1,2,3) ['Downtown','Centre','Suburb'] 56,16,1 48,12 2,94,64,476,547 2,414,239,416,303,0,MIDM 52425,39321,65535 ['Downtown','Centre','Suburb'] Traffic speed km/h Average speed of traffic. 40 56,312,1 48,24 2,93,231,476,322 65535,52427,65534 Vehicle_1 Index of travel type (vehicle type including the number of changes). ['Bus no change','Bus one change','Cab no change','Cab one change','Cab non-full','Car'] 176,192,1 48,12 1,1,1,1,1,1,0,,0, 2,186,152,476,399 ['Bus no change','Bus one change','Cab no change','Cab one change','Cab non-full','Car'] General functions Functions that are used in several modules of this model, or in several models. It is therefore practical to place them into one module. jtue 2. Aprta 2004 14:47 48,24 56,200,1 48,24 1,109,108,82,340,21 (in,out:prob;classes) Variation Toistaiseksi Variation1 ei toimi, jos classes on indeksi. TŠmŠn voi koettaa ratkaista siten, ettŠ tehdŠŠn isompi indeksi, jossa concatataan kaikki eripituiset varia-indeksit, sortataan suuruusjŠrjestykseen, ja slicataan pienemmŠt indeksit siihen. TŠmŠn lisŠksi tŠytyy linearinterp-funktiolla luoda puuttuviin kohtiin lukuja, jossa funktio kulkee nŠtisti. Nyt tŠtŠ ei ruveta tekemŠŠn. for x[]:= classes do ( index varia:= sequence(1/x,1,1/x); var c:= rank(sample(in),run); c:= ceil(c*x/samplesize)/x; var a:= if c=Varia then sample(out) else 0; var b:= if c=Varia then 1 else 0; a:= sum(a,run)/sum(b,run); if isnan(a) then 0 else a ) 168,208,1 48,24 2,57,16,476,648 in,out,classes (out:prob;deci:indextype;input:prob;input_ind:indextype;luokkia) VOI Versio 1. index a:= ['Total VOI']; index variable:= concat(a,input_ind); for x[]:= luokkia do ( index varia:= sequence(1/x,1,1/x); var in:= ceil(rank(input,run)*x/samplesize)/x; var ncuu:= min(mean(sample(out)),deci); var d:= (if a='Total VOI' then mean(min(sample(out),deci))-ncuu else 0); var evpi:= if in=Varia then out else 0; evpi:= sum(min(mean(evpi),deci),varia)-ncuu; concat(d,evpi,a,input_ind,variable) ) 56,208,1 48,24 2,474,71,476,546 out,deci,input,input_ind,luokkia Time unit h Time unit in hours. (Should equal the acceptable waiting time.) 1/(size(time)/24) 56,96,1 48,24 1,1,1,1,1,1,0,,0, 52425,39321,65535 (Trips,Delay) Time shift time units shifts travels forward and backward in time. This is the way how travel times are taken into account. Trips = number of trips traveled at each time point. Delay = Travel time as number of time units. If delay is negative, the result is earlier in time than Trip. Time_order = a helper variable containing the rank number of each time point. var time_order:= time/time_unit+1; var a:= Time_order-Delay; var b:= (if a >max(Time_order,time) or a< min(Time_order,time) then 1 else a); slice(Trips,time,b) 168,96,1 48,24 1,1,1,1,1,1,0,,0, 2,367,75,476,512 Trips,Delay (data) Clean rows index in1:= 1..size(data); var b:= slice(data,in1); var c:= unique(b,in1); b:= slice(b,in1,c); b:= slice(b,in1); c:= subset(istext(b)); b:= slice(b,in1,c); index a:= 1..size(b); slice(b,a) 168,32,1 48,24 2,102,90,476,389 data (d;roa:indextype) index etappi:= 1..max((textlength(d)+1)/5,roa); index a:= 1..size(d)*2; var c:= for x[]:= d do slice(Splittext(x,','),Etappi); c:= (if istext(c) then c else ''); var b:= c[Etappi=1]; var x:=2; while x<= size(Etappi) do ( b:= (if c[Etappi=x] = '' then b else c[Etappi=x] & ',' & b); x:= x+1); c:= concat(d,b,roa,roa,a); c 56,32,1 48,24 d,roa (a) Aggr period var b:= if time>=6 and time<20 then a else 0; b:= sum(b,time); var c:= if time>=20 and time<24 then a else 0; c:= sum(c,time); var d:= if time>=24 or time<6 then a else 0; d:= sum(d,time); array(Period_1,[b,c,d]) 56,152,1 48,24 2,253,78,476,311 a (in,out:prob;classes) Variation Toistaiseksi Variation1 ei toimi, jos classes on indeksi. TŠmŠn voi koettaa ratkaista siten, ettŠ tehdŠŠn isompi indeksi, jossa concatataan kaikki eripituiset varia-indeksit, sortataan suuruusjŠrjestykseen, ja slicataan pienemmŠt indeksit siihen. TŠmŠn lisŠksi tŠytyy linearinterp-funktiolla luoda puuttuviin kohtiin lukuja, jossa funktio kulkee nŠtisti. Nyt tŠtŠ ei ruveta tekemŠŠn. for x[]:= classes do ( index varia:= sequence(1/x,1,1/x); var c:= rank(sample(in),run); c:= ceil(c*x/samplesize)/x; var a:= if c=Varia then sample(out) else 0; var b:= if c=Varia then 1 else 0; a:= sum(a,run)/sum(b,run); if isnan(a) then 0 else a ) 168,152,1 48,24 in,out,classes (param1,sigdigits) rounding var a:= floor(logten(param1)); var b:= param1/10^(a+1-sigdigits); round(b)*10^(a+1-sigdigits) 272,32,1 48,24 param1,sigdigits Profiling Use this library to see which variables and functions are taking most of the computation time when running your model. This library requires Analytica Enterprise, or ADE. It will not work for other versions of Analytica. Here's how to use the library: 1. First run your model, i.e. show (and therefore compute) results for the outputs you are interested in timing. 2. Click Timing "Result" button to show an array showing how long it took to evaluate each variable (in CPU seconds), ordered to show the largest times first. If you want to time additional calculations, added to existing timings. 3. Make those calculations by showing results for those variables. 4. Click button "Recompute Timings" 5. Click Timing "Result" button again. If you want to time additional calculations, starting from zero again. 6. Change relevant inputs to cause their dependents to need to be recomputed. 7. Click "Reset Timings" to set to zero. 8. Show results for outputs of interest. 9. Click Timing "Result" again to see new timings. Lonnie Chrisman Sun, Jul 13, 2003 12:18 PM indirect Sun, Sep 14, 2003 7:20 AM 48,24 56,144,1 48,24 1,1,1,1,1,1,0,0,0,0 1,433,261,-4636,266,21 2,90,44,476,224 (m: TextType) Descendant Objects Returns a list including module m and all its descendants, i.e. objects (variables, functions, and modules) contained in m - and in any modules it contains, recursively. VAR res := [m]; VAR c := contains OF m ; IFONLY IsUndef(c) THEN res ELSE BEGIN FOR v := c Do BEGIN VAR d := Descendant_objects(Identifier OF v); res := Concat(res, d); 0 END; res END 80,176,1 52,24 2,97,125,476,394 m 1 (m: TextType) Computation Profile sec Returns an array of the computation time (in seconds) taken to evaluate each variable (or user-defined function). Results exclude time spent evaluating each variable's inputs. Times are sorted in descending order to show the variables taking the most time at the top. The result is indexed by .objects, a local index containing only those variables with a nonzero computation time. This function is useful for profiling a computationally intensive model to find where the time is being spent. The time includes all time spent in computing each variable since the model was opened, or since the last call to "Reset Timings". INDEX allobjs := Descendant_Objects(m); VAR allTimings := (FOR obj:=allobjs DO EvaluationTime OF obj ); INDEX UnsortedNodes := Subset(allTimings > 0); VAR timings := allTimings[allobjs = UnsortedNodes]; INDEX objects := sortIndex(-timings, UnsortedNodes); timings[UnsortedNodes = objects] 200,176,1 60,24 2,88,-2,481,571 m Timing profile CPU Sec Returns an array with the evaluation Time spent in each variable and function. /* First, determine which node is the "root" node of the model */ VAR m := Identifier OF Isin OF Self ; VAR top := WHILE (NOT IsUndef(Isin OF m )) DO m := Identifier OF Isin OF m ; Computation_profile(top) 328,176,1 48,24 2,723,11,247,592,0,MIDM [Formnode Whole_model_computat, Formnode Timing_profile1] 1,F,10,3,0,0 Whole Model Computational Profile 1 256,40,1 124,16 1,0,0,1,0,0,0,72,0,1 Timing_profile (m: TextType) Computation Profile all sec Returns an array of the computation time (in seconds) taken to evaluate each variable (or user-defined function). Results exclude time spent evaluating each variable's inputs. Times are sorted in descending order to show the variables taking the most time at the top. The result is indexed by .objects, a local index containing only those variables with a nonzero computation time. This function is useful for profiling a computationally intensive model to find where the time is being spent. The time includes all time spent in computing each variable since the model was opened, or since the last call to "Reset Timings". INDEX allobjs := Descendant_Objects(m); VAR allTimings := (FOR obj:=allobjs DO EvaluationTimeAll OF obj ); INDEX UnsortedNodes := Subset(allTimings > 0); VAR timings := allTimings[allobjs = UnsortedNodes]; INDEX objects := sortIndex(-timings, UnsortedNodes); timings[UnsortedNodes = objects] 200,240,1 60,24 2,102,90,529,521 m Timing profile all CPU Sec This displays the Time spent in each variable and function /* First, determine which node is the "root" node of the model */ VAR m := Identifier OF Isin OF Self ; VAR top := WHILE (NOT IsUndef(Isin OF m )) DO m := Identifier OF Isin OF m ; Computation_profile_(top) 328,240,1 48,24 2,655,142,407,516,0,MIDM 1,F,10,3,0,0 From Area number of the origin. Equals the Area 129 coding (plus 1000) by Helsinki Metropolitan Area Council. 1001..1005 176,80,1 48,12 2,518,124,476,424 [Formnode Mista2] [1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129] To Area number of the destination. Equals the Area 129 coding (plus 1000) by Helsinki Metropolitan Area Council. copyindex(From) 176,104,1 48,12 [1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129] Reg An index for areal data tables. Transformed to 'From' index. 1001..1129 176,24,1 48,12 2,446,194,476,288 Reg1 An index for areal data tables. Transformed to 'To' index. 1001..1129 176,48,1 48,12 Area The number of area. Equals the Area 129 coding (plus 1000) by Helsinki Metropolitan Area Council. [1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130] 176,136,1 48,12 2,531,226,476,224 [1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130] Region The names of the larger regions used in the model. ['+Länsi-Espoo','+Pohjois-Espoo','+Etelä-Espoo','+Keski-Espoo','+Länsi-Vantaa','+Keski-Vantaa','+Pohjois-Vantaa','+Itä-Vantaa','+Kanta-Helsinki','+Länsi-Helsinki','+Vanha-Helsinki','+Konalanseutu','+Pakilanseutu','+Malminseutu','+Itä-Helsinki'] 176,160,1 48,12 2,470,236,476,365 ['+Länsi-Espoo','+Pohjois-Espoo','+Etelä-Espoo','+Keski-Espoo','+Länsi-Vantaa','+Keski-Vantaa','+Pohjois-Vantaa','+Itä-Vantaa','+Kanta-Helsinki','+Länsi-Helsinki','+Vanha-Helsinki','+Konalanseutu','+Pakilanseutu','+Malminseutu','+Itä-Helsinki'] Composite traffic dummy The placeholder for the composite traffic. This is used when an argument is linked to composite traffic in general, and there is no obvious node to which it can be linked. 0 56,256,1 48,24 Periods Morning-day, evening, and night are looked at separately. table(Period_1)(1,2,3) 56,48,1 48,12 52425,39321,65535 Vehicle_noch Index of travel type (vehicle type including the number of changes). This index is the same as Vehicle except that there is an additional row, No-change trips. This is the number of trips that are forced not to be divided into two parts. Note that these trips are included in other rows, and therefore this index must not be summed up. ['Bus no change','Bus one change','Cab no change','Cab one change','Cab non-full','Car','No-change'] 176,240,1 48,12 1,1,1,1,1,1,0,,0, ['Bus no change','Bus one change','Cab no change','Cab one change','Cab non-full','Car','No-change'] Timing profile 1 176,472,1 160,12 1,0,0,1,0,0,0,72,0,1 Timing_profile Mista 0 176,448,1 160,12 1,0,0,1,0,0,0,72,0,1 From Subsidise groups? 0 172,348,1 156,12 1,0,0,1,0,0,0,72,0,1 Subsidise_groups_ Choose large 0 172,372,1 156,12 1,0,0,1,0,0,0,72,0,1 52425,39321,65535 Choose_large Choose nochange 0 172,396,1 156,12 1,0,0,1,0,0,0,72,0,1 52425,39321,65535 Choose_nochange Choose flexible 0 172,420,1 156,12 1,0,0,1,0,0,0,72,0,1 52425,39321,65535 Choose_flexible