<?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 Create Experiment Table/Scenarios by Code in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/create-experiment-table-scenarios-by-code/m-p/13526768#M36436</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.0.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi,&lt;/P&gt;
 &lt;P&gt;I previously asked a question on creating model parameters by code (thanks &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; !)&lt;/P&gt;
 &lt;P&gt;I have that working and now I would like to create experiment scenarios by code as well. I know there is the range-based experimenter option, but what I would like to do is create something with more flexibility that that.&lt;/P&gt;
 &lt;P&gt;To start off, I was thinking of the function_s command that &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; provided to create a new parameter. Namely, the following: &lt;/P&gt;
 &lt;OL&gt;&lt;LI style="line-height: 20px; list-style-type: decimal;"&gt;&lt;SPAN style="color: rgb(102, 0, 102);"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 136);"&gt;params&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;paramT&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;find&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 136, 0);"&gt;"&amp;gt;variables/parameters"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;);&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="line-height: 20px; list-style-type: decimal; background: rgb(238, 238, 238);"&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;treenode newParam&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;function_s&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;paramT&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 136, 0);"&gt;"addParameter"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;);&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there a similar command for adding a new scenario perhaps? Once I have that, then I was thinking I could then use a Table class again to add/update the experimenter scenario table.&lt;/P&gt;
 &lt;P&gt;Thanks again for any help!&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 23 Dec 2022 19:48:39 GMT</pubDate>
    <dc:creator>leo_l6</dc:creator>
    <dc:date>2022-12-23T19:48:39Z</dc:date>
    <item>
      <title>Create Experiment Table/Scenarios by Code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/create-experiment-table-scenarios-by-code/m-p/13526768#M36436</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.0.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi,&lt;/P&gt;
 &lt;P&gt;I previously asked a question on creating model parameters by code (thanks &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; !)&lt;/P&gt;
 &lt;P&gt;I have that working and now I would like to create experiment scenarios by code as well. I know there is the range-based experimenter option, but what I would like to do is create something with more flexibility that that.&lt;/P&gt;
 &lt;P&gt;To start off, I was thinking of the function_s command that &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; provided to create a new parameter. Namely, the following: &lt;/P&gt;
 &lt;OL&gt;&lt;LI style="line-height: 20px; list-style-type: decimal;"&gt;&lt;SPAN style="color: rgb(102, 0, 102);"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 136);"&gt;params&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;paramT&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;find&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 136, 0);"&gt;"&amp;gt;variables/parameters"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;);&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="line-height: 20px; list-style-type: decimal; background: rgb(238, 238, 238);"&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;treenode newParam&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;function_s&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;paramT&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 136, 0);"&gt;"addParameter"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0);"&gt;);&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there a similar command for adding a new scenario perhaps? Once I have that, then I was thinking I could then use a Table class again to add/update the experimenter scenario table.&lt;/P&gt;
 &lt;P&gt;Thanks again for any help!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2022 19:48:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/create-experiment-table-scenarios-by-code/m-p/13526768#M36436</guid>
      <dc:creator>leo_l6</dc:creator>
      <dc:date>2022-12-23T19:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create Experiment Table/Scenarios by Code</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/create-experiment-table-scenarios-by-code/m-p/13526769#M36437</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Here's the syntax for adding a scenario and setting a parameter value for it assuming the scenario table already has one scenario.&lt;/P&gt;&lt;PRE&gt;string job="Experiment1";
Table scenarioT=Table(Model.find("Tools/Experimenter&amp;gt;variables/jobs/"+job+"/scenarios/valueTable"));
scenarioT.addRow();
treenode newScenario=last(scenarioT);
int row=newScenario.rank;
newScenario.name="MyScenario2";
scenarioT[row]["Parameter1"]=10;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2022 20:31:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/create-experiment-table-scenarios-by-code/m-p/13526769#M36437</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2022-12-23T20:31:45Z</dc:date>
    </item>
  </channel>
</rss>

