<?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: How to put GA into my model in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-put-ga-into-my-model/m-p/13585394#M82457</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;It looks like you are trying to put python code directly in the FlexScript window. This is not possible. You should write a .py file, not in the model, and then only reference a file name and function name in FlexSim. You also need to toggle the node as "external" not as FlexScript.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1698337037164.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520694iCE3E7B818183AC20/image-size/large?v=v2&amp;amp;px=999" role="button" title="1698337037164.png" alt="1698337037164.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to optimize your model, you should consider an optimizer license. The optimizer that comes with FlexSim uses many evolutionary algorithms, including GA, to optimize the model.&lt;/P&gt;&lt;P&gt;If you really want to write your own optimization algorithm, I'd recommend you use FlexSimPy and treat the model as a black box, rather than trying to optimize within FlexSim. Create a model that is governed by model parameters. Then use FlexSimPy to launch the model, set the parameters, and obtain performance measures. You can do this in a loop.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/flexsim/FlexSimPy"&gt;https://github.com/flexsim/FlexSimPy&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Oct 2023 16:26:54 GMT</pubDate>
    <dc:creator>JordanLJohnson</dc:creator>
    <dc:date>2023-10-26T16:26:54Z</dc:date>
    <item>
      <title>How to put GA into my model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-put-ga-into-my-model/m-p/13585393#M82456</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.2.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/75210-perfect.py" target="_blank"&gt;PERFECT.py&lt;/A&gt;&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1698304212060.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520696i70D2260736F1487A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1698304212060.png" alt="1698304212060.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1698304365096.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520697iAFE6E3A26D128326/image-size/large?v=v2&amp;amp;px=999" role="button" title="1698304365096.png" alt="1698304365096.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I need to put GA into my model，but I don't know how to put in&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Oct 2023 07:14:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-put-ga-into-my-model/m-p/13585393#M82456</guid>
      <dc:creator>Sean21</dc:creator>
      <dc:date>2023-10-26T07:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to put GA into my model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-put-ga-into-my-model/m-p/13585394#M82457</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;It looks like you are trying to put python code directly in the FlexScript window. This is not possible. You should write a .py file, not in the model, and then only reference a file name and function name in FlexSim. You also need to toggle the node as "external" not as FlexScript.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1698337037164.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1520694iCE3E7B818183AC20/image-size/large?v=v2&amp;amp;px=999" role="button" title="1698337037164.png" alt="1698337037164.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to optimize your model, you should consider an optimizer license. The optimizer that comes with FlexSim uses many evolutionary algorithms, including GA, to optimize the model.&lt;/P&gt;&lt;P&gt;If you really want to write your own optimization algorithm, I'd recommend you use FlexSimPy and treat the model as a black box, rather than trying to optimize within FlexSim. Create a model that is governed by model parameters. Then use FlexSimPy to launch the model, set the parameters, and obtain performance measures. You can do this in a loop.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/flexsim/FlexSimPy"&gt;https://github.com/flexsim/FlexSimPy&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Oct 2023 16:26:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-put-ga-into-my-model/m-p/13585394#M82457</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2023-10-26T16:26:54Z</dc:date>
    </item>
  </channel>
</rss>

