<?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: Reinforcement Learning's versioning problem in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569962#M70550</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Is the issue resolved by commenting out the check_env() line? I think I have seen that come up before.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 08 Aug 2023 17:28:22 GMT</pubDate>
    <dc:creator>JordanLJohnson</dc:creator>
    <dc:date>2023-08-08T17:28:22Z</dc:date>
    <item>
      <title>Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569957#M70545</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.0.16 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;When I was running the new py environment, I found that the training could not be executed smoothly. I don’t know which link is the problem. I bought a new computer and built a new vscode, but it couldn’t be executed smoothly.&lt;/P&gt;
 &lt;P id="isPasted"&gt;PS C:\Users\R2504_111\Documents\FlexSim 2022 Projects\RL&amp;gt; &amp;amp; C:/Users/R2504_111/AppData/Local/Programs/Python/Python311/python.exe "c:/Users/R2504_111/Documents/FlexSim 2022 Projects/RL/flexsim_training.py"&lt;/P&gt;
 &lt;P&gt;Initializing FlexSim environment...&lt;/P&gt;
 &lt;P&gt;Traceback (most recent call last):&lt;/P&gt;
 &lt;P&gt; File "C:\Users\R2504_111\AppData\Local\Programs\Python\Python311\Lib\site-packages\stable_baselines3\common\env_checker.py", line 402, in check_env&lt;/P&gt;
 &lt;P&gt; env.reset(seed=0)&lt;/P&gt;
 &lt;P&gt;TypeError: FlexSimEnv.reset() got an unexpected keyword argument 'seed'&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;The above exception was the direct cause of the following exception:&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Traceback (most recent call last):&lt;/P&gt;
 &lt;P&gt; File "c:\Users\R2504_111\Documents\FlexSim 2022 Projects\RL\flexsim_training.py", line 53, in &amp;lt;module&amp;gt;&lt;/P&gt;
 &lt;P&gt; main()&lt;/P&gt;
 &lt;P&gt; File "c:\Users\R2504_111\Documents\FlexSim 2022 Projects\RL\flexsim_training.py", line 19, in main&lt;/P&gt;
 &lt;P&gt; check_env(env) # Check that an environment follows Gym API.&lt;/P&gt;
 &lt;P&gt; ^^^^^^^^^^^^^^&lt;/P&gt;
 &lt;P&gt; File "C:\Users\R2504_111\AppData\Local\Programs\Python\Python311\Lib\site-packages\stable_baselines3\common\env_checker.py", line 404, in check_env&lt;/P&gt;
 &lt;P&gt; raise TypeError("The reset() method must accept a `seed` parameter") from e&lt;/P&gt;
 &lt;P&gt;TypeError: The reset() method must accept a `seed` parameter&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 08:30:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569957#M70545</guid>
      <dc:creator>a9080109</dc:creator>
      <dc:date>2023-08-08T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569958#M70546</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="python-flexsim-release-notes.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1518866i91FA97BCFDD8149B/image-size/large?v=v2&amp;amp;px=999" role="button" title="python-flexsim-release-notes.jpg" alt="python-flexsim-release-notes.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You are sure, you did all needed upgrades to use Python 3.11 on FlexSim 22.0 yourself?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 08:59:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569958#M70546</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2023-08-08T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569959#M70547</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Can you show me all the necessary upgrades?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 10:17:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569959#M70547</guid>
      <dc:creator>a9080109</dc:creator>
      <dc:date>2023-08-08T10:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569960#M70548</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hey 
 &lt;A rel="user" href="https://answers.flexsim.com/users/29682/a9080109.html" nodeid="29682"&gt;@mark zhen&lt;/A&gt;! This looks like more of a python question than a FlexSim question. You can try searching other websites for answers or posting there. Let us know if you have a question related to FlexSim!
&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:10:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569960#M70548</guid>
      <dc:creator>julie_weller</dc:creator>
      <dc:date>2023-08-08T15:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569961#M70549</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The provided python scripts are &lt;EM&gt;example code to demonstrate how to communicate with FlexSim from a reinforcement learning algorithm&lt;/EM&gt;. If they don't work perfectly with a particular version of python or&lt;EM&gt; another language, library, package, or implementation&lt;/EM&gt;, then you should customize them according to the needs of your project. As explained in the first paragraph of &lt;A href="https://docs.flexsim.com/en/23.1/ModelLogic/ReinforcementLearning/WorkingWithGym/GettingStarted/GettingStarted.html"&gt;Getting Started with OpenAI Gym (flexsim.com)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It looks like the version of stable_baselines you are using requires a "seed" parameter on the environment's reset() function. In flexsim_env.py, try adding a seed parameter to that function. Something like this:&lt;/P&gt;&lt;PRE&gt;    def reset(self, &lt;STRONG&gt;seed=None&lt;/STRONG&gt;):
        &lt;STRONG&gt;self.seedNum = seed&lt;/STRONG&gt;
        self._reset_flexsim()
        state, reward, done = self._get_observation()
        return state&lt;/PRE&gt;&lt;P&gt;Alter the example python script to work if it isn't working. That's why the script is provided.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 16:36:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569961#M70549</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2023-08-08T16:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569962#M70550</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Is the issue resolved by commenting out the check_env() line? I think I have seen that come up before.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 17:28:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569962#M70550</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2023-08-08T17:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569963#M70551</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I have no way to solve the problem I am encountering now&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1691541410873.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1518870i5852E666D329C42B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1691541410873.png" alt="1691541410873.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Aug 2023 00:36:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569963#M70551</guid>
      <dc:creator>a9080109</dc:creator>
      <dc:date>2023-08-09T00:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569964#M70552</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/29682/a9080109.html" nodeid="29682"&gt;@mark zhen &lt;/A&gt;, you checked if a path description allows characters of more bytes length. Maybe there are only characters allowed of one byte length like an ASCII set. You are dealing with a programming language coming from an origin completely different to a windows system&lt;/P&gt;&lt;P&gt;&lt;A id="isPasted" href="https://docs.python.org/3/tutorial/interpreter.html&amp;lt;/a&amp;gt;"&gt;&lt;/A&gt;&lt;A href="https://docs.python.org/3/tutorial/interpreter.html"&gt;https://docs.python.org/3/tutorial/interpreter.html&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Aug 2023 10:11:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569964#M70552</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2023-08-09T10:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569965#M70553</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/29682/a9080109.html" nodeid="29682"&gt;@mark zhen &lt;/A&gt;, was one of Phil BoBo's or Jordan Johnson's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;
 &lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Aug 2023 13:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569965#M70553</guid>
      <dc:creator>julie_weller</dc:creator>
      <dc:date>2023-08-14T13:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569966#M70554</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Your comment doesn't describe the problem you are encountering now, just a screenshot of a code snippet.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Aug 2023 14:00:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569966#M70554</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2023-08-14T14:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569967#M70555</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@Phil BoBo&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/220/jordan.j.html" nodeid="220"&gt;@Jordan Johnson&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@Joerg Vogel&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/35833/kavikaf.html" nodeid="35833"&gt;@Kavika F&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; &lt;/P&gt;
 &lt;P&gt;I'm having the same problem, but there is still no good way to solve it, I'll provide my code and related versions, I hope it can help me solve the problem, thank you&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/84877-flexsim-training.py" target="_blank"&gt;flexsim_training.py&lt;/A&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/84878-flexsim-training.py" target="_blank"&gt;flexsim_training.py&lt;/A&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/84879-flexsim-env.py" target="_blank"&gt;flexsim_env.py&lt;/A&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1721305561181.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1518874i458C0FDBC37562E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1721305561181.png" alt="1721305561181.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1721305666664.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1518875i1642ABD7206792F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1721305666664.png" alt="1721305666664.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jul 2024 12:27:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569967#M70555</guid>
      <dc:creator>a9080109</dc:creator>
      <dc:date>2024-07-18T12:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reinforcement Learning's versioning problem</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569968#M70556</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/29682/a9080109.html" nodeid="29682"&gt;@mark zhen &lt;/A&gt; , see the files in the following answer:&lt;BR /&gt;&lt;A href="https://answers.flexsim.com/questions/167537/reinforcement-learning-more-decision-events-settin.html"&gt;https://answers.flexsim.com/questions/167537/reinforcement-learning-more-decision-events-settin.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I posted an rl-sample.zip file in that answer. I made many changes to the default files to get it to work. You should be able to work from those with more success.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2024 20:34:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/reinforcement-learning-s-versioning-problem/m-p/13569968#M70556</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2024-07-26T20:34:39Z</dc:date>
    </item>
  </channel>
</rss>

