<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Export Calculated Tables after each replication in Experimenter in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506890#M20767</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;your method is correct but you must change the code in the "End of Replication" trigger. Try with the code in the picture below. &lt;/P&gt;&lt;P&gt;Everytime the Experimenter runs a single replication, it opens and runs the model on a new Flexsim, copies the single replication data on the father model, on the node childexfolder, finally closes the child model.&lt;/P&gt;&lt;P&gt;This trigger infact is executed two time: the first time on child model, than on the father model.&lt;/P&gt;&lt;P&gt;You must export the data table that you need only when the trigger is runned by the child model.&lt;/P&gt;&lt;P&gt;For this reason I use the line 8 of the code.&lt;/P&gt;&lt;P&gt;In the line 15 of the code I suggest to write not only the name of the new file, but the full path of the file that you will have.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636557057098.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508044i200D65C34A68CEA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636557057098.png" alt="1636557057098.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In this way you can save on csv file, in a specifi path, your experimenter data.&lt;/P&gt;&lt;P&gt;Also at the end of Experimenter, on view result you can have the possibility to see from Flexsim all this result tables. Go on the tab Statistics Tables, you can find all data tables of the model for all the scenario and replications.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636557945951.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508045i8F02B7BE858B1C5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636557945951.png" alt="1636557945951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I hope I was helpful.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 10 Nov 2021 15:30:23 GMT</pubDate>
    <dc:creator>fapicella</dc:creator>
    <dc:date>2021-11-10T15:30:23Z</dc:date>
    <item>
      <title>Export Calculated Tables after each replication in Experimenter</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506889#M20766</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello everyone,&lt;/P&gt;
 &lt;P&gt;I am trying to export a csv file containing the data in a "Calculated Table" after each replication of the simulation.&lt;/P&gt;
 &lt;P&gt;I have checked the box "save statistics data for each replication".&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636538676945.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508046iFC3670D2888C78BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636538676945.png" alt="1636538676945.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I have inserted a Custom Code at the end of each replication,&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636538853057.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508047iB3745289A35CC2BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636538853057.png" alt="1636538853057.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;And in that code I am trying to export the csv file using the function exporttable(), however, nothing seems to happen after the experimenter's run.&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636539833081.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508048i1243FCCEE68CAEFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636539833081.png" alt="1636539833081.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;do you know if I am doing something wrong? or if there is a second strategy to follow for this task?&lt;/P&gt;
 &lt;P&gt;Thanks a lot for the support&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Nov 2021 10:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506889#M20766</guid>
      <dc:creator>alberto_f2</dc:creator>
      <dc:date>2021-11-10T10:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Calculated Tables after each replication in Experimenter</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506890#M20767</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;your method is correct but you must change the code in the "End of Replication" trigger. Try with the code in the picture below. &lt;/P&gt;&lt;P&gt;Everytime the Experimenter runs a single replication, it opens and runs the model on a new Flexsim, copies the single replication data on the father model, on the node childexfolder, finally closes the child model.&lt;/P&gt;&lt;P&gt;This trigger infact is executed two time: the first time on child model, than on the father model.&lt;/P&gt;&lt;P&gt;You must export the data table that you need only when the trigger is runned by the child model.&lt;/P&gt;&lt;P&gt;For this reason I use the line 8 of the code.&lt;/P&gt;&lt;P&gt;In the line 15 of the code I suggest to write not only the name of the new file, but the full path of the file that you will have.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636557057098.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508044i200D65C34A68CEA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636557057098.png" alt="1636557057098.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In this way you can save on csv file, in a specifi path, your experimenter data.&lt;/P&gt;&lt;P&gt;Also at the end of Experimenter, on view result you can have the possibility to see from Flexsim all this result tables. Go on the tab Statistics Tables, you can find all data tables of the model for all the scenario and replications.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1636557945951.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508045i8F02B7BE858B1C5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1636557945951.png" alt="1636557945951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I hope I was helpful.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Nov 2021 15:30:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506890#M20767</guid>
      <dc:creator>fapicella</dc:creator>
      <dc:date>2021-11-10T15:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export Calculated Tables after each replication in Experimenter</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506891#M20768</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: "&gt;Thank you very much, that was very helpful, now it works perfectly&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Nov 2021 16:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506891#M20768</guid>
      <dc:creator>alberto_f2</dc:creator>
      <dc:date>2021-11-10T16:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Export Calculated Tables after each replication in Experimenter</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506892#M20769</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Any table in the Statistics Table can be queried with a Calculated Table. Create a new Calculated Table, and on the Calculations tab, click the "Enable Direct Editing" button. Then add a query like this:&lt;/P&gt;&lt;PRE&gt;SELECT * FROM Experiment.[St1]&lt;/PRE&gt;&lt;P&gt;Click the Update button to run the query. Then you can export the Calculated Table either in the Excel Export, or you can use the exporttable() command:&lt;/P&gt;&lt;PRE&gt;exporttable(Model.find("Tools/CalculatedTables/St1"), "data.csv", 1)&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Nov 2021 17:12:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/export-calculated-tables-after-each-replication-in-experimenter/m-p/13506892#M20769</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2021-11-10T17:12:05Z</dc:date>
    </item>
  </channel>
</rss>

