10000111200LogOpasnet base connection<a href="http://en.opasnet.org/w/Image:Opasnet_base_connection.ANA">Wiki description</a>HP_Omistaja9. maata 2008 10:42ktluser3. Decta 2008 22:45 48,241,0,0,1,1,1,0,0,0,01,17,27,679,423,172,102,90,476,224Arial, 150,Model Op_en2676,2,2,0,1,C:\Documents and Settings\ktluser\My Documents\Opasnet_base_connection.ANA100,1,1,1,1,9,2970,2100,1,0ODBCContains the parameters for the open database connectivity (ODBC).'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102;Database=resultdb;User=result_reader; Password=ora4ever;Option=3'232,128,148,121,1,0,1,1,1,0,,0,2,102,90,476,224Dimensionsindex i:= DBquery(odbc,'
SELECT id, Ident, Name
FROM Obj
WHERE Typ_id= 2
');
index j:= dblabels(i);
DBTable(i, j )232,32,148,121,1,0,1,1,1,0,0,0,02,346,38,476,2242,635,328,556,489,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')]Indicesindex i:= DBquery(odbc,'
SELECT Ind.id as Iid, Ind.Ident as Iident, Ind.Name as Iname, Dim.id as Did, Dim.Ident as Dident, Dim.Name as Dname
FROM Obj as Ind, Obj as Dim, Sett, Item
WHERE Ind.id = Item.Obj_id
AND Dim.id = Sett.Obj_id
AND Item.Sett_id=Sett.id
AND Sett.Sty_id = 1
');
index j:= dblabels(i);
DBTable(i, j )232,56,148,121,1,0,1,1,1,0,0,0,02,380,47,476,2962,401,18,876,493,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')]Locationsindex i:= DBquery(odbc,'
SELECT Loct, Description, Name as Dname, Loc.id, Dim.id
FROM Loc, Obj as Dim
WHERE Loc.Obj_id_d = Dim.id
');
index j:= dblabels(i);
DBTable(i, j)232,80,148,121,1,0,1,1,1,0,0,0,02,370,45,476,4452,408,87,751,694,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')]VariablesThis 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.index i:= DBquery(odbc,'
SELECT id, Ident as Vident, Name as Vname
FROM Obj
WHERE Typ_id = 1
');
index j:= dblabels(i);
var a:= DBTable(i, j );
a232,104,148,121,1,0,1,1,1,0,0,0,02,378,21,493,5012,529,143,700,421,0,MIDM39325,65535,39321[Sys_localindex('J'),Sys_localindex('I')]['H1991'][Self,1,Sys_localindex('I'),1,Sys_localindex('J'),1]Writerjtue1. jouta 2008 10:57 48,24112,112,148,241,71,32,569,520,17Inp dim0156,400,1140,161,0,0,1,0,0,0,78,0,152425,39321,65535New_dimension_infoInp run0156,432,1140,161,0,0,1,0,0,0,78,0,152425,39321,65535Run_infoInp var0156,336,1140,161,0,0,1,0,0,0,78,0,152425,39321,65535New_variable_infoVar for rdb0156,256,1140,161,0,0,1,0,0,0,78,0,152425,39321,65535Variables_to_be_saveDetailsjtue18. heita 2008 10:14 48,24408,512,148,241,16,10,657,505,17Concatenation 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,2480,664,168,201,0,0,1,1,1,0,0,0,01,39,36,798,452,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,30,320,478,348A,RowIndex,ColIndex,ResultIndexVariables to be savedTable(Self,Vari)(
'H2556',0
)['item 1']56,393,148,221,1,1,1,1,1,0,0,0,02,102,90,476,4812,219,290,416,482,0,MIDM2,663,308,420,375,0,MIDM[Formnode Var_for_rdb1]52425,39321,65535[Vari,Self][Vari,Self][1,1,1,0][Sys_localindex('I'), 1, Sys_localindex('F'), 1, Sys_localindex('G'), 1 ]Inp result1) The process is done for each variable one at a time (this is indexed by x).
2) The variable is given index runn which is equal to run if probabilistic and 0 if not.
3) The array is flattened first to 2-D, the value only is kept, added with sample and result_id.
4) Variables are concatenated to each other.
5) Index i is made the index of the implicit index.var output:= 0;
var e:= card_res;
index j:= ['Result_id','Result','Sample'];
var x:= 1;
while x<= size(Variables_to_be_save)/size(vari) do (
var c:= slice(Variables_to_be_save,Variables_to_be_save,x);
index runn:= if c[Vari='Probabilistic?']=1 then copyindex(run) else [0];
var b:= getfract(mid(evaluate(c[vari='Var_name'])),0.5);
var a:= if c[Vari='Probabilistic?']=1 then (
var d:= sample(evaluate(c[vari='Var_name']));
d[run=runn])
else (
var d:= b;
if runn=0 then d else d);
index endscen:= 1+e..size(b)+e;
index row2:= 1..size(endscen)*size(runn);
index l:= concat(indexnames(b),['Value']);
a:= mdarraytotable(a,endscen,l);
a:= a[.l='Value'];
a:= array(j,[endscen,a,runn]);
a:= concatrows(a,endscen,runn,row2);
output:= if x= 1 then a else for y:= j do (
concat(output[j=y],a[j=y]) );
e:= e+size(b);
x:= x+1);
index i:= 1..size(output)/size(j);
for y:= j do (slice(output[j=y],i))288,312,148,162,31,17,528,7692,624,21,366,606,0,MIDM[Sys_localindex('J'),Sys_localindex('I')][0,0,0,0][1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24][Sys_localindex('RUNN'),1,Iresult,3,Sys_localindex('ENDSCEN'),1]Write indexif slice(indices_missing,1) = 'All indices have been defined already' then inp_ind else (
dbwrite(odbc_write, appendtablesql(inp_ind,Indices_missing,Inp_ind.j,'`Index` '));
'Done')408,80,148,1665535,45873,39321[Indices_missing,Sys_localindex('J')][]ODBC LibraryLonnieThu, Sep 11, 1997 2:15 PMLonnieTue, Feb 05, 2008 10:03 AM48,24408,616,152,201,1,1,1,1,1,0,0,0,01,20,272,499,497,17Arial, 13(A:ArrayType;I:IndexType;L:IndexType;row;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.(';;INSERT IGNORE INTO ' & dbTableName & '(' & JoinText(L,L,',') & ') VALUES (' & Vallist(A[I=row],L)) & ')'184,32,152,242,41,136,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,24V,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,dbTableNameInp_indvar a:= if Dimensions[.j='Dim_name']=New_index_info[iind='Dim_name'] then Dimensions[.j='Dim_id'] else 0;
a:= sum(a,dimensions.i);
index j:= ['Ind_id','Ind_name','Dim_id'];
array(j,[
Card_obj+@Indices_missing,
indices_missing,
a])['item 1']288,80,148,162,197,430,416,303,0,MIDM2,616,387,416,303,0,MIDM19661,48336,65535[Iind,Self][Indices_missing,Sys_localindex('J')]['item 1'][Indices_missing,1,Sys_localindex('CO'),1,Sys_localindex('I'),1]iind['Dim_name','Description node']56,192,148,13['Dim_name','Description node']New dimension infoTable(Idim,Dimensions_missing)(
'Statistical and other parameters of a variable',
'-'
)['item 1']56,41,148,312,230,44,767,303,0,MIDM2,297,603,561,204,0,MIDM[Formnode Inp_dim1]52425,39321,65535[Idim,Dimensions_missing][Idim,Dimensions_missing]['item 1']idim['Dim_title','Dim_unit']56,80,148,13['Dim_title','Dim_unit']Inp rowvar a:= if New_locs[.j='Ind_name'] = Inp_ind[.j='Ind_name'] then Inp_ind[.j='Ind_id'] else 0;
a:= sum(a,Indices_missing);
index j:= ['Ind_id','Row_number','Loc_id'];
a:= array(j,[a,New_locs[.j='Row_number'],inp_loc[.j='Loc_id']])['item 1']288,160,148,162,597,410,598,3632,250,441,416,303,0,MIDM2,782,442,448,347,0,MIDM19661,48336,65535[Self][Sys_localindex('J'),Sys_localindex('I')]['item 1']Inp loc1) a defines the dim_id.
2) b defines the loc_id. If the location exists already, this loc_id is used; otherwise, a sequence of numbers is used.
3) information is written into the right table format.var a:= if New_locs[.j='Dim_name'] = Dimensions[.j='Dim_name'] then Dimensions[.j='Dim_id'] else 0;
a:= max(a,Dimensions.i);
var b:= if new_locs[.j='Dim_name'] = locations[.j='Dim_name'] and new_locs[.j='Location'] = locations[.j='Location'] then locations[.j='Loc_id'] else 0;
b:= max(b,locations.i);
b:= if b>0 then b else card_loc+@New_locs.i;
index j:= ['Loc_id','Dim_id','Location','Description'];
a:= array(j,[b, a, New_locs[.j='Location'], new_locs[.j='Description']]);['item 1','item 2','item 3','item 4','item 5','item 6','item 7','item 8','item 9','item 10','item 11','item 12','item 13','item 14','item 15','item 16','item 17','item 18','item 19','item 20','item 21']288,120,148,162,556,110,476,5512,319,169,421,433,0,MIDM2,18,51,780,757,0,MIDM19661,48336,65535[Self][Sys_localindex('J'),Sys_localindex('I')]['item 1','item 2','item 3','item 4','item 5','item 6','item 7','item 8','item 9','item 10','item 11','item 12','item 13','item 14','item 15','item 16','item 17','item 18','item 19','item 20','item 21'][Sys_localindex('J'),3,Sys_localindex('K'),1]Card objReset;
index a:= DBquery(odbc,'
SELECT id
FROM Obj
');
index b:= dblabels(a);
max(max(DBTable(a, b ),a),b)168,40,148,1639325,65535,39321Card locReset;
index a:= DBquery('DSN=resultdatabase','SELECT Loc_id
FROM `Location` ');
index b:= ['Loc_id'];
max(max(DBTable(a, b ),a),b)168,120,148,1639325,65535,39321Write dimensionif slice(dimensions_missing,1) = 'All dimensions have been defined already' then inp_dim else (
dbwrite(odbc_write, appendtablesql(Inp_dim,Dimensions_missing,Inp_dim.j,'Dimension '));
'Done')408,40,148,162,312,322,698,303,0,MIDM65535,45873,39321[Dimensions_missing,Sys_localindex('J')][]Card resReset;
index a:= DBquery(odbc,'SELECT Result_id
FROM `Result` ');
index b:= ['Result_id'];
max(max(DBTable(a, b ),a),b)168,312,148,1639325,65535,39321Inp loc of resultgetfract forces the effect of sample() away, while mid doesn't
1) Does the process for each variable one at a time. Only the deterministic information about variables are considered (therefore getfract).
2) Gets the samplesize (0 if deterministic) for the variable.
3) Gets the Var_id for the variable.
4) Flattens the array. The value is discarded and only the location info is kept. Location is changed into text because that is the format in the RDB.
5) Gets the Dimension (Dim_id) for each index of h.
6) Gets the Location (Loc_id) for each cell in a, given the dimension and location.
7) Gets the Ind_id for each Index listed in h.
8) Flattens the array a.
9) Concatenates the results of all variables.
10) Makes Row the index of the implicit index.var output=0;
var e:= card_res;
index j:= ['Loc_id','Result_id','Var_id','Ind_id','N'];
var x:= 1;
while x<= size(Variables_to_be_save)/size(vari) do (
var c:= slice(Variables_to_be_save,Variables_to_be_save,x);
var a:= getfract(mid(evaluate(c[vari='Var_name'])),0.5);
Var n:= if c[vari='Probabilistic?']=0 then 0 else samplesize;
var var_id:= if c[vari='Var_name'] = variables[.j='Var_name'] then variables[.j='Var_id'] else 0;
var_id:= sum(var_id, variables.i);
index h:= indexnames(a);
index l:= concat(h,['Value']);
index roww:= 1..size(a)*size(h);
index endscen:= 1+e..size(a)+e;
e:= e+size(a);
a:= mdarraytotable(a,endscen,l);
a:= a[l=h]&'';
var dim:= if h=indices[.j='Ind_name'] then indices[.j='Dim_id'] else 0;
dim:= sum(dim,indices.i);
a:= if a=Locations[.j='Location'] and dim=Locations[.j='Dim_id'] then Locations[.j='Loc_id'] else 0;
a:= sum(a,Locations.i);
var ind_id:= if h= indices[.j='Ind_name'] then indices[.j='Ind_id'] else 0;
ind_id:= sum(ind_id,indices.i);
a:= array(j,[a,endscen,var_id,ind_id,n]);
a:= concatrows(a,a.h,endscen,roww);
output:= if x= 1 then a else for y:= j do (
concat(output[j=y],a[j=y]) );
x:= x+1);
index i:= 1..size(output)/size(j);
for y:= j do (slice(output[j=y],i))288,352,148,162,59,37,518,7932,281,16,434,814,0,MIDM[Sys_localindex('J'),Sys_localindex('I')][][Sys_localindex('H'),3,Sys_localindex('I'),1,Sys_localindex('ENDSCEN'),1]Write locresdbwrite(odbc_write, appendtablesql(inp_loc_of_result,inp_loc_of_result.i, inp_loc_of_result.j,'Loc_of_result '));
'Done'408,352,148,1665535,45873,39321[]Inp run listvar output:= 0;
var e:= card_res;
index j:= ['Result_id','Run_id'];
var x:= 1;
while x<= size(Variables_to_be_save)/size(vari) do (
var c:= slice(Variables_to_be_save,Variables_to_be_save,x);
var b:= getfract(mid(evaluate(c[vari='Var_name'])),0.5);
index endscen:= 1+e..size(b)+e;
var a:= array(j,[endscen,card_obj+1]);
output:= if x= 1 then a else for y:= j do (
concat(output[j=y],a[j=y]) );
e:= e+size(b);
x:= x+1);
index i:= 1..size(output)/size(j);
for y:= j do (slice(output[j=y],i))288,392,148,162,102,90,476,5782,859,396,372,337,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]Run infoTable(Irun)(
'2008-10-09','Jouni','RDB connection.ANA 9.10.2008')168,464,148,162,246,120,629,303,0,MIDM2,415,466,457,303,0,MIDM[Formnode Inp_run1]52425,39321,65535[Irun,Self][Self,Irun]2,D,4,2,0,0,4,0,$,0,"yyyy-mm-dd",0['item 1']irun['Run_date','Run_who','Run_method']168,488,148,13['Run_date','Run_who','Run_method']New variable infoTable(Ivar,Variables_missing)(
'Personal exposures to volatile organic compounds in Germany',
'ug/m^3'
)56,273,148,222,239,183,675,4532,261,570,589,183,0,MIDM2,152,434,886,303,0,MIDM[Formnode Inp_var1]52425,39321,65535[Ivar,Variables_missing][Ivar,Variables_missing]2,D,4,2,0,0,4,0,$,0,"yyyy-mm-dd",0['item 1','item 2']ivar['Var_title','Var_unit']56,304,148,12['Var_title','Var_unit']Write varif slice(Variables_missing,1) = 'All variables have been defined already' then Inp_var else (
dbwrite(odbc_write, appendtablesql(Inp_var,Variables_missing,Inp_var.co,'Variable '));
'Done')408,272,148,162,232,242,416,303,0,MIDM65535,45873,39321[Variables_missing,Sys_localindex('CO')][]Write rundbwrite(odbc_write, appendtablesql(Inp_run,Inp_run.i,Inp_run.j,'Run '));
'Done'408,432,148,1665535,45873,39321[]Write runlistdbwrite(odbc_write, appendtablesql(inp_run_list,inp_run_list.i,inp_run_list.j,'Run_list '));
'Done'408,392,148,1665535,45873,39321[]Write resultdbwrite(odbc_write, appendtablesql(inp_result,inp_result.i,inp_result.j,'Result '));
'Done'408,312,148,1665535,45873,39321[]Write locationif slice(indices_missing,1) = 'All indices have been defined already' then inp_loc else (
dbwrite(odbc_write, appendtablesql(inp_loc, inp_loc.i,
inp_loc.j, 'Location '));
'Done')408,120,148,1665535,45873,39321[Sys_localindex('I'),Sys_localindex('J')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[]Write rowif slice(indices_missing,1) = 'All indices have been defined already' then inp_row else (
dbwrite(odbc_write, appendtablesql(inp_row,New_locs.i,inp_row.j,'Rows '));
'Done')408,160,148,1665535,45873,39321[Sys_localindex('I'),Sys_localindex('J')]2,D,4,2,0,0,4,0,$,0,"ABBREV",0[]vari['Var_name','Probabilistic?']56,424,148,12['Var_name','Probabilistic?']Reset26756,552,148,121,1,0,1,1,1,0,0,0,0New locs1) Takes the first index and calculates the parameters for it.
2) Does the same for all other indices and concatenates the parameter results.
3) All parameters are lumped into a single array.
4) A complicated way to take into account whether there are any new indices. This is done because if then else cannot be used for these arrays in a straightforward way (the condition cannot have critical dimensions). If-then-else is replaced with conditional slice.
5) Finally, extra rows are removed.
9.10.2008 Jouni Tuomisto
It seems that this part 4) could be simpler in the same way as e.g. Variables_missing. However, I don't want to put time on this issue, because this seems to work.
Today I also added local variable f to make it possible to add descriptions about locations into the Result database. The database has been changed accordingly a few days ago.
Note that this node only seems to work when there is only one new index at a time. Therefore, if you want to use the module, create the indices one by one, add the structure to the database, and only then define your actual variables of interest.var a:= indices_used;
var b:= evaluate(a[@.indices_used=1]);
var c:= if b=0 then a[@.indices_used=1] else a[@.indices_used=1];
var e:= 1..size(b);
var f:= new_index_info[indices_missing=a[@.indices_used=1]];
f:= evaluate(f[iind='Description node']);
f:= if size(f) = size(b) then f else (if b=0 then f else f);
var x:= 2;
while x<=size(a) do (
var d:= evaluate(a[@.indices_used=x]);
b:= concat(b,d);
c:= concat(c,(if d=0 then a[@.indices_used=x] else a[@.indices_used=x]));
e:= concat(e,1..size(d));
var g:= new_index_info[indices_missing=a[@.indices_used=1]];
g:= evaluate(g[iind='Description node']);
g:= if size(g) = size(b) then g else (if b=0 then g else g);
f:= concat(f, g);
x:= x+1);
index k:= 1..size(b);
b:= slice(b,k);
c:= slice(c,k);
e:= slice(e,k);
f:= slice(f,k);
var d:= New_index_info[iind='Dim_name',indices_missing=c];
d:= if d=null then 0 else d;
index j:= ['Dim_name','Location','Ind_name','Row_number', 'Description'];
a:= array(j,[d,b&'',c,e,f]);
index L:= 1..size(k)+1;
index m:= ['All locations have been defined already'];
a:= concat(a,m,k,m,L);
index g:= if slice(indices_missing,1) = 'All indices have been defined already' then size(k)+1..size(k)+1 else k;
a:= slice(a,L,g);
a:= a[g=subset(a[.j='Dim_name'])];
index i:= 1..(size(a)/size(j));
for h:= j do slice(a[j=h],i)168,160,148,162,100,15,521,7842,413,120,778,708,0,MIDM[Sys_localindex('J'),Sys_localindex('I')]['','','','','','','','','',''][Inp_ind,1,Indices_missing,1,Self,1]Variables missingThis 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.
Var a is the variable name list that is being edited. Var e is the list of variables to be saved. Index k is a temporary index for a.
The idea is to find all those variables listed in e (including "All variables have been defined already") that do NOT show up in the existing list of variables.var a:= Variables[.j='Var_name'];
a:= ','&jointext(a,a.i,',')&',';
var e:= Variables_to_be_save[vari='Var_name'];
index k:= concat(['All variables have been defined already'],e);
a:= if findintext(','&k&',',a)>0 then 0 else 1;
a:= if sum(a,a.k)>1 and @k=1 then 0 else a;
subset(a)56,336,148,221,1,1,1,1,1,0,0,0,02,631,16,493,5012,38,575,406,193,0,MIDM39321,39325,65535[Self,Variables_to_be_save]['All variables have been defined already']Indices missingThis node checks the indices listed in variables 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.
For syntax help, see Variables_missing.var a:= Indices[.j='Ind_name'];
a:= ','&jointext(a,a.i,',')&',';
var e:= indices_used;
index k:= concat(['All indices have been defined already'],e);
a:= if findintext(','&k&',',a)>0 then 0 else 1;
a:= if sum(a,a.k)>1 and @k=1 then 0 else a;
subset(a)56,224,148,221,1,1,1,1,1,0,0,0,02,531,26,493,4992,526,562,490,264,0,MIDM39321,39325,65535[Self,Vari]['All indices have been defined already']New index infoTable(Iind,Indices_missing)(
'Pollutant',
'None'
)56,160,148,222,337,297,476,2242,34,74,606,204,0,MIDM2,490,553,520,238,0,MIDM[Formnode Input_ind1]52425,39321,65535[Iind,Indices_missing][Iind,Indices_missing]Indices usedThis lists all indices that are used by all of the variables that are to be inserted into the result database.
This is based on an assumption that the index Ind_var is always the outermost index and therefore last. Then it is sliced away.reset;
var a:= Variables_to_be_save[vari='Var_name'];
a:= indexnames(evaluate(a));
index i:= 1..size(a);
a:= slice(a,i);
a:= if a= 'Variables_to_be_save' then 0 else a;
a[i=subset(a)]168,200,148,162,796,247,476,5662,567,377,416,303,0,MIDM[Sys_localindex('J'),Self]['Age1','Municipality_fin1','Inp_var'][Inp_ind,1,Indices_missing,1,Self,1]Dimensions missingThis node checks the indices listed in variables 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.
For syntax help, see Variables_missing.reset;
var a:= dimensions[.j='Dim_name'];
a:= ','&jointext(a,a.i,',')&',';
var e:= new_index_info[iind='Dim_name']&'' ;
index k:= concat(['All dimensions have been defined already'],e);
a:= if findintext(','&k&',',a)>0 then 0 else 1;
a:= if sum(a,a.k)>1 and @k=1 then 0 else a;
subset(a)56,112,148,221,1,1,1,1,1,0,0,0,02,755,126,493,5932,66,113,513,489,0,MIDM39321,39325,65535[Self,Indices_missing]['All dimensions have been defined already']Inp varvar c:= Card_obj;
index co:= ['Var_id','Var_name','Var_title','Var_unit','Page_id','Wiki_id'];
array(co,[
c+@Variables_missing,
Variables_missing,
New_variable_info[ivar='Var_title'],
New_variable_info[ivar='Var_unit'],
Selecttext( variables_missing, 2),
1])288,272,148,161,1,1,1,1,1,0,0,0,02,102,90,502,4252,255,386,800,303,0,MIDM19661,48336,65535[Variables_missing,Sys_localindex('CO')]Inp_dimindex j:= ['Dim_id','Dim_name','Dim_title','Dim_unit'];
array(j,[
Card_obj+@Dimensions_missing,
Dimensions_missing,
New_dimension_info[Idim='Dim_title'],
New_dimension_info[Idim='Dim_unit']])288,40,148,162,440,450,416,303,0,MIDM[Dimensions_missing,Sys_localindex('J')]ODBC write'Driver={MySQL ODBC 5.1 Driver};Server=10.66.10.102;Database=resultdb;User='&username&'; Password='&password&';Option=3'56,624,148,121,1,0,1,1,1,0,,0,'Add username'56,576,048,121,1,1,1,1,1,0,0,0,0[Formnode Username1]52425,39321,65535'Add password'56,600,048,121,1,1,1,1,1,0,0,0,0[Formnode Password1]52425,39321,65535Inp runindex j:= ['Run_id','Run_date','Run_who','Run_method'];
index i:= 1..1;
var a:= Run_info[Irun=j];
a:= if j='Run_id' then Card_obj+1 else a;
a:= if j='Run_method' then a[j='Run_method']&', '&Run_data else a;
array(i,[a])288,432,148,162,168,178,683,303,0,MIDM[Sys_localindex('I'),Sys_localindex('J')]Agea['18-65','3']280,608,148,12Municipality_fin1['Harjavalta']272,632,164,122,192,588,476,224Variable to test Opasnet Base connectionsmg/kgage1280,552,148,492,93,226,539,360,0,MIDM[]Run data'Edition: '&Analyticaedition&', Platform: '&Analyticaplatform&', Version: '&Analyticaversion&', Samplesize: '&Samplesize168,432,148,162,119,357,476,303,0,MIDM2,I,4,2,0,0,4,0,$,0,"ABBREV",0Size of samplesamplesize400,560,148,16[Formnode Size_of_sample1]2,I,4,2,0,0,4,0,$,0,"ABBREV",0(a:prob)Statsindex statistics:= ['Mean','SD','0.01','0.025','0.05','0.25','0.5 (Median)','0.75','0.95','0.975','0.99'];
a:= array(statistics,[mean(a), sdeviation(a), getfract(a,0.01), getfract(a,0.025), getfract(a,0.05), getfract(a,0.25), getfract(a,0.5), getfract(a,0.75), getfract(a,0.95), getfract(a,0.975), getfract(a,0.99)]);
round(a*10)/10&''400,528,148,12aSee New_locs for tech development needs. 336,216,-184,20(table; label:texttype)Missingvar a:= dimensions[.j='Dim_name'];
a:= ','&jointext(a,a.i,',')&',';
var e:= new_index_info[iind='Dim_name']&'' ;
index k:= concat(['All dimensions have been defined already'],e);
a:= if findintext(','&k&',',a)>0 then 0 else 1;
a:= if sum(a,a.k)>1 and @k=1 then 0 else a;
subset(a)56,472,148,242,102,90,476,224table,labelCard tablearray(table1,[
card('Obj'),
card('Res'),
card('Loc'),
card('Locres'),
card('Roww'),
card('Sett'),
card('Item'),
card('Sam')])520,80,148,242,102,90,476,3282,72,82,416,303,0,MIDM(table:texttype)CardBrings the largest id number from the table defined in the parameter.{index a:= DBquery(odbc,'
SELECT id
FROM '&table&'
');
index b:= dblabels(a);
max(max(DBTable(a, b ),a),b)}
table528,160,148,1239325,65535,39321tableTable['Obj','Res','Loc','Locres','Roww','Sett','Item','Sam']520,112,148,12['Obj','Res','Loc','Locres','Roww','Sett','Item','Sam']Static card tableTable(Table1)(
'Obj','Res','Loc','Locres','Roww','Sett','Item','Sam'
)528,280,148,242,193,270,416,303,0,MIDMThis module saves model results into the Result Database. You need a password for that. Note that the necessary variable, index, dimension, and run information will be asked. You must add all tables before the process is completed.240,48,-1236,40Note! You can insert several variables at the same time. Each variable MUST have at least one index.152,120,-1144,32Te11Fill in the data below if needed (in this order).168,352,-5160,1921,0,0,1,0,1,0,,0,Username0156,196,1140,121,0,0,1,0,0,0,110,0,152425,39321,65535UsernamePassword0156,220,1140,121,0,0,1,0,0,0,110,0,152425,39321,65535PasswordInput ind0156,368,1140,161,0,0,1,0,0,0,78,0,152425,39321,65535New_index_infoSize of sample1156,460,1140,121,0,0,1,0,0,0,72,0,1Size_of_sampleReaderktluser3. Augta 2008 18:31jtue9. lokta 2008 14:01 48,24112,64,148,241,1,1,1,1,1,0,0,0,01,15,17,593,327,17Arial, 15Var info0272,24,1160,161,0,0,1,0,0,0,214,0,1Var_infoVar result0272,56,1160,161,0,0,1,0,0,0,214,0,1Var_resultVar result1272,88,1160,161,0,0,1,0,0,0,72,0,1Var_result(vident:text, run:optional)Read meanReads the data about the var_name variable from the result database. Uses the run_id run if specified; otherwise uses the newest run of that variable.
PARAMETERS:
* Var_name: the name of the variable in the result database.
* Run_id: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.if isnotspecified(run) then run:= newestrun(vident);
index i:= DBquery(Odbc,'
SELECT Var.Ident as Vident, Var.Name as Vname, Var.Unit as Vunit, Res.id, Ind.Ident as Iident, Loct, Mean, N, Run.Name as Rname
FROM Obj as Var, Res, Locres, Loc, Obj as Ind, Obj as Run, Roww
WHERE Res.Obj_id_r = Run.id
AND Res.Obj_id_v = Var.id
AND Locres.Res_id = Res.id
AND Locres.Roww_id = Roww.id
AND Roww.Obj_id_i = Ind.id
AND Roww.Loc_id = Loc.id
');
index j:= dblabels(i);
dbtable(i,j)56,88,148,162,7,60,516,42839325,65535,39321vident,run(vident:text)NewestrunThis 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 Do_first and Readdata.
PARAMETERS:
* Var_name: the name of the variable in the result database.
* Run_id: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.index i:= DBquery(Odbc,'
SELECT Obj_id_r
FROM Res, Obj as Var
WHERE Var.id = Res.Obj_id_v
AND Var.Ident = "'&vident&'"
GROUP BY Var.id, Obj_id_r
');
index j:= dblabels(i);
max(max(dbtable(i,j),i),j)56,120,148,162,401,51,476,56639325,65535,39321vident(vident:text; run, textornot:optional)Var sampleBrings the data from the result database and transforms it into variables of the correct form.
NOTE! All necessary indices must be created before running this function. The necessary indices can be viewed by calling the function Do_first with the same parameters as this function.
PARAMETERS:
* Vident: the Ident of the variable in the result database.
* Run: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.
* Textornot: Tells whether the result is numerical or text. If parameter is omitted or false, numerical is assumed, otherwise text.
1) Brings the data and makes indices for index list, locations, and result_id's.
2) Makes an array containing result_id, indexed by all indices and all locations.
3) Makes an array containing result_id, indexed by the indices of the variable itself.
4) Brings the results into the structure created in 3). Makes the sample fo along the index Run.var data:= Read_sample(vident, run);
var a:= data[.j='Iident'];
index ind_name:= a[.i=unique(a,a.i)];
a:= data[.j='Loct'];
index location:= a[.i=unique(a,a.i)];
a:= data[.j='Res.id'];
index result_id:= a[.i=unique(a,a.i)];
var x:= 1;
a:= null;
while x<= size(data.i) do (
var b:= data[@.i=x];
a:= if location = b[.j='Loct'] and ind_name = b[.j='Iident'] and result_id = b[.j='Res.id'] then b[.j='Res.id'] else a;
x:= x+1);
var c:= result_id;
x:= 1;
while x<=size(ind_name) do (
c:= if c= a[location=evaluate(ind_name[@ind_name=x]), @ind_name=x] then result_id else 0;
x:=x+1);
c:= sum(c,result_id);
a:= data[.j='sample'];
index sample:= a[.i=unique(a,a.i)];
x:= 1;
a:= null;
while x<= size(data.i) do (
var b:= data[@.i=x];
a:= if c = b[.j='result_id'] and sample = b[.j='sample'] then b[.j='result'] else a;
x:= x+1);
a:= if max(sample)>0 then a[sample=run] else a[@sample=1];
if isnotspecified(textornot) or textornot=false then evaluate(a) else a56,56,148,162,415,23,476,475vident,run,textornot(vident:text; run:optional)Do firstThis function brings the variable from the Result Database and analyses its structure. Each index used will be shown as a column along '.Ind_name', and each location of that index will be shown along '.K'. The last row of '.K' shows the samplesize of the variable.
Use this information to create the necessary indices for your model and to adjust the samplesize of the model. If the samplesize of the model is smaller than in the result database, the remaining samples are omitted; if larger, the cells with no results in the database are replaced with null.
NOTE! The indices created should be lists of labels (not lists of numbers).
PARAMETERS:
* Var_name: the name of the variable in the result database.
* Run_id: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.if isnotspecified(run) then run:= newestrun(vident);
var data:= Read_mean(vident, run);
index j:= ['Iident','Loct'];
var a:= data[.j=j];
index i:= unique(a,a.i);
a:= a[.i=i];
index ind_name:= a[i=unique(a[j='Iident'], i), j='Iident'];
a:= if ind_name=a[j='Iident'] then a[j='Loct'];
index b:= ['Sample size'];
var d:= array(b,[max(data[.j='Sample'])]);
concat(a,d,i,b)56,24,148,162,335,61,476,436vident,runVar infodo_first('Op_en2406')168,128,148,122,680,114,476,2242,653,32,569,698,0,MIDM[Formnode Var_info1][Sys_localindex('IND_NAME'),Sys_localindex('K')]Var resultVar_sample('H2556')168,152,148,122,612,23,639,490,0,MIDM[Formnode Var_result1, Formnode Var_result2][](index1:texttype)DescrThis node brings descriptions (if any) of each location of an index from the result database. The only parameter for function Descr is the name of an index (as text).var a:= sum((if indices[.j='Iident'] = index1 then indices[.j='Dim.id'] else 0), indices.i);
a:= if locations[.j='Dim.id'] = a and locations[.j='Loct'] = evaluate(index1) then locations[.j='Description'] else '';
jointext(a,a.i)56,152,148,162,281,63,476,313index1DescriptionsThis node brings descriptions (if any) of each location of an index from the result database. The only parameter for function Descr is the name of an index (as text).Descr('Condb_agent2')168,176,152,122,287,122,476,2242,610,365,331,391,0,MIDM[Sys_localindex('I')]Op_en2672['ang','bou','brw','caw','cho','dcc','eas','ess','fol','har','mik','nor','nww','por','sea','sev','sos','sou','sww','teh','tha','thr','wes','wrx','yor']456,152,148,24['item 1','item 2','item 3','item 4','item 5','item 6','item 7','item 8','item 9','item 10','item 11','item 12','item 13','item 14','item 15','item 16','item 17','item 18','item 19','item 20','item 21','item 22','item 23','item 24','item 25']newestrun('Op_en2406')312,152,148,24Read_mean('Op_en2406')384,200,148,242,56,66,1002,303,0,MIDM[Sys_localindex('J'),Sys_localindex('I')](vident:text; run, textornot:optional)Var meanBrings the data from the result database and transforms it into variables of the correct form.
NOTE! All necessary indices must be created before running this function. The necessary indices can be viewed by calling the function Do_first with the same parameters as this function.
PARAMETERS:
* Vident: the Ident of the variable in the result database.
* Run: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.
* Textornot: Tells whether the result is numerical or text. If parameter is omitted or false, numerical is assumed, otherwise text.
1) Brings the data and makes indices for index list, locations, and result_id's.
2) Makes an array containing result_id, indexed by all indices and all locations.
3) Makes an array containing result_id, indexed by the indices of the variable itself.
4) Brings the results into the structure created in 3). Makes the sample fo along the index Run.var data:= Read_mean(vident, run);
var a:= data[.j='Iident'];
index ind_name:= a[.i=unique(a,a.i)];
a:= data[.j='Loct'];
index location:= a[.i=unique(a,a.i)];
a:= data[.j='Res.id'];
index result_id:= a[.i=unique(a,a.i)];
var x:= 1;
a:= null;
while x<= size(data.i) do (
var b:= data[@.i=x];
a:= if location = b[.j='Loct'] and ind_name = b[.j='Iident'] and result_id = b[.j='Res.id'] then b[.j='Res.id'] else a;
x:= x+1);
var c:= result_id;
x:= 1;
while x<=size(ind_name) do (
c:= if c= a[location=evaluate(ind_name[@ind_name=x]), @ind_name=x] then result_id else 0;
x:=x+1);
c:= sum(c,result_id);
a:= data[.j='sample'];
index sample:= a[.i=unique(a,a.i)];
x:= 1;
a:= null;
while x<= size(data.i) do (
var b:= data[@.i=x];
a:= if c = b[.j='result_id'] and sample = b[.j='sample'] then b[.j='result'] else a;
x:= x+1);
a:= if max(sample)>0 then a[sample=run] else a[@sample=1];
if isnotspecified(textornot) or textornot=false then evaluate(a) else a56,184,148,162,431,23,476,475vident,run,textornot(vident:text, run:optional)Read sampleReads the data about the var_name variable from the result database. Uses the run_id run if specified; otherwise uses the newest run of that variable.
PARAMETERS:
* Var_name: the name of the variable in the result database.
* Run_id: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.if isnotspecified(run) then run:= newestrun(vident);
index i:= DBquery(Odbc,'
SELECT Res.id, Sample, Result
FROM Res, Sam
WHERE Res.Obj_id_v = "'&vident&'"
AND Res.Obj_id_r ='&Run&'
AND Sam.Res_id = Res.id
');
index j:= dblabels(i);
dbtable(i,j)56,224,148,222,7,60,516,42839325,65535,39321vident,runObject['Age1','Testvariable','Op_fi2345','Op_en2676','Run_info1']360,40,148,24[Formnode Object2]52425,39321,65535iobj['Ident','Name','Unit','Typ_id','Page','Wik_id']360,96,148,242,652,405,476,224Object info1) Finds information for other parameters.
2) Adjusts the information about the Run.var a:= object1;
var b:= findintext(wikis,Identifier of a);
b:= if b=0 then 0 else b+textlength(Wikis);
var c:= sum(if b=0 then 0 else @wikis,wikis);
b:= sum(b,wikis);
b:= if b = 0 then 0 else selecttext(a,b);
var d:= findintext(Object_types,Class of a);
d:= sum(if d=0 then 0 else indexvalue(object_types),object_types);
a:= array(iobj,[
Identifier of a,
Title of a,
Units of a,
d,
b,
c]);
var e:= Object1;
e:= Description of e;
e:= if findintext('Describe the run in this node.',e)=1 then 1 else 0;
a:= if iobj = 'Name' and e=1 then a & ' Edition: '&Analyticaedition&', Platform: '&Analyticaplatform&', Version: '&Analyticaversion else a;
a:= if iobj = 'Typ_id' and e=1 then 9 else a488,88,148,242,102,90,476,3312,469,91,799,303,0,MIDM[Iobj,Object1]2,I,4,2,0,0,4,0,$,0,"ABBREV",0[Object_types,3,Object1,1,Iobj,1]Run infoDescribe the run in this node. The same general instructions apply for Run info as for other objects. In addition, do the following:
* DO change the Identifier and the Title.
* Do NOT change this Description.
* Title should contain the main description of the run WITHOUT the following (which will be added automatically to the Opasnet Base):
** User
** Date
** Analytica version and platform0488,40,148,242,576,173,476,22452425,39321,65535WikisTable(Self)(
'Op_en','Op_fi','Heande','En','Fi','Erac','Beneris','Intarese','Piltti','Kantiva','Bioher','Heimtsa')[1,2,3,4,5,8,9,10,11,13,14,15]496,288,148,24[Object2,Self]Object0408,144,188,131,0,0,1,0,0,0,72,0,152425,39321,65535Object1Object info from the BaseBrings the same information from Opasnet Base as Object info.Brings the same information from Opasnet Base as Object info.48,33,148,31Op_fi23450560,136,148,24Object typesTable(Self)(
'Variable','Dimension','Method','Model','Class','Index','Nugget','Encyclopedia article','Run')[1,2,3,4,5,6,7,8,9]520,224,148,242,674,337,416,303,0,MIDMInstructions for uploading results to the Opasnet Base:
* Make sure that you have created an object page in the Opasnet wiki for each object you want to upload. (This applies also to assessments and runs!)
* Use the wiki identifier as the Identifier for the object in Analytica.
* Use the wiki page name as the Title for the object.
* Make sure that you have defined the Units.
* If an object with the same Ident (Analytica identifier) already exists, metadata about that object will NOT be updated. However, the actual results will be uploaded normally.208,360,-1196,192