LogComposite traffic general nodesContains functions, indexes, and nodes that are used in several modules, and log nodes.jtue2. Aprta 2004 14:19ktluser11. Novta 2008 15:19 48,241,0,0,1,1,1,0,,0,1,433,24,544,530,170,Linkmodule Composite_traffic_ge,2,2,-32766,1,Composite traffic general nodes.ANAChoose flexibleFlexible 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,148,16[Formnode Choose_flexible1, Formnode Choose_flexible2]52425,39321,65535['item 1']Choose largeThe 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,048,161,1,1,1,1,1,0,0,0,0[Formnode Choose_large1, Formnode Choose_large2]52425,39321,65535['item 1']Choose nochangeYou 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,148,162,46,180,476,369[Formnode Choose_nochange1, Formnode Choose_nochange2]52425,39321,65535[Choose_comp,['item 1']][Variable Choose_comp]ModeThe transport mode: either personal car or composite traffic.['Car','Composite']176,280,148,121,0,0,1,1,1,0,,0,2,220,199,476,224['Car','Composite']Trip lengthkmThe 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,148,242,102,90,476,4072,55,202,932,513,1,MIDMHma_zoneThe 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,148,122,94,64,476,5472,414,239,416,303,0,MIDM52425,39321,65535['Downtown','Centre','Suburb']Traffic speedkm/hAverage speed of traffic.4056,312,148,242,93,231,476,32265535,52427,65534Vehicle_1Index 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,148,121,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 functionsFunctions that are used in several modules of this model, or in several models. It is therefore practical to place them into one module.jtue2. Aprta 2004 14:4748,2456,200,148,241,109,108,82,340,21(in,out:prob;classes)VariationToistaiseksi Variation1 ei toimi, jos classes on indeksi. Tmn voi koettaa ratkaista siten, ett tehdn isompi indeksi, jossa concatataan kaikki eripituiset varia-indeksit, sortataan suuruusjrjestykseen, ja slicataan pienemmt indeksit siihen. Tmn lisksi tytyy linearinterp-funktiolla luoda puuttuviin kohtiin lukuja, jossa funktio kulkee ntisti. Nyt tt ei ruveta tekemn.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,148,242,57,16,476,648in,out,classes(out:prob;deci:indextype;input:prob;input_ind:indextype;luokkia)VOIVersio 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,148,242,474,71,476,546out,deci,input,input_ind,luokkiaTime unithTime unit in hours. (Should equal the acceptable waiting time.)1/(size(time)/24)56,96,148,241,1,1,1,1,1,0,,0,52425,39321,65535(Trips,Delay)Time shifttime unitsshifts 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,148,241,1,1,1,1,1,0,,0,2,367,75,476,512Trips,Delay(data)Clean rowsindex 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,148,242,102,90,476,389data(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);
c56,32,148,24d,roa(a)Aggr periodvar 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,148,242,253,78,476,311a(in,out:prob;classes)VariationToistaiseksi Variation1 ei toimi, jos classes on indeksi. Tmn voi koettaa ratkaista siten, ett tehdn isompi indeksi, jossa concatataan kaikki eripituiset varia-indeksit, sortataan suuruusjrjestykseen, ja slicataan pienemmt indeksit siihen. Tmn lisksi tytyy linearinterp-funktiolla luoda puuttuviin kohtiin lukuja, jossa funktio kulkee ntisti. Nyt tt ei ruveta tekemn.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,148,24in,out,classes(param1,sigdigits)roundingvar a:= floor(logten(param1));
var b:= param1/10^(a+1-sigdigits);
round(b)*10^(a+1-sigdigits)272,32,148,24param1,sigdigitsProfilingUse 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 ChrismanSun, Jul 13, 2003 12:18 PMindirectSun, Sep 14, 2003 7:20 AM48,2456,144,148,241,1,1,1,1,1,0,0,0,01,433,261,-4636,266,212,90,44,476,224(m: TextType)Descendant ObjectsReturns 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,152,242,97,125,476,394m1(m: TextType)Computation ProfilesecReturns 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,160,242,88,-2,481,571mTiming profileCPU SecReturns 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,148,242,723,11,247,592,0,MIDM[Formnode Whole_model_computat, Formnode Timing_profile1]1,F,10,3,0,0Whole Model Computational Profile1256,40,1124,161,0,0,1,0,0,0,72,0,1Timing_profile(m: TextType)Computation Profile allsecReturns 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,160,242,102,90,529,521mTiming profile allCPU SecThis 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,148,242,655,142,407,516,0,MIDM1,F,10,3,0,0FromArea number of the origin. Equals the Area 129 coding (plus 1000) by Helsinki Metropolitan Area Council.1001..1005176,80,148,122,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]ToArea number of the destination. Equals the Area 129 coding (plus 1000) by Helsinki Metropolitan Area Council.copyindex(From)176,104,148,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]RegAn index for areal data tables. Transformed to 'From' index.1001..1129176,24,148,122,446,194,476,288Reg1An index for areal data tables. Transformed to 'To' index.1001..1129176,48,148,12AreaThe 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,148,122,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]RegionThe 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,148,122,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 dummyThe 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.056,256,148,24PeriodsMorning-day, evening, and night are looked at separately.table(Period_1)(1,2,3)56,48,148,1252425,39321,65535Vehicle_nochIndex 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,148,121,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 profile1176,472,1160,121,0,0,1,0,0,0,72,0,1Timing_profileMista0176,448,1160,121,0,0,1,0,0,0,72,0,1FromSubsidise groups?0172,348,1156,121,0,0,1,0,0,0,72,0,1Subsidise_groups_Choose large0172,372,1156,121,0,0,1,0,0,0,72,0,152425,39321,65535Choose_largeChoose nochange0172,396,1156,121,0,0,1,0,0,0,72,0,152425,39321,65535Choose_nochangeChoose flexible0172,420,1156,121,0,0,1,0,0,0,72,0,152425,39321,65535Choose_flexible