11200[]9LogAwp_attrib11Opasnet base connectionInterface for uploading data to and downloading from the Opasnet Base.
<a href="http://en.opasnet.org/w/Image:Opasnet_base_connection.ANA">Wiki description</a>Jouni Tuomisto9. maata 2008 10:42ktluser9. Febta 2010 22:50 48,241,0,0,1,1,1,0,0,0,01,18,25,734,523,172,102,90,476,316Arial, 150,Model Op_en2676,2,2,0,1,C:\temp\Opasnet base connection.ANA100,1,1,1,1,9,2970,2100,15,02,40,50,640,600This module saves original data or model results (a study or a variable, respectively) into the Opasnet Base. You need your Opasnet username and password to do that. You must fill in all tables and fields below before the process can be completed. Fill in the data below from top to bottom.
If an object with the same Ident already exists in the Opasnet Base, the information will be added to that object.
Before you start, make sure that you have created an object page in the Opasnet wiki for each object (study or variable) you want to upload.260,84,-1252,76Username0168,244,1160,121,0,0,1,0,0,0,142,0,152425,39321,65535Opasnet_usernameTabIndex:1 TextAlwaysPassword0168,268,1160,121,0,0,1,0,0,0,142,0,152425,39321,65535Opasnet_passwordTabIndex:2 TextAlways2 Analytica modelktluser1. Aprta 2009 9:38 48,24200,456,160,321,0,0,1,1,1,0,,0,1,744,88,353,272,17N variables0140,60,1116,121,0,0,1,0,0,0,72,0,152425,39321,65535N_variables3 Analytica model:140,28,-1124,121,0,0,1,0,1,0,,0,65535,65532,19661140,140,-1124,1001,0,0,1,0,1,0,,0,Object info0140,84,1116,131,0,0,1,0,0,0,72,0,152425,39321,65535Object_info3Study or variable info0140,108,1116,121,0,0,1,0,0,0,78,0,152425,39321,65535Index_infoReplace data?0140,132,1116,121,0,0,1,0,0,0,72,0,152425,39321,65535Replace_data_Data source0204,380,1196,121,0,0,1,0,0,0,254,0,1Data_sourcePlatform0168,316,1160,121,0,0,1,0,0,0,142,0,152425,39321,65535PlatformWriterpsswd0168,292,1160,121,0,0,1,0,0,0,142,0,152425,39321,65535WriterpsswdC) For very large variables: Upload only the object and location information. Create csv files of other data to c:\temp\ and upload them separately (you need a direct access to the Opasnet Base).264,748,-1256,681,0,0,1,0,1,0,,0,Detailed help for Analytica usejtue8. kesta 2009 14:27 48,24372,184,1116,161,681,15,586,564,17Follow these instructions if you have Analytica Enterprise and have an ODBC connection to the Opasnet Base. Read also the simplified help; not everything is repeated here.284,36,-1276,281,0,0,1,0,1,0,,0,65535,65532,19661Platform:
You must choose THL computer if you are not using the AWP web interface.284,92,-1276,201,0,0,1,0,1,0,,0,Writerpsswd:
You must know the writer password for the Opasnet Base if you are not using the AWP web interface.284,149,-1276,291,0,0,1,0,1,0,,0,Object info:
- Data source:
1 means that you are copy-pasting data to the 'Observations' field.
2 means that you have a 2D table in an Analytica node. The node must have column index .j (note: it is a local index!) and row index .i. The names of the columns must be in the index .j, and the first row must contain data.
3 means that you have a typical Analytica node with n indices; one of the indices may be Run. The node is transformed into a 2D table using MDArrayToTable.
- Analytica identifier is the identifier of the node to be used. The name must be given between 'quotation marks', i.e. as text.
- Ident: like in the simplified upload.
- Number of indices: like in the simplified upload if data source 2 is used; for 3, the number of indices comes from the node, and this entry is ignored.
- Parameter name: like in the simplified upload if data source 2 is used; for 3, the parameter is implicit, and this entry is ignored.
- Probabilistic?: like in the simplified upload if data source 2 is used; for 3, if this entry is 1, the sample mode is used and the full distribution is saved, if the entry is not 1, the mid mode is used.
- Append to upload: like in the simplified upload.284,357,-1276,1731,0,0,1,0,1,0,,0,B) Upload so that the actual data is not visible without a password. Metadata is visible anyway.264,624,-1256,481,0,0,1,0,1,0,,0,2,693,146,476,224Upload data:264,516,-1256,121,0,0,1,0,1,0,,0,65535,65532,19661A) The default: Upload all data directly to Opasnet Base.264,548,-1256,201,0,0,1,0,1,0,,0,Basic help and explanationsjtue8. kesta 2009 14:27 48,24128,184,1120,161,684,5,586,824,17Object info:
* You must give your Opasnet username and password to upload data. The username will be stored together with the upload information.
*Object info contains the most important metadata about your data.
- Data source must be 1 when using AWP.
- Analytica identifier is ignored when using AWP.
- Ident is the page identifier in Opasnet. If your study or variable does not already have a page, you must create one. The identifier is found in the metadata box in the top right corner of the Opasnet page.
- Number of indices is the number of columns that contain explanatory information (see below).
- Parameter name is a common name for all data columns. If omitted, 'Parameter' is used. See below for more details.
- If "Probabilistic?" is 1, then each row of the data table is considered a random draw from a data pool. Note that it is assumed that the index values are assumed the same in all rows, and only the index values of the first row are stored.
- Append to upload: Typically, each data upload event is given a separate identifier. If you want to continue an existing upload of the same object, you can give the number of that upload, and the new data will be appended.284,408,-1276,1761,0,0,1,0,1,0,,0,Data structure:
* Data must be uploaded in the format of a two-dimensional table. The table has rows, one observation in each row, and columns (fields).
* There are two kinds of columns. A) Index columns (also called independent variables in statistics) contain determinants of the actual data, such as sex of the observed individuals, or the observation year. B) Parameter columns (also called dependent variables) contain the actual data about the observations, given the index information.
* The first row must contain the names of the columns, i.e. the indices and parameters. These names are used when creating indices in the Opasnet Base.284,128,-1276,961,0,0,1,0,1,0,,0,Observations:
* The data are copy-pasted into the field 'Observations'. The source of the data can be any spreadsheet or text processor, as long as each column is separated by a tab, and each row by a line break. Note that the pasted data should be between 'quotation marks'.284,640,-1276,481,0,0,1,0,1,0,,0,Data info:
Fill in the additional information about the data. These are asked for the object, and also for all the indices and the parameter. Note that is an entry with the identical Ident already exists in the Opasnet Base, this information will NOT be uploaded but the existing information will be used instead. All information should be between 'quotation marks' so that they are not mistakenly interpreted as Analytica node identifiers.
- Name: a description that may be longer than an identifier. This is typically identical to the respective page in Opasnet.
- Unit: unit of measurement.284,788,-1276,921,0,0,1,0,1,0,,0,Follow these instructions if you are using the Internet interface (AWP).284,20,-1276,121,0,0,1,0,1,0,,0,65535,65532,19661Uploading:
* There are two ways of uploading data. A) 'Upload data' is a public format, and all details are openly available. B) 'Upload non-public data' stores the actual data (the values in the parameter columns) into a database that requires a password for reading. However, all other information (including upload metadata and the data in the index fields) are openly available.284,944,-1276,561,0,0,1,0,1,0,,0,Provide general information:264,220,-1256,121,0,0,1,0,1,0,,0,65535,65532,19661<a href="http://en.opasnet.org/w/Image:Opasnet_base_connection.ANA">Wiki description</a>592,40,-148,28Choose the format of input data.264,356,-1256,121,0,0,1,0,1,0,,0,65535,65532,196611 Copy-paste a data tablektluser4. Febta 2010 7:10 48,2472,456,160,321,701,26,554,389,17Study or variable info0164,268,1112,121,0,0,1,0,0,0,78,0,152425,39321,65535Index_infoCopy-paste a data table. 304,168,-1252,1201,0,0,1,0,1,0,,0,2,693,146,476,224Providing upload data:304,36,-1252,121,0,0,1,0,1,0,,0,65535,65532,19661Observations0308,152,1248,801,0,0,1,0,0,0,366,0,152425,39321,65535Observations2TabIndex:3Data table1452,269,1104,131,0,0,1,0,0,0,72,0,1Data_tableCheck that your data table looks sensible.408,244,-1148,12Object info0160,245,1112,131,0,0,1,0,0,0,72,0,152425,39321,65535Object_info1_2View the uploaded dataThe largest id values for the selected Opasnet Base tables. The table is updated by pressing the R_cardinals button.get_mean(Object_info_for_lap[Info='Ident'])288,328,188,162,440,279,476,3322,193,270,416,303,0,MIDM2,43,59,735,421,0,MIDM39325,65535,39321[Sys_localindex('IN1'),Sys_localindex('IN2')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[Sys_localindex('IN3'),1,Sys_localindex('IN4'),1,Sys_localindex('IN5'),1,Sys_localindex('IN6'),1,Sys_localindex('IN7'),1,Sys_localindex('IN8'),13,Sys_localindex('IN2'),1,Sys_localindex('IN1'),1]3 Node to be formatted as data tablektluser4. Febta 2010 7:10 48,24328,456,160,321,729,57,382,341,17Columns['Age','Weight']224,272,148,12[Formnode Columns1]['Age','Weight']N_rows0172,125,1116,131,0,0,1,0,0,0,72,0,152425,39321,65535N_rowsFirst row must contain values, not column names!172,148,-1124,1001,0,0,1,0,1,0,,0,Analytica table0172,148,1116,121,0,0,1,0,0,0,72,0,152425,39321,65535Analytica_tableColumns0172,101,1116,131,0,0,1,0,0,0,72,0,1Columns2 Node formatted as data table:172,36,-1124,121,0,0,1,0,1,0,,0,65535,65532,19661Object info0172,172,1116,131,0,0,1,0,0,0,72,0,152425,39321,65535Object_info1_2Study or variable info0172,196,1116,121,0,0,1,0,0,0,78,0,152425,39321,65535Index_info4 Ready-made data-table nodektluser4. Febta 2010 7:10 48,24456,456,160,321,770,118,445,300,17Data table40148,37,1100,131,0,0,1,0,0,0,72,0,152425,39321,65535Data_table4Model detailsktluser4. Febta 2010 7:10 48,24576,784,148,241,0,0,1,1,1,0,,0,1,419,46,615,547,17Writerjtue24. maata 2009 9:36 48,24184,40,148,241,559,13,690,439,17W locMakes a table to be written to the Loc table.var a:= Locations;
var b:= a[.j='obj_id_i'];
var c:= cardinals[table1='loc']+a[@.j=1];
a:= array(a.j,[c, c, findid(b,obj,'ident'), a, a, a]);
textify(a)432,240,148,162,84,125,476,2452,642,68,606,278,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0100,1,1,1,1,9,2970,2100,15,0[Sys_localindex('I'),16,Sys_localindex('I'),1,Sys_localindex('J'),1]W loccellSlices fields that are needed in the Locres table from Inp_locres.var a:= Loccells;
var b:= textify(findid(a[.j='id'], obj, 'ident'));
var c:= textify(a[.j='loc_id']);
b:= findid(b&'+'&c, (if Loc.j='obj_id_i' then Loc&'+'&Loc[.j='location'] else Loc), 'obj_id_i');
a:= array(a.j,[(@a.i+cardinals[table1='loccell']), (a+cardinals[table1='cell']), b]);
textify(a)432,328,148,162,776,90,476,4872,178,73,453,537,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0W cellSlices the fields that are needed in the Res table. Removes duplicate rows.var a:= Cells;
a:= array(a.j, [
a[.j='id']+cardinals[table1='cell'],
actobj_stat[@actobj_stat1=lap], a, a, a]);
textify(a)432,280,148,162,759,203,476,3792,14,241,659,368,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0W objSelects relevant information for the Obj table from Objects1 node.var a:= Objects;
var b:= if a[.j='ident'] = 0 then -1 else a[.j='ident'];
b:= findid(b, obj, 'ident');
b:= if b='0' then cardinals[table1='obj']+a[.j='id'] else b;
a:= if a.j='id' then b else a;
textify(a)432,160,148,162,372,300,476,3432,429,135,626,444,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[]W actMakes a list of objects that contains some additional information to be written into the Objinfo table.var a:= Acts;
a:= if a.j='id' {or a.j='series_id'} then a+cardinals[table1='act'] else a;
a:= if a=null or a=0 then '' else a&''432,200,148,162,66,82,476,3402,34,242,690,459,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[Sys_localindex('J'),1,Sys_localindex('I'),1,Sys_localindex('J'),1]W resvar a:= Results;
index i:= subset(if a[.j='result']=null and a[.j='description']=0 then 0 else 1);
a:= a[.i=i];
a:= array(a.j, [textify(a.i+Cardinals[table1='res']), textify(a+ Cardinals[table1='cell']), textify(a),a,a]);
if a=null then '' else a432,368,148,132,629,191,582,2972,461,218,609,375,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[]Object info for lapAdditional information for each index and decision node. Description node is the name of a node containing information about the locations of the index. It must be indexed by the index.Object_info[N_vars=Lap]176,336,148,202,140,217,476,2242,653,25,488,226,0,MIDM2,104,359,460,228,0,MIDM52425,39321,65535[N_vars,Info][N_vars,Info][1,1,1,0]Index infoTable(Ind_info,Indices)384,32,148,162,102,90,476,3492,559,220,666,349,0,MIDM2,184,194,660,316,0,MIDM[Formnode Study_or_variable_i2, Formnode Study_or_variable_i1, Formnode Study_or_variable_i3]52425,39321,65535[Ind_info,Indices][Ind_info,Indices][]Ind info['name','unit']384,56,148,13[]LoccellsMakes a list of all locations in all results in all variables. The list is as long as is needed for the Loccell table. A subset is taken then for the Cell table.
1) Initialises local variables, and slices variables from Object1.
2)-4) Does the process for each variable one at a time. This happens in function Loccell.
5) Makes i the row index.var a:= Data_table;
index h:= a.j[@.j=1..size(a.j)-2];
a:= a[.j=h];
var d:= max(Data_table[.j='obs'],Data_table.i);
a:= if 1-proba then
(index itemp:= copyindex(a.i); a[.i=itemp]) else (
index grun:= 1..d;
index itemp:= 1..size(a.i)/d;
a:= a[@.i=(itemp-1)*d+grun];
a:= a[@grun=1]);
index j:= ['id', 'cell_id', 'loc_id'];
index i:= 1..size(a);
a:= array(j,[h, @a.itemp, a]);
concatrows(a,h,a.itemp,i)320,328,148,162,643,26,526,5962,70,181,552,488,0,MIDM[Sys_localindex('J'),Sys_localindex('I'),Undefined,Undefined,Undefined,1]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[][Sys_localindex('J'),2,Sys_localindex('ITEMP'),1,Sys_localindex('H'),1]ResultsThe usage of local variables: a: the temporary variable that is being edited. e: cardinal of the Cell table. f: cardinal of the Res table. j: output column headings. i: output row numbers. NOTE! ONLY THE DETERMINISTIC VERSION WORKS AT THE MOMENT.
1) Only one piece of information (Observations) is included.
2)-5) The process is done for each variable one at a time (this is indexed by x).
3) Several within-loop local variables are initiated.
4) The variable is given index runn which is equal to run if probabilistic and [0] if not. The array is flattened first to 2-D, the value only is kept.
5) Variables are concatenated to each other.
6) Index i is made the index of the implicit index.
NOTE! This node MUST be formatted to Integer, otherwise Res_id will be stored in a wrong format.var e:= 0;
var f:= 0;
var a:= Data_table[.j='result'];
var d:= max(Data_table[.j='obs'],Data_table.i);
var b:= if 1-proba then @a.i else (
floor((@a.i-1)/d)+1);
index j:= ['id','cell_id','obs','result','restext'];
array(j,[0, b, Data_table[.j='obs'], (if istext(a) then '' else a) , (if istext(a) then a else '')])320,368,148,162,634,23,581,6152,662,12,469,411,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[Run,2,Sys_localindex('J'),1,Sys_localindex('I'),1]LocationsThe format of this node MUST be integer, so that the id and Roww values are stored correctly.var a:= data_table;
var b:= [0];
var c:= [0];
var x:= 1;
while x<= size(a.j)-2 do (
var h:= a[@.j=x];
var d:= h[.i=unique(h,h.i)];
b:= concat(b,d);
c:= concat(c,(if d=0 then slice(a.j,x) else slice(a.j,x)));
x:= x+1);
index i:= 1..size(b)-1;
index j:= ['id', 'std_id', 'obj_id_i', 'location', 'description'];
a:= array(j,[i, i, slice(c,i+1), slice(b,i+1), ''])320,240,148,162,68,138,476,5812,92,398,746,259,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[Sys_localindex('D'),1,Object_all3,1,Age,1]Data table{var N_indices:= Object_info_for_lap[Info='number of indices'];
var b:= }
evaluate('Data_table'&selecttext(Data_source,1,1))
{;
var a:= if b=1 then Data_table1 else if b=2 then analytica_table else analytica_node;
if b>=3 then a else (
index h:= a.columns[@a.columns=1..N_indices];
var c:= Object_info_for_lap[Info='parameter name', @N_vars=1];
c:= if c='' or c=0 then 'parameter' else c;
index j:= concat(h,[c,'result','obs']);
index parameter:= a.columns[@a.columns=N_indices+(1..size(a.columns)-N_indices)];
index temp:= 1..size(a.rows)*size(parameter);
var conv:= if j='result' then @parameter+N_indices else @j;
a:= a[@.columns=conv];
a:= if @j=size(j)-2 then parameter else a;
a:= if @j=size(j) then @a.rows else a;
a:= concatrows(a, parameter, a.rows, temp);
a:= if j='result' then
(var d:= a[j='result']; if evaluate(d)=null then d else evaluate(d)) else a;
index i:= Subset(a[j='result']<>null);
a[temp=i]);
}176,208,148,162,4,175,482,5012,762,82,521,338,0,MIDM[Formnode Data_table8][Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[1,1,1,0][Sys_localindex('I'),1,Sys_localindex('J'),1]Info['Analytica identifier','ident','name','unit','number of indices','parameter name','probabilistic?']240,48,148,132,102,90,476,3792,90,166,416,303,0,MIDM[]['Analytica identifier','ident','name','unit','number of indices','parameter name','probabilistic?']Objects19.10.2009 Jouni Tuomisto
The Run/Name = Method cell is problematic. It was designed for one-variable uploads, and now it contains both upload-specific and variable-specific information. This should be solved somehow but I don't know how. So, I just make it technically work and don't worry about it now. Some variable-specific info is omitted, some is taken from the first variable.
5.1.2010 Jouni Tuomisto
Variable-specific parts are simply rejected.Index j:= ['id','ident','name','unit','objtype_id','page','wiki_id'];
index i:= concat(N_vars,indices);
var Ident:= if @i <= size(N_vars) then Object_info[Info='ident', @N_vars=@i] else i;
var a:= Index_info[indices=i, Ind_info=j];
a:= if a=null then '' else a;
var e:= Object_info[N_vars=i, Info=j];
a:= if e=null then a else e;
var b:= sum(findintext(wikis,ident)*@wikis,wikis);
var c:= if b=0 then '' else wikis[@wikis=b];
c:= if b=0 then '2664' else selecttext(ident,1+textlength(c));
a:= array(j,[
@i,
ident,
a,
a,
if @i<= size(N_vars) then 1 else 6,
if i='run' then '2817' else c&'',
if b=0 then '1' else b&''])320,160,148,162,573,29,547,7242,11,31,656,283,0,MIDM[Sys_localindex('J'),Sys_localindex('I')][Indices,1,Sys_localindex('J'),1,Sys_localindex('I'),1]Observations'Test1 Value
1 2nh
2 30'64,256,152,162,586,79,476,465[Formnode Observations3]52425,39321,65535Data table1var a:= splittext(textreplace(Observations2, chr(10),'',true),chr(13));
index i:= 1..size(a);
a:= slice(a,i);
a:= splittext(a, chr(9));
index j:= 1..size(a)/size(i);
for y:= i do (slice(a[i=y],j))var a:= splittext(textreplace(Observations2, chr(10),'',true),chr(13));
index columns:= splittext(slice(a,1), chr(9));
index rows:= 1..size(a)-1;
a:= slice(a,rows+1);
a:= splittext(a, chr(9));
a:= for y:= rows do (slice(a[rows=y],@columns));
indexify(a)64,208,148,162,7,115,476,3622,761,412,476,386,0,MIDM[Sys_localindex('J'),Sys_localindex('I')][1,1,1,0]TestvariableTable(Time,Testindex)(
uniform(0,1),
uniform(1,2),
uniform(2,3)
)544,440,148,242,40,50,416,303,0,MIDM[Time,Testindex][Time,Testindex][1,0,0,0]Testindex['item 1']544,472,148,122,102,90,476,224['item 1']W cellsecSlices the fields that are needed in the Res table. Removes duplicate rows.(if w_cell.j = 'mean' then '' else W_cell)544,280,148,162,782,213,476,3792,41,191,618,368,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0CellsMakes a list of all locations in all results in all variables. The list is as long as is needed for the Loccell table. A subset is taken then for the Cell table.
1) Initialises local variables, and slices variables from Object1.
2)-4) Does the process for each variable one at a time. This happens in function Loccell.
5) Makes i the row index.var a:= Data_table[@.j=size(Data_table.j)-1];
index j:= ['id', 'actobj_id', 'mean', 'sd', 'n'];
var d:= max(Data_table[.j='obs'],Data_table.i);
index temp:= ['mean','sd'];
a:= if 1-proba then array(temp,[a,'']) else (
index grun:= 1..d;
index i:= 1..size(a.i)/d;
a:= a[@.i=(i-1)*d+grun];
a:= array(temp,[mean(a,grun), sdeviation(a[j='mean'],grun)]) );
a:= array(j,[
@a.i,
'',
a[temp='mean'],
a[temp='sd'],
d])320,280,148,162,721,20,526,6392,304,464,608,328,0,MIDM[Sys_localindex('J'),Sys_localindex('I'),Undefined,Undefined,Undefined,1]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[][N_vars,2,Sys_localindex('I'),1,Sys_localindex('J'),1]Data table219.10.2009 Jouni Tuomisto
If the variable is deterministic, Obs is 0. It is not clear whether it should be or not. This should be checked with other upload methods (1-3) to see that they are consistent.var a:= Object_info_for_lap[Info='Analytica identifier'];
index jtemp:= concat(indexnames(getfract(evaluate(a),0.5)),['result','obs']);
index j:= textreplace(jtemp,'.','');
a:= if proba then sample(evaluate(a)) else evaluate(a);
index temp:= concat(indexnames(a),['result']);
index i:= 1..size(a);
a:= Mdarraytotable(a, i, temp);
a:= if j='obs' and proba then a[temp='Run'] else a[temp=jtemp];
a:= a[@jtemp = @j];
a:= if a=null then 0 else a64,336,148,202,53,195,476,4442,56,66,630,303,0,MIDM[Sys_localindex('I'),Sys_localindex('J')][1,1,1,0][N_vars,1,Sys_localindex('J'),1,Sys_localindex('I'),1]Probavar a:= Object_info_for_lap[Info='probabilistic?'];
(a=1 or a='Yes' or a='Y' or a='yes' or a='y')176,392,148,16Data sourceChoice(Self,4,False)176,160,148,162,102,90,476,224[Formnode Data_source1]52425,39321,65535['1 Copy-paste table','2 Analytica model','3 Node to be formatted as data table','4 Ready-made data table node'][1,1,0,0]N vars1.. (if selecttext(Data_source,1,1)='3' then N_variables else 1)240,72,148,12[][1]N variables1240,96,148,12[Formnode N_variables1]52425,39321,65535Lap164,392,148,16[0,1,0,1]Indicescopyindex(Find_ind)384,76,148,122,140,321,476,4092,40,50,416,303,0,MIDM[]Test2Table(Self)(
1,2,3)['item 1','item 2','item 3']544,384,148,24[1,1,0,1]Object infoAdditional information for each index and decision node. Description node is the name of a node containing information about the locations of the index. It must be indexed by the index.Table(Info,N_vars)(
'Excess_risk_of_iugr_',
'Op_en2693',
'WHO mortality data',
'#',
1,
'Weight',
1
)240,24,148,162,140,217,476,2242,277,418,982,328,0,MIDM2,590,303,460,228,0,MIDM52425,39321,65535[Info,N_vars][N_vars,Info][][1,1,1,0]Analytica tableTable(Columns,Rows)(
1,2,3,
4,5,6
)64,80,148,242,248,258,416,303,0,MIDM[Formnode Analytica_table2]52425,39321,65535[Columns,Rows][Columns,Rows]Rows1..N_rows64,112,148,12[1,2,3]364,136,148,121,1,1,1,1,1,0,0,0,0[Formnode N_rows1]52425,39321,65535Acts5.1.2010 Jouni Tuomisto
I separated Acts and Objects.Index j:= ['id', 'acttype_id','who','comments'];
index i:= ['create','upload'];
var a:= array(j,[
@i,
array(i,[1, (if selecttext(replace_data_,1,1)='Y' then 4 else 5)]),
opasnet_username,
if i ='upload' then 'Analytica '&Analyticaedition&', ('&Analyticaplatform&'), Version: '&textify(Analyticaversion) else '']);
a320,200,148,162,29,37,525,7242,88,339,694,283,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]['',''][Self,1,Sys_localindex('I'),1,Sys_localindex('J'),1]Upload type 1.64,224,-156,561,0,0,1,0,1,0,,0,Upload type 2.64,84,-156,761,0,0,1,0,1,0,,0,Upload type 2.120,356,-1112,601,0,0,1,0,1,0,,0,W actobjMakes a list of objects that contains some additional information to be written into the Objinfo table.var a:= actobj2;
if a.j='series_id' and acts[.j= 'acttype_id', .i='upload'] = 5 then Series[.i = a.i] else a;592,112,148,162,250,25,476,3402,44,195,690,459,0,MIDM65535,45873,39321[Sys_localindex('J'),Sys_localindex('I')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[][Sys_localindex('J'),1,Sys_localindex('I'),1,Sys_localindex('J'),1]Find indvar a:= Data_table.j[@.j=1..(size(Data_table.j)-2)];
a:= jointext(a,,',');
var b:= Object_info[Info='Analytica identifier'];
var c:= ['Run'];
var x:= 1;
while x<=size(b) do (
c:= concat(c,indexnames(evaluate(slice(b,x))));
x:= x+1);
c:= textreplace(c, '.' , '');
index temp:= 1..size(c);
c:= slice(c, temp);
c:= c[temp= unique(c,temp)];
index i:= 1..(size(c)-1);
c:= slice(c, i+1);
b:= jointext(c,c.i,',');
a:= if selecttext(Data_source,1,1)='3' then b else a;
splittext(a,',')384,104,148,122,102,90,476,385[Self,Sys_localindex('I')]['Run']Actobj statTable(Actobj_stat1)(
'602','603'
)544,216,148,16Actobj stat[1,2]544,240,148,12[1,2]Seriesfor x[]:= actobj2.i do (
var a:= query('
SELECT MAX(act.id)
FROM actobj
LEFT JOIN act ON actobj.act_id = act.id
WHERE obj_id = '&chr(39)&actobj2[.j = 'obj_id', .i = x]&chr(39)&'
AND acttype_id = 4
');
a[@.j = 1, @.i=1] )480,112,148,122,258,57,416,303,0,MIDM39325,65535,39321[Sys_localindex('I'),Sys_localindex('J')]Actobj2index j:= ['id', 'act_id', 'obj_id', 'series_id'];
var a:= W_obj;
var b:= a[.j = 'id']= textify(@a.i+cardinals[table1='obj']);
index k1:= subset(b);
b:= array(j, ['', w_act[@.j=1, @.i=1], a[.i = k1, .j='id'], '' ]);
index k2:= subset(a[.j='objtype_id']='1');
a:= array(j, ['', w_act[@.j=1, @.i=2], a[.i =k2, .j='id'], w_act[@.j=1, @.i=2] ]);
index i:= 1..(size(k1)+size(k2));
a:= concat(a, b, k2, k1, i);
if j='id' then textify(i+cardinals[table1='actobj']) else a544,160,148,162,83,399,416,303,0,MIDM[Sys_localindex('I'),Sys_localindex('J')][Sys_localindex('I'),1,Sys_localindex('J'),1,Sys_localindex('I'),1]Data table4Va1432,408,148,162,4,175,482,5012,17,71,736,338,0,MIDM[Formnode Data_table5]52425,39321,65535[Sys_localindex('I'),Sys_localindex('J')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[1,1,1,0][Sys_localindex('I'),1,Sys_localindex('J'),1]Data table3{var N_indices:= Object_info_for_lap[Info='number of indices'];
var b:= evaluate(selecttext(Data_source,1,1));}
var a:= {if b=1 then Data_table1 else if b=2 then} analytica_table {else analytica_node};
indexify(a)
{if b>=3 then a else (
index h:= a.columns[@a.columns=1..N_indices];
var c:= Object_info_for_lap[Info='parameter name', @N_vars=1];
c:= if c='' or c=0 then 'parameter' else c;
index j:= concat(h,[c,'result','obs']);
index parameter:= a.columns[@a.columns=N_indices+(1..size(a.columns)-N_indices)];
index temp:= 1..size(a.rows)*size(parameter);
var conv:= if j='result' then @parameter+N_indices else @j;
a:= a[@.columns=conv];
a:= if @j=size(j)-2 then parameter else a;
a:= if @j=size(j) then @a.rows else a;
a:= concatrows(a, parameter, a.rows, temp);
a:= if j='result' then
(var d:= a[j='result']; if evaluate(d)=null then d else evaluate(d)) else a;
index i:= Subset(a[j='result']<>null);
a[temp=i]);
}64,40,148,162,4,175,482,5012,17,71,736,338,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[1,1,1,0][Sys_localindex('I'),1,Sys_localindex('J'),1](a)Indexifyvar N_indices:= Object_info_for_lap[Info='number of indices'];
index h:= a.columns[@a.columns=1..N_indices];
var c:= Object_info_for_lap[Info='parameter name', @N_vars=1];
c:= if c='' or c=0 then 'parameter' else c;
index j:= concat(h,[c,'result','obs']);
index parameter:= a.columns[@a.columns=N_indices+(1..size(a.columns)-N_indices)];
index temp:= 1..size(a.rows)*size(parameter);
var conv:= if j='result' then @parameter+N_indices else @j;
a:= a[@.columns=conv];
a:= if @j=size(j)-2 then parameter else a;
a:= if @j=size(j) then @a.rows else a;
a:= concatrows(a, parameter, a.rows, temp);
a:= if j='result' then
(var d:= a[j='result']; if evaluate(d)=null then d else evaluate(d)) else a;
index i:= Subset(a[j='result']<>null);
a[temp=i]536,56,148,242,485,116,476,423aindex j:= ['Country','Year','Diagnosis','Sex','Age','Deaths'];
index i:= 1..10;
array(j,i,["Seychelles","2001","AAA","Male","0-365 days","8",
"Seychelles","2001","AAA","Female","0-365 days","11",
"Seychelles","2001","A00-B99","Male","0-365 days","0",
"Seychelles","2001","A00-B99","Female","0-365 days","0",
"Seychelles","2001","A00","Male","0-365 days","0",
"Seychelles","2001","A00","Female","0-365 days","0",
"Seychelles","2001","A09","Male","0-365 days","0",
"Seychelles","2001","A09","Female","0-365 days","0",
"Seychelles","2001","A01-A08","Male","0-365 days","0",
"Seychelles","2001","A01-A08","Female","0-365 days","0"])544,328,148,242,264,274,617,303,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]Readerktluser3. Augta 2008 18:31jtue9. lokta 2008 14:01 48,24312,40,148,241,1,1,1,1,1,0,0,0,01,601,119,477,429,17Arial, 15(vident:text, seriesid:optional)Read meanReads the mean data about the vident variable from the Opasnet Base. Uses the run with runid as run.id if specified; otherwise uses the newest run of that variable.
PARAMETERS:
* Vident: the ident of the variable in the Opasnet Base.
* Runid: the id of the run from which the results will be brought. If omitted, the newest result will be brought.
Change
run to actif isnotspecified(seriesid) or istext(seriesid) then seriesid:= Newest_series(vident);
query( '
SELECT obj.ident, obj.name, obj.unit, cell.id as cell_id, mean, sd, n, act_id, comments, time, std.location, ind.ident AS iident, ind.name AS iiname, actobj.series_id
FROM obj
LEFT JOIN actobj ON obj.id = actobj.obj_id
LEFT JOIN act ON act.id = actobj.act_id
LEFT JOIN cell ON cell.actobj_id = actobj.id
LEFT JOIN loccell ON loccell.cell_id = cell.id
LEFT JOIN loc ON loccell.loc_id = loc.id
LEFT JOIN loc as std ON loc.std_id = std.id
LEFT JOIN obj as ind ON std.obj_id_i = ind.id
WHERE obj.ident = '&chr(39)&vident&chr(39)&'
AND actobj.series_id = '&chr(39)&seriesid&chr(39)
)56,80,148,122,585,25,516,58939325,65535,39321vident,seriesid(vident:text)Newest seriesThis function checks for the newest result (according to run_id) of the variable. The function is used if the user does not define the run_id as an optional parameter in functions Read_mean and Read_sample.
PARAMETERS:
* Vident: the Ident of the variable in the Opasnet Base.var a:= query('
SELECT actobj.series_id, var.ident
FROM obj AS var
LEFT JOIN actobj ON var.id = actobj.obj_id
LEFT JOIN act ON actobj.act_id = act.id
WHERE var.ident = "'&vident&'"
');
max(a[@.j=1],a.i)56,22,148,222,678,59,476,56639325,65535,39321vident(vident:text, seriesid:optional)Read sampleReads the sample data about the vident variable from the Opasnet Base. Uses the runident run if specified; otherwise uses the newest run of that variable.
PARAMETERS:
* Vident: the name of the variable in the Opasnet Base.
* Runid: the id of the run from which the results will be brought. If omitted, the newest result will be brought.
chenge
run to act
add restextif isnotspecified(seriesid) or istext(seriesid) then seriesid:= Newest_series(vident);
query( '
SELECT obj.id AS obj_id, obj.ident, obj.unit, ind.ident as iident, cell.id AS cell_id, location, mean, n, obs, result, restext
FROM obj
LEFT JOIN actobj ON actobj.obj_id = obj.id
LEFT JOIN act ON actobj.act_id = act.id
LEFT JOIN cell ON cell.actobj_id = actobj.id
LEFT JOIN loccell ON loccell.cell_id = cell.id
LEFT JOIN loc ON loccell.loc_id = loc.id
LEFT JOIN obj as ind ON loc.obj_id_i = ind.id
LEFT JOIN res ON res.cell_id = cell.id
WHERE obj.ident = '&chr(39)&vident&chr(39)&'
AND actobj.series_id = '&chr(39)&seriesid&chr(39)
)56,112,148,222,55,35,516,61239325,65535,39321vident,seriesidEnter variable Ident'Op_en1912'168,83,148,27[Formnode Enter_variable1]52425,39321,65535Enter variable0288,24,1176,131,0,0,1,0,0,0,170,0,152425,39321,65535Enter_variableNewest seriesNewest_series(Enter_variable)288,61,148,222,200,56,416,303,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]Var inforead_mean(Enter_variable)288,116,148,122,28,65,1144,438,0,MIDM[Sys_localindex('J'),Sys_localindex('I')](a,b,x)MakeindThe input table a must have a structure that is also used as input for MDTable function. The function removes one column with location information and makes a dimension (index) with the locations in the column. Inde is the (local) index that will be added. Note that unlike MDTable function, this can use local indices in the output.index inde / slice(b.m, x) := b[.n = unique(b[@.m = x], b.n), @b.m = x];
a:= if inde = a[@.m=1] then a else 0;
index m:= slice(a.m,(2..size(a.m)));
a:= a[.m=m]56,192,148,122,61,72,476,454a,b,x(a)Get cell_idMakes a multi-dimensional array with the same structure as the original variable that was stored into the Opasnet Base. The contents of the array are the cell_ids of the variable. The input parameter must be a 2D table with the structure that comes from the Read_mean function.
1) Slices the necessary columns from the input table and converts that to a 2D table that has the same structure as is used for input to the function MDTable.
2) Defines the local indices, and changes a location column to a dimension one at a time until all columns have been changed.
NOTE! There is a problem that if there are two or more cells with the exactly same locations, only the one with a largest cell_id will be taken.index k:= ['iident','location','cell_id', 'act_id'];
a:= a[.j=k];
a:= if a.k = 'iident' then textreplace(a, ' ', '_', true) else a;
index L:= a[@k=1]&'+'&textify(a[@k=3]);
index m:= concat(a[.i=unique(a[@k=1],a.i), @k=1],['act_id', 'result']);
index n:= a[.i=unique(a[@k=3],a.i), @k=3];
a:= a[@.i=@L];
var c:= a[L=(m)&'+'&textify(n), @k=4, @m=1];
a:= a[L=(m)&'+'&textify(n), @k=2];
a:= if m='result' then n else a;
a:= if m='act_id' then c else a;
var b:= a;
var x:= 1;
a:= while x< size(b.m) do (
a:= makeind(a,b,x);
x:= x+1;
a);
a:= max(a[@.m=1], a.n);
if size(a.act_id)=1 then a[@.act_id = 1] else a56,168,148,132,160,51,476,628aVar meanget_mean(Enter_variable)288,140,148,122,835,77,420,564,0,MIDM[Sys_localindex('ACT_ID'),Sys_localindex('MONTH')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[Sys_localindex('M'),1,Sys_localindex('N'),1,Sys_localindex('ACTION'),1](vident:text, runident:optional)Get meanGives the mean result of a (multidimensional) variable stored in the Opasnet Base. The procedure is simple because it utilises the variable structure (with res_ids) derived by the get_res_id function.var a:= read_mean(vident, runident);
index o:= a[.j='cell_id'];
index j:= ['mean','sd'];
var output:= a[@.i=@o, .j = j];
a:= Get_cell_id(a);
{output[o=a]}56,216,148,122,114,117,476,428vident,runident(vident:text, runident:optional)Get sampleGives the sample result of a (multidimensional) variable stored in the Opasnet Base. The procedure is simple because it utilises the variable structure (with res_ids) derived by the get_res_id function.
Note that if the Analytica samplesize is smaller than the samplesize stored in the Opasnet Base, the extra samples will be discarded. If the samplesize is larger, the remaining rows will be null.
1) Brings the data into the right structure.
2) Chooses whether the actual result is numerical (in the Result column) or text (in the Description column).var a:= read_sample(vident, runident);
var b:= textify(Get_cell_id(read_mean(vident,runident)));
index k:= textify(a[.j='cell_id'])&'+'&textify(a[.j='obs']);
index runn:= min(a[.j='obs'],a.i)..max(a[.j='obs'],a.i);
a:= if a[.j='restext'] = '' then a[.j='result'] else a[.j='restext'];
a:= a[@.i=@k];
a:= a[k=b&'+'&runn];
a:= if max(runn)=0 then a[@runn=1] else a[@runn=@run];56,240,148,122,613,48,476,556vident,runidentVar sampleget_sample(Enter_variable)288,164,148,122,86,111,476,2242,18,155,646,307,0,MEAN[Sys_localindex('OP_EN1899'),Sys_localindex('SALMON')][Sys_localindex('OP_EN1898'),1,Sys_localindex('YEAR'),1,Sys_localindex('SALMON'),1,Sys_localindex('OP_EN1899'),1]Var run infoDescribes the runs of the defined variable. This should be made a function.var_run_info(Enter_variable)288,92,148,122,41,152,1235,369,0,MIDM[Sys_localindex('J'),Sys_localindex('I')](vident:text)Var run infoThis function checks for the newest result (according to run_id) of the variable. The function is used if the user does not define the run_id as an optional parameter in functions Read_mean and Read_sample.
PARAMETERS:
* Vident: the Ident of the variable in the Opasnet Base.
Change:
objinfo to act
run to act
add objactquery( '
SELECT obj.id AS ovj_id, obj.ident, obj.name, obj.unit, actobj.series_id, actobj.act_id, comments, act.time, act.who
FROM obj
LEFT JOIN actobj ON obj.id = actobj.obj_id
LEFT JOIN act ON act.id = actobj.act_id
WHERE obj.ident = '&chr(39)&vident&chr(39)&'
')56,56,148,132,182,31,476,56639325,65535,39321videntUse these functions to retireve data from the Opasnet Base:
* Newest_series: finds the newest upload of the object.
* Obj_act_info: Finds the action information of the object.
* Read_mean: Reads the means of each cell.
* Get_mean: Makes read_mean table into an array.
* Read_sample: Reads the whole sample.
* Get_sample: Makes read_sample table into a probabilistic array.280,294,-1168,110(a:text)QueryPerforms a query and results the standard table with columns .j and rows .i.Lap;
index i:= DBquery(Odbc,a);
index j:= dblabels(i);
dbtable(i,j)56,144,148,132,100,154,476,56639325,65535,39321aWikisNames of different wikis used.Table(Self)(
'Op_en','Op_fi','Heande','En','Fit','Erac','Beneris','Intarese','Piltti','Kantiva','Bioher','Heimtsa')[1,2,3,4,5,8,9,10,11,13,14,15]184,168,148,1665535,52427,65534[Self][](a)TextifyChanges a number to a text value with up to 15 significant numbers. This bypasses the number formatting problem that tends to convert e.g. 93341 to '93.34K'. If the input is null, the result is ''.if a = null then '' else a&''72,376,148,122,309,205,559,372a2,F,4,14,0,0,4,0,$,0,"ABBREV",0(a; file:texttype)Tablefya:= '"'&a&'"';
a:= jointext(a,a.j,';');
Writetextfile('c:\temp\'&file, a)72,352,148,132,44,303,476,22465535,45873,39321a,file2,F,4,14,0,0,4,0,$,0,"ABBREV",0Concatenation UDFsThis library contains functions to make various instances of concatenation more convenient. Concat3 thru Concat10 are generalizations of the built-in Concat function which concatenate from 3 to 10 arrays in a single call (while the built-in Concat concatenates two arrays). ConcatRows concatenates all the rows of a single array.David Kendall & Lonnie ChrismanMon, Jan 26, 2004 8:49 AMLonnieWed, Sep 05, 2007 3:23 PM48,24488,40,168,201,0,0,1,1,1,0,0,0,01,50,200,488,454,23(A1, A2, A3: ArrayType; I1, I2, I3, J: IndexType )Concat3Concatenates three arrays, A1, A2, and A3. I1, I2, and I3 are the indexes that are joined; J is the index of the new array; J usually is the concatenation of I1, I2, and I3Index I12 := Concat(I1,I2);
Concat( Concat( A1,A2,I1,I2,I12 ), A3, I12, I3, J )88,64,148,262,56,56,986,596A1,A2,A3,I1,I2,I3,J(A1, A2, A3, A4: ArrayType; I1, I2, I3, I4, J: IndexType )Concat4Concatenates four arrays, A1, A2, A3, and A4. I1, I2, I3, and I4 are the indexes that are joined; J is the index of the new array; J usually is the concatenation of I1, I2, I3, and I4.Index I12 := Concat(I1,I2);
Index I123:= Concat(I12, I3);
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, J);
192,64,148,242,30,30,986,596A1,A2,A3,A4,I1,I2,I3,I4,J0(A1, A2, A3, A4, A5, A6, A7, A8, A9: ArrayType; I1, I2, I3, I4, I5, I6, I7, I8, I9, J: IndexType)Concat9Concatenates nine arrays, A1, ..., A9. I1, ..., I9 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I9.Index I12 := Concat(I1,I2);
Index I123 := Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Index I12345 := Concat(I1234, I5);
Index I123456 := Concat(I12345, I6);
Index I1234567 := Concat(I123456, I7);
Index I12345678 := Concat(I1234567, I8);
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, I12345),
A6, I12345, I6, I123456),
A7, I123456, I7, I1234567),
A8, I1234567, I8, I12345678),
A9, I12345678, I9, J);88,232,148,242,27,120,469,638A1,A2,A3,A4,A5,A6,A7,A8,A9,I1,I2,I3,I4,I5,I6,I7,I8,I9,J0(A1, A2, A3, A4, A5: ArrayType; I1, I2, I3, I4, I5, J: IndexType )Concat5Concatenates five arrays, A1, ..., A5. I1, ..., I5 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I5.Index I12 := Concat(I1,I2);
Index I123:= Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, J);88,120,148,242,160,160,986,596A1,A2,A3,A4,A5,I1,I2,I3,I4,I5,J(A1, A2, A3, A4, A5, A6: ArrayType; I1, I2, I3, I4, I5, I6, J: IndexType )Concat6Concatenates six arrays, A1, ..., A6. I1, ..., I6 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I6.Index I12 := Concat(I1,I2);
Index I123:= Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Index I12345 := Concat(I1234, I5);
Concat(
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, I12345),
A6, I12345, I6, J);192,120,148,242,644,94,602,712A1,A2,A3,A4,A5,A6,I1,I2,I3,I4,I5,I6,J0(A1, A2, A3, A4, A5, A6, A7: ArrayType; I1, I2, I3, I4, I5, I6, I7, J: IndexType )Concat7Concatenates seven arrays, A1, ..., A7. I1, ..., I7 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I7.Index I12 := Concat(I1,I2);
Index I123:= Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Index I12345 := Concat(I1234, I5);
Index I123456 := Concat(I12345, I6);
Concat(
Concat(
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, I12345),
A6, I12345, I6, I123456),
A7, I123456, I7, J);88,176,148,242,580,98,551,565A1,A2,A3,A4,A5,A6,A7,I1,I2,I3,I4,I5,I6,I7,J(A1, A2, A3, A4, A5, A6, A7, A8: ArrayType; I1, I2, I3, I4, I5, I6, I7, I8, J: IndexType )Concat8Concatenates eight arrays, A1, ..., A8. I1, ..., I8 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I8.Index I12 := Concat(I1,I2);
Index I123:= Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Index I12345 := Concat(I1234, I5);
Index I123456 := Concat(I12345, I6);
Index I1234567 := Concat(I123456, I7);
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, I12345),
A6, I12345, I6, I123456),
A7, I123456, I7, I1234567),
A8, I1234567, I8, J);192,176,148,242,12,98,561,737A1,A2,A3,A4,A5,A6,A7,A8,I1,I2,I3,I4,I5,I6,I7,I8,J0(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10: ArrayType; I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, J: IndexType)Concat10Concatenates ten arrays, A1, ..., A10. I1, ..., I10 are the indexes joined; J is the index of the new array; J usually is the concatenation of I1, ..., I10.Index I12 := Concat(I1,I2);
Index I123 := Concat(I12, I3);
Index I1234 := Concat(I123, I4);
Index I12345 := Concat(I1234, I5);
Index I123456 := Concat(I12345, I6);
Index I1234567 := Concat(I123456, I7);
Index I12345678 := Concat(I1234567, I8);
Index I123456789 := Concat(I12345678, I9);
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat(
Concat( A1,A2,I1,I2,I12 ),
A3, I12, I3, I123),
A4, I123, I4, I1234),
A5, I1234, I5, I12345),
A6, I12345, I6, I123456),
A7, I123456, I7, I1234567),
A8, I1234567, I8, I12345678),
A9, I12345678, I9, I123456789),
A10, I123456789, I10, J);192,232,148,242,542,93,632,744A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,J0(A : ArrayType ; RowIndex,ColIndex,ResultIndex : IndexType)ConcatRows (A,I,J,K)Takes an array, A indexed by RowIndex & ColIndex, and concatenates each row, henceforth flattening the array by one dimension. The result is indexed by ResultIndex, which must be an index with size(RowIndex) * size(ColIndex) elements.index L := [ identifier of RowIndex, identifier of ColIndex, "val"];
slice(Mdarraytotable(A,ResultIndex,L),L,3)320,64,164,242,499,85,478,348A,RowIndex,ColIndex,ResultIndexODBC LibraryLonnieThu, Sep 11, 1997 2:15 PMLonnieTue, Feb 05, 2008 10:03 AM48,24496,96,152,201,1,1,1,1,1,0,0,0,01,20,272,499,462,17Arial, 13(A:ArrayType;I:IndexType;L:IndexType;row:IndexType;dbTableName)InsertRecSqlGenerates the SQL "INSERT INTO" statement for one line of table A. A is a 2-D table indexed by rows I and columns L. L's domain serves as the column names in the database table. dbTableName is the name of the table in the database. The result begins with two semi-colons, since it will be used with an SQL statement preceeding it.
29.8.2008 Jouni Tuomisto
I added the parameter IGNORE because it ignores rows that would cause duplicate-key violations. This way, there is no need to check for e.g. existing locations of new indices.
6.1.2009 Jouni Tuomisto
I changed the A[I=row] to A[@I=@row] because the original function does not work correctly, if there are non-unique rows in the index.(';;INSERT IGNORE INTO ' & dbTableName & '(' & JoinText(L,L,',') & ') VALUES (' & Vallist(A[@I=@row],L)) & ') '184,32,152,242,591,203,487,469A,I,L,row,dbTableName(V:ArrayType;I:IndexType)ValListTakes a list of values, and returns a string which the concatenation of each value, separated by commas, and with each value quoted.JoinText( '''' & V & '''', I, ',')72,32,052,242,642,360,476,224V,I1,F,4,14,0,0(Tabl:ArrayType;RowIndex:IndexType;LabelIndex:IndexType;dbTableName)WriteTableSql(Table,Rows,Labels,dbTableName)Returns the SQL that will write the table to the database table.
This can be used as the second argument to DBWrite.
This SQL statement replaces the entire contents of an existing table with the new data.'DELETE FROM '& Dbtablename & JoinText(Insertrecsql(Tabl, Rowindex, Labelindex, Rowindex, Dbtablename),RowIndex)328,32,188,242,728,341,510,476Tabl,RowIndex,LabelIndex,dbTableName(Tabl:ArrayType;RowIndex:IndexType;LabelIndex:IndexType;dbTableName)AppendTableSql(Table,Rows,Labels,dbTableName)Returns the SQL that will write the table to the database table.
This can be used as the second argument to DBWrite.
This SQL statement replaces the entire contents of an existing table with the new data.JoinText(Insertrecsql(Tabl, Rowindex, Labelindex, Rowindex, Dbtablename),RowIndex)328,88,188,242,559,127,510,476Tabl,RowIndex,LabelIndex,dbTableNameTablesList of such tables in Opasnet Base that are being written to by this module.['act','actobj','cell','obj','loc','loccell','obj','res']296,216,148,122,396,363,377,227,0,MIDMCardinalsThe largest id values for the selected Opasnet Base tables. The table is updated by pressing the R_cardinals button.for x[]:= table1 do (
var a:= query('SELECT MAX(id) AS id FROM '&x&' ');
max(max(a,a.i),a.j))296,192,148,122,634,394,476,3322,193,270,416,303,0,MIDM2,659,299,416,303,0,MIDM39325,65535,393212,I,4,2,0,0,4,0,$,0,"ABBREV",0(in, table; cond:texttype)FindidThis function gets an id from a table.
in: the property for which the id is needed. In MUST be unique in cond and it must contain index i.
table: the table from where the id is brought. The table MUST have .j as the column index, .i as the row index, and a column named 'id'.
cond: the name of the field that is compared with in. Cond must be text.index L:= in[.i=unique(in, in.i)];
var a:= if (L&' ') = (table[.j=cond]&' ') then table[.j='id'] else 0;
a:= textify(sum(a, table.i));
a[.L=in]72,280,148,122,636,101,494,519in,table,cond(var, table)Writeif size(var)>0 then dbwrite((if platform = 'Lumina AWP' then 'Driver={MySQL ODBC 3.51 Driver};Server=193.167.179.97' else 'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102')&';Database=opasnet_base;User=resultwriter; Password='&writerpsswd&';Option=3'
, appendtablesql(var,var.i, var.j, table&' '))if size(var)>0 then dbwrite((if platform = 'Lumina AWP' then 'Driver={MySQL ODBC 3.51 Driver};Server=193.167.179.97' else 'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102')&';Database=opasnet_base;User=result_writer; Password='&writerpsswd&';Option=3'
, appendtablesql(var,var.i, var.j, table&' '))72,304,148,122,751,65,501,45765535,45873,39321var,tableOpasnet usernameThe username for Opasnet wiki'Add username'72,176,148,221,1,1,1,1,1,0,0,0,02,102,90,476,398[Formnode Username1]52425,39321,65535[]Opasnet passwordThe user's password for Opasnet wiki.'Add password'72,232,148,221,1,1,1,1,1,0,0,0,02,102,90,476,520[Formnode Password1]52425,39321,65535ODBCContains the parameters for the open database connectivity (ODBC).
For Lumina AWP use the following should be used:
'Driver={MySQL ODBC 3.51 Driver};Server=193.167.179.97;Database=opasnet_base;User=result_reader; Password=ora4ever;Option=3'
For THL internal use the following should be used:
'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102;Database=opasnet_base;User=result_reader; Password=ora4ever;Option=3'var a:= if platform='Lumina AWP' then 'Driver={MySQL ODBC 3.51 Driver};Server=193.167.179.97' else 'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102';
a&';Database=opasnet_base;User=result_reader; Password=ora4ever;Option=3'184,136,148,121,1,0,1,1,1,0,,0,2,180,61,508,4202,56,66,918,303,0,MIDMLocLap;
query('
SELECT loc.*, ind.* FROM loc, obj as ind WHERE loc.obj_id_i = ind.id ')296,160,148,131,1,0,1,1,1,0,0,0,02,370,45,476,4452,43,42,1147,516,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')]2,I,4,2,0,0,4,0,$,0,"ABBREV",0ObjThis node checks the variables listed in Var_for_rdb and makes an index of those that are NOT found in the result database. This is then used as an index in Inp_var for adding variable information.Lap;
query('SELECT * FROM obj ')296,136,148,131,1,0,1,1,1,0,0,0,02,378,21,493,5012,218,87,977,421,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')][Self,1,Sys_localindex('I'),1,Sys_localindex('J'),1](var, table)Write1if size(var)>0 then appendtablesql(var,var.i, var.j, table&' ')72,328,148,132,284,58,476,224var,table''184,200,052,121,1,1,1,1,1,0,0,0,02,163,375,476,224[Formnode Writerpsswd1]52425,39321,65535PlatformChoice(Self,2,False,1)72,136,148,12[Formnode Platform1]52425,39321,65535['Lumina AWP','THL computer']Object info1-2subtable(Object_info[Info=Info1_2, @n_vars=1])184,248,148,242,102,90,476,3732,39,314,416,303,0,MIDM2,599,363,416,303,0,MIDM[Formnode Object_info8, Formnode Object_info7]52425,39321,65535[N_vars,Info1_2][Self,Ind_info]['','','']Info1-2['ident','name','unit','number of indices','parameter name','probabilistic?']184,280,148,131,1,1,1,1,1,0,0,0,0Object info3Additional information for each index and decision node. Description node is the name of a node containing information about the locations of the index. It must be indexed by the index.subtable(Object_info[Info=Info3])184,320,148,162,140,217,476,2242,417,216,703,359,0,MIDM2,752,344,460,228,0,MIDM[Formnode Object_info6]52425,39321,65535[Info3,N_vars][N_vars,Info][0,1,1,0]Info3['Analytica identifier','ident','name','unit','probabilistic?']184,352,148,131,1,1,1,1,1,0,0,0,0Do nextThis is a temporary node that is ovewritten when Upload_data and Upload_results are being run.''296,352,148,16Replace data?Choice(Self,1,False)296,256,148,22[Formnode Replace_data_1]52425,39321,65535['Yes, replace previous data','No, append to previous data'][]Enter anacode"index vehicle_type:= ['Bus','Minibus','Car d','Car g'];
var Car_maintenance:= Triangular( 0.03, 0.058, 0.086 );
var Fuel_price:=
(var a:= 0.95*triangular(0.8,1,1.2);
var b:= 1.22*triangular(0.8,1,1.2);
array(Vehicle_type,[a,a,a,b]));
var Fuel_consumption:=
(var a:= (8.7/100)*Triangular(0.75,1,1.25);
var b:= (5.7/100)*Triangular(0.75,1,1.25);
var c:= (8/100)*Triangular(0.5,1,1.5);
a:= array(Vehicle_type,[a,a,b,c]);
);
fuel_price*fuel_consumption+car_maintenance"496,280,148,24[Formnode Enter_anacode1]52425,39321,65535Enter anacode0432,448,1160,561,0,0,1,0,0,0,182,0,152425,39321,65535Enter_anacodeExample codeindex vehicle_type:= ['Bus','Minibus','Car d','Car g'];
var Car_maintenance:= Triangular( 0.03, 0.058, 0.086 );
var Fuel_price:=
(var a:= 0.95*triangular(0.8,1,1.2);
var b:= 1.22*triangular(0.8,1,1.2);
array(Vehicle_type,[a,a,a,b]));
var Fuel_consumption:=
(var a:= (8.7/100)*Triangular(0.75,1,1.25);
var b:= (5.7/100)*Triangular(0.75,1,1.25);
var c:= (8/100)*Triangular(0.5,1,1.5);
a:= array(Vehicle_type,[a,a,b,c]);
);
fuel_price*fuel_consumption+car_maintenance496,216,148,24Code nodeevaluate(Enter_anacode)496,336,148,162,104,114,416,303,0,SAMP[Undefined,Sys_localindex('VEHICLE_TYPE'),Undefined,Undefined,Undefined,1][1,0,0,0]Provide data in the format you selected.264,412,-1256,121,0,0,1,0,1,0,,0,65535,65532,19661jgrellie22 May 2008 17:19pmea3. helta 2010 15:4248,24592,280,048,321,1,1,1,1,1,0,0,0,01,3,8,651,425,17Arial, 15Notesjgrellie29 Jul 2008 18:0648,24512,320,164,641,1,1,1,1,1,1,,0,1,711,2,569,666,1752427,65535,62258Arial, 13100,1,1,1,1,9,2970,2100,15,0Sex is irrelevant for this model, since it only looks at exposure of mothers104,51,-176,231,0,0,1,0,1,1,,0,Arial, 10The model does not address bottled water scenarios at present. It is purely a diagnostic assessment and uses zero TTHM as a counterfactual.104,128,-176,441,0,0,1,0,1,1,,0,Arial, 10One of the problems with this model is that all water ingested is used (amount) and this is multiplied by a proportion of tap water instead of an amount272,344,-180,521,0,0,1,0,1,1,,0,2,102,90,476,224Arial, 10The inclusion of "proportion of population" is also not useful. It would be better to represent these proportions using distributions. How is this possible? Could I not just incorporate this dimension into another variable in this part of the model? For example, in duration?104,288,-176,1041,0,0,1,0,1,1,,0,Arial, 10It is not seemingly necessary to keep the concentration variable. Although it could remain just as a factor. E.g. instead of "20", it would be "2".392,272,-136,1211,0,0,1,0,1,1,,0,Arial, 10It would make sense to define a baseline where there is no variability (i.e. inputting only midpoints) and then one where we account for some uncertainty. In addition there would be scenarios about bottled water etc. Otherwise we end up without any variability expressed in the outputs for the baseline (except for that in the monitoring data)272,168,-180,1161,0,0,1,0,1,1,,0,Arial, 10Te5Is the split of tap water variable really necessary? Or is this dealt with by another variable?64,536,-136,721,0,0,1,0,1,1,,0,Arial, 10Te5The model does not currently have the functionality to produce an estimate of the health impact in DALYs. The attributable burden in terms of cases of disease is the endpoint used for this first pass assessment.472,416,-144,1561,0,0,1,0,1,1,,0,Arial, 10Te5Uptake factors used to calculate exposure through ingestion, inhalation and absorption were derived from those used in Whitaker et al. 2003. It should be noted that these were developed for chloroform (not TTHMs) so should be interpreted with caution.200,432,-1176,301,0,0,1,0,1,1,,0,Arial, 10Use figures from Whitaker et al (2003) only!!160,528,-136,371,0,0,1,0,1,1,,0,65535,65535,65535Arial, 10Te11Try to use method from arsenic diagram to deal with the baseline vs. scenario uncertainty problem256,536,-144,651,0,0,1,0,1,1,,0,65535,65535,65535Arial, 10WP3.4 TTHM and IUGR modeljgrellie06 Aug 2008 09:2148,24320,128,164,641,0,0,1,1,1,0,,0,1,143,49,831,527,1765535,45873,3932152428,52428,5242878,1,1,0,2,9,2970,2100,15,0Mean concentrations of TTHM for each areaµg TTHM per litreTable(Area1)(
0,1,0,0,0,0,0,3,0,0,1,0,3,0,26,0,2,5,23,7,9,0,13,6,0,0,17,0,0,19,19,43,0,8,3,91,0,25,0,13,0,0,0,0,0,7.13,0)152,248,156,321,1,1,1,1,1,1,,0,2,258,103,476,2242,509,95,546,493,0,MIDM2,40,50,1073,278,1,MIDM[Formnode Mean_concentrations1]Arial, 12Standard deviations of TTHM concentrations for each areaµg TTHM per litreTable(Area1)(
0,2.449489743,0,0,0,0,0,3.287784027,0,0,0.5,0,3.959797975,0,5.196152423,0,3.059738551,2.516611478,21.07921567,8.544003745,7.848885271,0,9.699942869000001,1.354314095,0,0,4.949747468,0,0,11.0338872,1.527525232,5.354126135,0,6.740072064,4.242640687,8.485281374,0,3.535533906,0,6.582805886,0,0,0,0,0,0,0)152,440,164,321,1,1,1,1,1,1,,0,2,102,92,472,222[Formnode Standard_deviations1]Arial, 12Monitoring data distributions of TTHM concentrations for each areaµg of TTHM per litreLognormal(,, Mean_concentrations_, Standard_deviations_)152,344,172,441,1,1,1,1,1,1,,0,2,0,-23,1024,6572,0,0,1024,657,1,MIDMArial, 12[Area1,Area1,Undefined,Undefined,2]Area['061','111','098','165','398','224','092','927','091','049','078','257','106','286','285','153','758','418','536','837','908','408','598','743','905','050','529','537','577','609','680','684','783','853','886','895','491','593','740','297','208','564','567','765','240','698','851']136,48,148,241,1,1,1,1,1,1,,0,2,591,173,561,452[Formnode England_and_wales_w1]Arial, 12['061','111','098','165','398','224','092','927','091','049','078','257','106','286','285','153','758','418','536','837','908','408','598','743','905','050','529','537','577','609','680','684','783','853','886','895','491','593','740','297','208','564','567','765','240','698','851']Exposure-response function for TTHM in tap water and IUGRNote - this is an approximation - i need to work out what the correct way of dealing with this is - maybe follow arsenic modelNormal( .01311364, 6.495597m )464,248,180,401,1,1,1,1,1,1,,0,2,0,-23,1024,6572,486,357,780,339,0,CONF[Formnode Exposure_response_f1]Distresol:8
Diststeps:1
{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_graphvaluerange Exposure_response_fu:1,,,,0}Arial, 12[][Undefined,Undefined,2]Total live births for each areaNumber of birthsTable(Area1,Sex_of_neonates)(
92,74,
83,88,
125,120,
99,86,
505,478,
43,55,
1334,1277,
172,153,
3154,2925,
1832,1713,
40,47,
248,262,
262,255,
388,428,
260,240,
129,123,
855,815,
142,146,
221,213,
1229,1156,
96,91,
83,84,
114,120,
379,316,
340,341,
59,63,
100,92,
43,47,
47,59,
380,354,
124,132,
218,201,
16,21,
951,915,
62,47,
61,72,
264,213,
73,74,
125,117,
499,471,
76,67,
993,950,
91,103,
46,45,
126,121,
368,327,
56,43
)640,440,148,361,1,1,1,1,1,1,0,0,02,0,0,1024,6572,74,9,1024,657,0,MIDM2,57,-2,363,885,0,MIDM[Formnode Total_live_births_i1]{!40000|Att_graphindexrange Sex_of_neonates:1,,,,,,10}
{!40000|Att_graphvaluerange Total_live_births_fo:1,,,,,,10}
Baroverlap:0
{!40000|Flip:0}
{!40000|Att_catlinestyle Graph_primary_valdim:9}
{!40000|Att_stackedbar Graph_primary_valdim:0}
{!40000|Graph_pagebrush: }Arial, 12[Sex_of_neonates,Area1][Sex_of_neonates,Area1][Index Area1, Index Sex_of_neonates]['item 1'][Sex,2,Water_companies,1,Age_categories,1]Background prevalence of IUGRCases per 100,000 birthsBackground prevalence of SGA in Filand is nominally 4.3% of all births. Given that prevalence is typically reported as a rate in 100,000, 4,3% equates to 4,3/100 or 4,300 in 100,000 i.e. 4,300 IUGR births per 100,000 live births
Ref: http://www.stakes.fi/tilastot/tilastotiedotteet/2009/tr22_09.pdf
THL: Births and newborns 2008. THL Statistical report 2009.Lognormal( , , 4300 , )640,248,164,321,1,1,1,1,1,1,,0,2,0,0,1152,7532,472,482,416,303,0,STAT[Formnode Background_prevalen1]{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_graphvaluerange Background_prevalenc:1,,,,0}Arial, 12[]Excess risk of IUGR attributable to TTHM((exp(Exposure_response_fu/10*Modelled_exposure_of)-1)/exp(Exposure_response_fu/10*Modelled_exposure_of))464,344,148,361,1,1,1,1,1,1,,0,2,268,461,926,2732,30,23,453,705,0,MIDMProbindex:[0.5 ]Arial, 12[Exposure_scenarios,Area1,0,Undefined,1][Sys_localindex('PROBABILITY'),1,Area1,1,Exposure_scenarios,1]Excess cases of IUGR attributable to TTHMCasesExcess_risk_of_iugr_*Background_prevalenc*Total_live_births_fo/100000640,344,148,401,1,1,1,1,1,1,,0,2,0,2,1152,7512,0,-23,1440,799,0,MEAN[Formnode Attributable_burden1]Probindex:[0.05, 0.5, 0.95 ]
Statsselect:[0, 1, 0, 0, 0, 0, 0, 0 ]
{!40000|Att_contlinestyle Run:1}
Distresol:10
{!40000|Att_graphvaluerange Graph_pdf_valdim:1,0,1,1,0}
{!40000|Att_contlinestyle Graph_pdf_valdim:6}
Diststeps:0
{!40000|Att_graphvaluerange Excess_cases_of_iugr:1,,1,,,,,-10K,30K}
{!40000|Att_catlinestyle Graph_primary_valdim:9}Arial, 12[Sex_of_neonates,Area1,1,1,1]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[Index Area1, Index Sex_of_neonates][Exposure_scenarios,1,Area1,23,Sex_of_neonates,1]Modelled exposure of population to TTHM for each areaµg TTHM per litreMonitoring_data_dist*Exposure_adjustment_320,344,164,281,1,1,1,1,1,1,,0,2,0,0,1152,7522,0,0,1152,753,0,MIDMArial, 12[Exposure_scenarios,Area1,Undefined,Undefined,1][Exposure_scenarios,3,Area1,1,Sys_localindex('STEP'),1]Type of drink['cold','hot']624,48,148,241,1,1,1,1,1,1,,0,Arial, 12['cold','hot']Bathing type['shower','bath']256,48,148,241,1,1,1,1,1,1,,0,Arial, 12['shower','bath']Sex of neonates['Male (M)','Female (F)']504,48,148,241,1,1,1,1,1,1,,0,Arial, 12['Male (M)','Female (F)']
Indices (by which data within variables in the model are ordered)384,56,-1304,481,0,0,1,1,1,1,,1,Arial, 12Exposure scenarios['baseline','baseline with variability','user defined']384,48,148,241,1,1,1,1,1,1,,0,2,0,-23,1281,953Arial, 12['baseline','baseline with variability','user defined']Total daily TTHM uptake slope from ingestion, inhalation and absorptionIndexless_daily_tthm+Indexless_daily_tth1
320,164,160,441,1,1,1,1,1,1,,0,2,0,-23,1280,9522,0,0,952,669,1,MIDMArial, 12[Undefined,Exposure_scenarios,Undefined,Undefined,1][Bathing_scenarios,3,Bottled_water_scenar,1,Sys_localindex('STEP'),1]Exposure adjustment factorUnitless factorTable(Exposure_scenarios)(
Total_daily_tthm_upt[Exposure_scenarios="baseline"]/Total_daily_tthm_upt[Exposure_scenarios="baseline"],Total_daily_tthm_upt[Exposure_scenarios="baseline with variability"]/Total_daily_tthm_upt[Exposure_scenarios="baseline"],Total_daily_tthm_upt[Exposure_scenarios="user defined"]/Total_daily_tthm_upt[Exposure_scenarios="baseline"])320,268,148,311,1,1,1,1,1,1,,0,2,102,90,476,2242,188,272,702,303,0,MIDM2,-34,394,1281,350,0,CONF{!40000|Att_graphvaluerange Exposure_adjustment_:1,0}
{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_catlinestyle Graph_pdf_valdim:9}Arial, 12[Undefined,Self][Exposure_scenarios,Exposure_scenarios,1,1,1]['item 1'][Bottled_water_scenar,3,Bathing_scenarios,2,Sys_localindex('STEP'),1]TTHM ingestion modulejgrellie29 Jul 2008 18:0648,24152,164,148,281,1,1,1,1,1,1,,0,1,-9,98,611,486,1752425,39321,6553565535,65535,65535Arial, 12100,1,1,0,2,9,2970,2100,15,0Daily TTHM uptake slope from ingestionUnitlessAverage_daily_tap_wa*Percentage_tap_water*Proportion_of_tap_wa*Proportion_of_tthm_r*Uptake_of_tthm_per_u
256,264,160,361,1,1,1,1,1,1,,0,2,512,486,476,2242,0,-23,1281,953,1,PDFP{!40000|Att_graphvaluerange Daily_tthm_uptake_s2:1,0}
{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_catlinestyle Graph_pdf_valdim:9}
Diststeps:0Arial, 12[Undefined,Exposure_scenarios,Undefined,Undefined,1][Index Type_of_drink, Index Exposure_scenarios][Type_of_drink,1,Exposure_scenarios,-1,Sys_localindex('STEP'),1]Indexless daily TTHM uptake slope from ingestionUnitlessSum(Daily_tthm_uptake_s2, Type_of_drink)416,264,160,361,1,1,1,1,1,1,,0,2,725,253,476,2242,0,-23,1281,953,0,MIDMArial, 12[Undefined,Exposure_scenarios,Undefined,1][Exposure_scenarios,3]Percentage tap water consumed out of total water%Table(Exposure_scenarios)(
1,1,User_defined_percent)256,160,160,321,1,1,1,1,1,1,,0,2,0,-23,952,6692,344,354,416,303,0,MIDMArial, 122,%,4,2,0,0,4,0,$,0,"ABBREV",0['item 1']Uptake of TTHM per ug/L TTHM per litre of tap water ingestedug per ug/L of CHCl3 /LUptake of TTHM in ug per ug/L chloroform in water per litre of water consumed. Note that this is derived from the Whitaker paper, where chloroform was calculated - not TTHM.0.00367696,264,152,361,1,1,1,1,1,1,,0,2,0,-23,952,669Arial, 12Proportion of TTHM retained after heating and pouringUnitlessThe proportion of TTHM lost from drinks due to heating and pouring of the waterTable(Type_of_drink)(
0.15,1)416,384,168,441,1,1,1,1,1,1,,0,2,0,-23,952,6692,454,16,416,303,0,MIDM2,216,226,416,303,0,MIDMArial, 12[Type_of_drink,Exposure_scenarios][Undefined,Type_of_drink,Undefined,Undefined,1][Type_of_drink,2,Sys_localindex('STATISTICS'),1]Average daily tap water consumptionL/dayThis is not the exact distribution used by Whitaker et al 2003. They seem to have used a distribution with a slightly higher mean value.Table(Exposure_scenarios)(
Lognormal( ,,0.758, 0.567),Lognormal( ,,0.758, 0.567),User_defined_average)96,160,164,321,1,1,1,1,1,1,,0,2,102,90,476,2242,40,50,416,303,0,MIDM2,159,127,416,303,1,PDFPArial, 12[Undefined,Exposure_scenarios][Undefined,Exposure_scenarios,Undefined,Undefined,1]User-defined percentage of tap water consumed out of total water%.7416,160,148,441,1,1,1,1,1,1,,0,2,310,157,476,224Arial, 12User-defined average daily tap water consumptionLognormal( 1.2, , , 0.5)96,56,148,361,1,1,1,1,1,1,,0,2,102,90,476,224Arial, 12Proportion of tap water consumed after boilingTable(Type_of_drink)(
Uniform(0,1),1)256,384,164,361,1,1,1,1,1,1,,0,2,0,-23,1280,9522,0,-23,1280,952,0,MIDM2,0,-23,1281,953,1,MIDMArial, 12[Type_of_drink,Undefined][Type_of_drink,Exposure_scenarios]TTHM inhalation and absorption modulejgrellie29 Jul 2008 18:0648,24464,164,156,281,1,1,1,1,1,1,,0,1,1,2,1009,793,1752425,39321,6553565535,65535,65535Arial, 1273,1,1,0,2,9,2970,2100,15,0Daily TTHM uptake slope from inhalation and absorptionug(Uptake_factors_for_t*Total_time_spent_sho*Overall_percentages_)/90320,320,160,671,1,1,1,1,1,1,,0,2,720,346,416,303,1,PDFPDiststeps:0
{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_graphvaluerange Graph_pdf_valdim:1,0,1,1,0}
{!40000|Att_graphvaluerange Daily_tthm_uptake_sl:1,,,,1}Arial, 12[Undefined,Bathing_type,Undefined,Undefined,1][Index Exposure_scenarios][Exposure_scenarios,1,Bathing_type,1,Sys_localindex('STEP'),1]Indexless daily TTHM uptake slope from inhalation and absorptionsum(Daily_tthm_uptake_sl, Bathing_type)512,320,164,671,1,1,1,1,1,1,,0,2,443,256,476,2242,40,50,416,303,1,PDFPArial, 12[Undefined,Exposure_scenarios,Undefined,1,1][Exposure_scenarios,1,Sys_localindex('STEP'),1]Total time spent showering or bathing over 90 daysMinutes (min)No__of_showers_or_ba*Bathing_and_showerin320,456,160,441,1,1,1,1,1,1,,0,2,0,-23,1280,952,1,PDFPArial, 12[Undefined,Exposure_scenarios,Undefined,Undefined,1][Bathing_type,1,Exposure_scenarios,3,Sys_localindex('STEP'),1]Bathing and showering durationMinutes (min)Lognormal( Median_of_bathing_an, Geometric_standard_d )512,568,160,401,1,1,1,1,1,1,,0,2,148,66,460,2432,85,271,468,223,0,MIDM2,0,-23,1281,953,1,PDFP{!40000|Att_contlinestyle Graph_pdf_valdim:6}
{!40000|Att_graphvaluerange Bathing_and_showerin:1,,0,,0,,,0,150}
Diststeps:1Arial, 12[Undefined,Bathing_type,Undefined,Undefined,1][Exposure_scenarios,1,Bathing_type,1,Sys_localindex('STEP'),1]Median of bathing and showering durationMInutes (min)Table(Bathing_type,Exposure_scenarios)(
7.174262723074754,7.174262723074754,User_defined_median_,
16.44464677109705,16.44464677109705,User_defined_median_
)512,448,148,401,1,1,1,1,1,1,,0,2,0,-23,1280,9522,716,524,416,303,1,MIDMArial, 12[Bathing_type,Exposure_scenarios][Exposure_scenarios,Bathing_type]Geometric standard deviation of bathing and showering durationMinutes (min)Table(Bathing_type,Exposure_scenarios)(
1.472409242986545,1.472409242986545,User_defined_geometr,
1.915540829013896,1.915540829013896,User_defined_geometr
)672,568,148,581,1,1,1,1,1,1,,0,2,0,-23,1280,9522,247,235,416,303,0,MIDM2,561,254,488,289,1,MIDMArial, 12[Bathing_type,Exposure_scenarios][Exposure_scenarios,Bathing_type]Showering/bathing rate for 90-day periodNo. of baths or showersTotal number of showers/baths for the 90-day periodTable(Exposure_scenarios)(
Uniform( 60, 100 ),Uniform( 60, 100 ),User_defined_showeri)320,688,180,441,1,1,1,1,1,1,,0,2,0,-23,1280,9522,136,146,416,303,0,MIDMArial, 12No. of showers or baths for the 90-day periodNo. of showers or bathsPoisson(Showering_bathing_ra)320,576,180,441,1,1,1,1,1,1,,0,2,0,-23,1281,9532,0,-23,1280,952,1,PDFPGrid:0
{!40000|Att_catlinestyle Graph_prob_valdim:6}
Distresol:100
Diststeps:0Arial, 12[Undefined,Exposure_scenarios,Undefined,Undefined,1][Index Exposure_scenarios][Exposure_scenarios,0,Sys_localindex('POSSIBLE_VALUES'),1]Uptake factors for TTHM by bathing typeug per ug/L per minTable(Bathing_type)(
Uniform(0.001114,0.001524),1.384m)160,320,176,481,1,1,1,1,1,1,,0,2,445,104,570,7982,104,118,410,299,0,MIDM2,328,338,416,303,1,PDFPArial, 12[Undefined,Bathing_type,Undefined,Undefined,1]Proportion of baths taken by those who bathe and showerUniform(0,1)512,192,164,521,1,1,1,1,1,1,,0,2,0,-23,1281,953Arial, 12Percentage of women only using one type of bathing activity%Table(Bathing_type,Exposure_scenarios)(
0.61,0.61,User_defined_percen1,
0.18,0.18,User_defined_percen1
)160,64,168,441,1,1,1,1,1,1,,0,2,0,-23,1280,9522,0,-23,1280,952,0,MIDM2,0,0,1281,953,1,MIDMArial, 12[Bathing_type,Exposure_scenarios][Bathing_type,Exposure_scenarios]2,%,4,2,0,0,4,0,$,0,"ABBREV",0Overall percentages of bathing activity%Table(Bathing_type)(
Percentage_of_women_+(Percentage_of_women1*(1-Proportion_of_baths_)),Percentage_of_women_+(Percentage_of_women1*Proportion_of_baths_))320,192,152,401,1,1,1,1,1,1,,0,2,512,85,590,303,0,MIDM2,0,0,1281,953,1,MIDMArial, 12[Bathing_type,Exposure_scenarios,Undefined,Undefined,1]Percentage of women both
showering and bathing%1-(sum(Percentage_of_women_,Bathing_type))160,192,148,491,1,1,1,1,1,1,,0,2,0,-23,1281,9532,392,402,416,303,1,MIDMArial, 12User-defined percentage of women only using one type of bathing activity%Table(Bathing_type)(
0.8100000000000001,0.05)800,64,148,521,1,1,1,1,1,1,,0,2,0,-23,1280,952Arial, 12[Bathing_type,Undefined]2,%,4,2,0,0,4,0,$,0,"ABBREV",0User-defined geometric standard deviation of bathing and showering durationTable(Bathing_type)(
1.6,1.9)800,569,148,601,1,1,1,1,1,1,,0,2,0,-23,1280,9522,633,203,416,303,0,MIDMArial, 12[Bathing_type,Undefined]User-defined median of bathing and showering durationTable(Bathing_type)(
10,20)800,448,148,441,1,1,1,1,1,1,,0,2,0,-23,1280,952Arial, 12[Bathing_type,Undefined]User-defined showering/bathing rate for 90-day periodUniform( 50, 120 )800,688,148,361,1,1,1,1,1,1,,0,2,0,-23,1281,9532,72,82,416,303,1,PDFPArial, 12WP3.4 TTHM and IUGR user interfacejgrellie06 Aug 2008 09:2148,24128,128,164,641,352,0,931,826,1765535,52427,57888Mean concentrations of TTHM for each water company (England & Wales, 2007)0576,64,1332,160,0,0,0,0,0,0,72Mean_concentrations_Standard deviations of TTHM concentration for each water company (England & Wales, 2007)0536,96,1372,161,0,0,1,0,0,0,72,0,1Standard_deviations_England and Wales water companies (2007)0696,744,1208,131,0,0,1,0,0,0,72,0,1Area1Exposure-response function for TTHM and IUGR (derived from meta-analysis)0584,528,1320,161,0,0,1,0,0,0,72,0,1Exposure_response_fuTotal live births in England & Wales (2005)0696,616,1208,161,0,0,1,0,0,0,72,0,1Total_live_births_foBackground prevalence of IUGR per 100,000 in England and Wales0616,560,1288,161,0,0,1,0,0,0,72,0,1Background_prevalencIngestion464,224,2412,561,0,0,1,0,1,1,,0,52427,65535,65535Arial, 19Te10Inhalation and absorption464,376,3412,841,0,0,1,0,1,1,,0,52427,65535,65535Arial, 19Monitoring data464,72,-1432,441,0,0,1,0,1,1,,0,Arial, 19Te10Calculating attributable risk464,536,-1432,441,0,0,1,0,1,1,,0,Arial, 19Te10Calculating attributable burden464,632,-1432,361,0,0,1,0,1,1,,0,Arial, 19Te10Indices464,744,-1432,601,0,0,1,0,1,1,,0,Arial, 19Te14Calculating the risk adjustment factor - altering the user-defined exposure scenario464,304,-1432,1761,0,0,1,0,1,1,,0,Arial, 19Attributable burden (excess cases of IUGR in England & Wales)1632,648,1272,131,0,0,1,0,0,0,72,0,1Excess_cases_of_iugr1128,48,-116,121,0,0,1,1,1,0,,1,2320,48,-116,121,0,0,1,1,1,0,,1,WP3.4 TTHM and IUGR analysis of uncertaintyjgrellie09 Aug 2008 13:4548,24512,128,164,641,1,2,565,533,17
This variable simply describes a list of all the uncertain variables in the model.472,168,-168,1481,0,0,1,0,1,0,,0,Te23
The result of this variable returns a rank correlation of importance for all the uncertain variables in the model. The number of samples should be reduced in "Result", "Uncertainty options", "Sample size" if computational times are too long.
Note also that since some variables considered as probabilistic may contain some deterministic data (for one element in an array), it may be necessary to ignore warning messages that appear while carrying out the analysis.208,232,-1156,2121,0,0,1,0,1,0,,0,Excess cases of IUGR attributable to TTHM ImportanceAbs( RankCorrel( Excess_cases_of_iug2, Excess_cases_of_iugr ) )208,96,148,581,0,0,1,1,1,0,0,0,02,0,0,1280,952,1,MEAN{!40000|Flip:8}[Excess_cases_of_iug2,Undefined][Index Area1, Index Type_of_drink, Index Bathing_type, Index Sex_of_neonates][Type_of_drink,-1,Bathing_type,-1,Sex_of_neonates,-1,Exposure_scenarios,3,Area1,-1,Excess_cases_of_iug2,1]Excess cases of IUGR attributable to TTHM Inputs[ Monitoring_data_dist, Exposure_response_fu, Background_prevalenc, Proportion_of_tthm_r, Average_daily_tap_wa, Proportion_of_tap_wa, Bathing_and_showerin, Showering_bathing_ra, No__of_showers_or_ba, Uptake_factors_for_t, Proportion_of_baths_]['Monitoring data distributions of TTHM concentrations for each area','Exposure-response function for TTHM in tap water and IUGR','Background prevalence of IUGR','Proportion of TTHM retained after heating and pouring','Average daily tap water consumption','Proportion of tap water consumed after boiling','Bathing and showering duration','Showering/bathing rate for 90-day period','No. of showers or baths for the 90-day period','Uptake factors for TTHM by bathing type','Proportion of baths taken by those who bathe and shower']472,96,148,581,0,0,1,1,1,0,0,0,0Te203512,48,-116,121,0,0,1,1,1,0,,1,