Hi all, I have a bunch of data being written to global tables at run time. At the end of each replication , I would like to export the data from the global tables to a CSV file.
It works, but I am getting weird results that are inconsistent with what I should observe. In particular, several of my iterations are giving me incomplete model runs. However, when I use "Apply the following scenario and replication to the model", I get a completely different result from what I exported. I am inclined to believe that the runs in the experimenter could be interfering with the export in a way or another.
I am using the following code:
/**Custom Code*/ Object current = ownerobject(c); int replication = param(1); int scenario = param(2); treenode childexpfolder = param(3); Map task = param(4); if (!objectexists(childexpfolder)){ Table tbl = Table("Output_Result"); string Name = "Output_Result_" + numtostring(replication) + ".csv"; exporttable(tbl, Name,1,1); }