<?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 Removing actions by reinforcement learning in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582137#M79859</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.0.15 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello,&lt;/P&gt;
 &lt;P&gt;I need to pull items 1 to 50, but each is available only once. How to set the Action Parameters please? Shall I use Integer 1 to 50, or Options or anything else?&lt;span class="lia-inline-image-display-wrapper" image-alt="1732266805649.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525933i3FBD530ED5300DEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732266805649.png" alt="1732266805649.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;How to remove already chosen action from the action parameters, so that in the next round RL algorithm could choose only from the remaining item numbers? &lt;/P&gt;
 &lt;P&gt;Thank you, Katerina&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 22 Nov 2024 09:22:06 GMT</pubDate>
    <dc:creator>katerina_fratczak</dc:creator>
    <dc:date>2024-11-22T09:22:06Z</dc:date>
    <item>
      <title>Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582137#M79859</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.0.15 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello,&lt;/P&gt;
 &lt;P&gt;I need to pull items 1 to 50, but each is available only once. How to set the Action Parameters please? Shall I use Integer 1 to 50, or Options or anything else?&lt;span class="lia-inline-image-display-wrapper" image-alt="1732266805649.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525933i3FBD530ED5300DEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732266805649.png" alt="1732266805649.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;How to remove already chosen action from the action parameters, so that in the next round RL algorithm could choose only from the remaining item numbers? &lt;/P&gt;
 &lt;P&gt;Thank you, Katerina&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Nov 2024 09:22:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582137#M79859</guid>
      <dc:creator>katerina_fratczak</dc:creator>
      <dc:date>2024-11-22T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582138#M79860</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi Katerina,&lt;/P&gt;&lt;P&gt;The parameter type "Sequence" is desigened to do what you are asking:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1732782855370.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525928i46C30FC68371E198/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732782855370.png" alt="1732782855370.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You choose sequence length and it creates an array with that length and fills it with consecutive integers. &lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/220/jordan.j.html" nodeid="220"&gt;@Jordan Johnson&lt;/A&gt; Can you please chip in about how this will work in an RL environment?&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Nov 2024 08:37:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582138#M79860</guid>
      <dc:creator>ralf_gruber</dc:creator>
      <dc:date>2024-11-28T08:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582139#M79861</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi Ralf, &lt;/P&gt;
 &lt;P&gt;thank you for your answer. Sequence we have already tried, but there is no possibility to connect it with the RL Tools Parameters - see my answer from yesterday: &lt;A rel="nofollow" id="isPasted" href="https://answers.flexsim.com/questions/171240/sequence-in-reinforcement-learning.html?childToView=173216#comment-173216"&gt;Sequence in reinforcement learning - FlexSim Community&lt;/A&gt;.&lt;/P&gt;
 &lt;P&gt;&lt;STRONG&gt;Since I wrote the question we have tried to use Options 1-50&lt;/STRONG&gt; and removed a chosen option from them after each round using GlobalVariables. Like this the random run in FlexSim works fine, each number is selected only once. &lt;/P&gt;
 &lt;P&gt;&lt;STRONG&gt;Here random run in FlexSim&lt;/STRONG&gt; - chosen numbers are removed from GlobalVariables and Options are updated according to it:&lt;span class="lia-inline-image-display-wrapper" image-alt="1732890228338.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525929i877D68B4C99B4BBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732890228338.png" alt="1732890228338.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;STRONG&gt;But when we run RL&lt;/STRONG&gt;, Python script reads the Action Parameters probably only in the beginning of the training and &lt;STRONG&gt;chooses the same numbers repeatedly&lt;/STRONG&gt;. As they are not available in Options any more, FlexSim uses the last row from the Options instead. Like this the RL agent cannot learn properly. There is also confusion with rows and numbers on them (third row has number 6, which is then used in the model...).&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1732890553301.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525930i05A5D3EC296296A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732890553301.png" alt="1732890553301.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;span class="lia-inline-image-display-wrapper" image-alt="1732890841360.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1525931i48FCCBF93ECF17FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1732890841360.png" alt="1732890841360.png" /&gt;&lt;/span&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Is there any possibility please, how to update available Action Parameters into Python after each Action?&lt;/P&gt;
 &lt;P&gt;Thank you, Katerina&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Nov 2024 14:39:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582139#M79861</guid>
      <dc:creator>katerina_fratczak</dc:creator>
      <dc:date>2024-11-29T14:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582140#M79862</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Using Reinforcement Learning for scheduling purposes is tricky. A while back, I talked with some RL folks (Bonsai, since discontinued). They said that there are generally better tools available for scheduling than training an agent. They mentioned Gurobi as one possibility:&lt;BR /&gt;&lt;A href="https://www.gurobi.com/"&gt;https://www.gurobi.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But that being said, maybe there is a way forward, especially because Gurobi isn't free.&lt;/P&gt;&lt;P&gt;As far as I can tell, the general idea would be to use a single action: which job should be started next. For that, I probably wouldn't use a sequence parameter, but instead discrete parameter from 1 to N. Note also that if you train an AI on a certain number of jobs, you'll always need to supply that number of jobs.&lt;/P&gt;&lt;P&gt;But then, when a job is chosen, you'll need some way to specify that the job isn't available anymore. For that, you'll need something called an action mask. It looks like you can do that with a Maskable PPO algorithm:&lt;BR /&gt;&lt;A href="https://sb3-contrib.readthedocs.io/en/master/modules/ppo_mask.html"&gt;https://sb3-contrib.readthedocs.io/en/master/modules/ppo_mask.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In addition, you'd probably need to send some kind of state information about the current process so the agent can learn to make good scheduling decisions, as part of your observation.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Dec 2024 20:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582140#M79862</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2024-12-02T20:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582141#M79863</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hello Jordan, thank you very much for your answer. We will try to use the action mask, as you mentioned. 
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Dec 2024 09:05:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582141#M79863</guid>
      <dc:creator>katerina_fratczak</dc:creator>
      <dc:date>2024-12-03T09:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Removing actions by reinforcement learning</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582142#M79864</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;One option is to see the article I wrote on this topic, complete with an example:&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/articles/173513/using-reinforcement-learning-for-job-sequencing.html" target="_blank"&gt;https://answers.flexsim.com/articles/173513/using-reinforcement-learning-for-job-sequencing.html&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Dec 2024 19:57:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/removing-actions-by-reinforcement-learning/m-p/13582142#M79864</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2024-12-05T19:57:08Z</dc:date>
    </item>
  </channel>
</rss>

