<?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: Tokens Priority to advance in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499430#M14970</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;After experimenting with this, I determined that it will only work with a Breathe activity before the Pull from List as shown below. Otherwise, the Event-Triggered Source releases the tokens to pull from the list before the items are pushed on the list (or something like that), and the tokens don't move on from the Push to List.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519813i0AE5F834F4E2C189/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.png" alt="Image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The good news is that you can set the time of the Breathe activity to 0.00 seconds. So this all happens in "zero" time.&lt;/P&gt;&lt;P&gt;I don't think you need a breathe before or after the Push to List activity, though. Only the one shown after the Event-Triggered Source and before the Pull from List.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/30565-tokenpriority-2-1-1.fsm" target="_blank"&gt;tokenpriority-2 (1)_1.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 07 Jul 2020 14:43:23 GMT</pubDate>
    <dc:creator>tanner_p</dc:creator>
    <dc:date>2020-07-07T14:43:23Z</dc:date>
    <item>
      <title>Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499425#M14965</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello,&lt;/P&gt;
 &lt;P&gt;I have a question about if there is any way to control the way tokens advance. For example, lets say that I have plenty of tokens in different 'wait for event' activities but the condition is the same for all of them. So after the condition is met, all the tokens should advance. They'll be advancing based on the order they arrived at the activity, but I want them to advance in a certain order based on a priority number. Is there a way to control them based on this priority?&lt;/P&gt;
 &lt;P&gt;I made a simple example of what I want to do, basically, I have 4 tokens on a 'wait for event' activity which is waiting for a message. I'll show when does each token arrives and it's own priority.&lt;/P&gt;
 &lt;UL&gt;&lt;LI&gt;Token 1 arrives at time 0 with a priority value of 200.&lt;/LI&gt;&lt;LI&gt;Token 2 arrives at time 20 with a priority value of 1.&lt;/LI&gt;&lt;LI&gt;Token 3 arrives at time 60 with a priority value of 1000.&lt;/LI&gt;&lt;LI&gt;Token 4 arrives at time 200 with a priority value of 20.&lt;/LI&gt;&lt;/UL&gt;
 &lt;P&gt;The last token will be the one that will force to send the message, so all of them will be able to advance "at the same time". Obviously, they'll be advancing one by one, but I want that the first token to advance should be the token 3, followed by 1,4 and finally 2.&lt;/P&gt;
 &lt;P&gt;I added a breath activity with a debug to show that they'll be advancing in the order that they arrived. Is there any way to do it in the way that I want? &lt;/P&gt;
 &lt;P&gt;This is the model: &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/30506-tokenpriority.fsm" target="_blank"&gt;TokenPriority.fsm&lt;/A&gt;&lt;/P&gt;
 &lt;P&gt;Thanks.&lt;/P&gt;
 &lt;P&gt;Manuel.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jul 2020 18:07:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499425#M14965</guid>
      <dc:creator>manuel_s4</dc:creator>
      <dc:date>2020-07-06T18:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499426#M14966</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="#"&gt;@Manuel Sinco&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;This might be a long shot of a solution and someone may have a better idea, but you could potentially use a Batch activity after the Wait For Event. In the Batch activity, you can make a label array for all the tokens "priority" labels. Then, when you need to reference/pull the one with the highest priority, you can do so through custom code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30517-batch-array.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1502880i3DC13D8CEE276E4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="30517-batch-array.png" alt="30517-batch-array.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you could push the tokens to a list that utilizes the "priority" label, then pull based on the highest priority.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30518-pull-by-highest-priority.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1502881i9A8195903F8A0715/image-size/large?v=v2&amp;amp;px=999" role="button" title="30518-pull-by-highest-priority.png" alt="30518-pull-by-highest-priority.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you have questions about either of these, let me know. I think the list option might be easiest overall, but might require more setup. I'm not sure though.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jul 2020 18:13:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499426#M14966</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-07-06T18:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499427#M14967</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/8186/tannerp.html" nodeid="8186"&gt;@tanner.p&lt;/A&gt;, thanks for your answer. I think that a global list will help me, however, I wouldn't know when to pull them, based on that it should be always that they are able to advance. I updated the question to display better what I want to do, please let me if I'm more clear with that example.&lt;/P&gt;
 &lt;P&gt;Thanks.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jul 2020 18:35:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499427#M14967</guid>
      <dc:creator>manuel_s4</dc:creator>
      <dc:date>2020-07-06T18:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499428#M14968</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;@Manuel Sinco,&lt;/P&gt;&lt;P&gt;This might be kind of a shady technique, but it seems to work. All I did to know when to pull was add an Event-Triggered Source that listens to the List: On Push event.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30507-list-on-push.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1502885i895761B33F53CB71/image-size/large?v=v2&amp;amp;px=999" role="button" title="30507-list-on-push.png" alt="30507-list-on-push.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Then that token pulls the other tokens in order of Priority. Once the original tokens are pulled, they are released and move on to the next activity. It seems to work, but let me know if you run into any issues with it. You should be able to sink the tokens that are pulling, but I sent them to a Custom Code for now so you can see how they work.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/30500-tokenpriority-2.fsm" target="_blank"&gt;tokenpriority_2.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jul 2020 19:01:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499428#M14968</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-07-06T19:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499429#M14969</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank &lt;A rel="user" href="https://answers.flexsim.com/users/8186/tannerp.html" nodeid="8186"&gt;@tanner.p&lt;/A&gt;, actually I think it might work, it was a simple but useful idea, thanks. However, I'm still having my doubts based on the breath after the Event-Triggered Source. In my simulation, there are plenty of breaths and the reason that in the example I sent the message without time was based on that I don't want to interfere with them. Do you think that I should add the push to list also after the Breaths that I have?&lt;/P&gt;
 &lt;P&gt;Thanks.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Jul 2020 14:20:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499429#M14969</guid>
      <dc:creator>manuel_s4</dc:creator>
      <dc:date>2020-07-07T14:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499430#M14970</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;After experimenting with this, I determined that it will only work with a Breathe activity before the Pull from List as shown below. Otherwise, the Event-Triggered Source releases the tokens to pull from the list before the items are pushed on the list (or something like that), and the tokens don't move on from the Push to List.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519813i0AE5F834F4E2C189/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.png" alt="Image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The good news is that you can set the time of the Breathe activity to 0.00 seconds. So this all happens in "zero" time.&lt;/P&gt;&lt;P&gt;I don't think you need a breathe before or after the Push to List activity, though. Only the one shown after the Event-Triggered Source and before the Pull from List.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/30565-tokenpriority-2-1-1.fsm" target="_blank"&gt;tokenpriority-2 (1)_1.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Jul 2020 14:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499430#M14970</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-07-07T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499431#M14971</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Great, thanks &lt;A rel="user" href="https://answers.flexsim.com/users/8186/tannerp.html" nodeid="8186"&gt;@tanner.p&lt;/A&gt; I also did some testing and, in the same way as you, my plan was to do the breath with 0.00 time, but I also had different breaths in my model and I didn't want to interfered between them. &lt;/P&gt;
 &lt;P&gt;The solution was to use the Breath as you suggested and give to the breaths that I already had a time of 0.00001 and it works properly. &lt;/P&gt;
 &lt;P&gt;I think that the right answer is the comment that where you suggested using the push to list idea, so if you can change it to the main answer that would be great or I can accept the initial one if you prefer. &lt;/P&gt;
 &lt;P&gt;Thank you!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Jul 2020 16:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499431#M14971</guid>
      <dc:creator>manuel_s4</dc:creator>
      <dc:date>2020-07-13T16:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Tokens Priority to advance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499432#M14972</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/11546/manuels4.html" nodeid="11546"&gt;@manuel.s4&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the feedback. I'm glad you were able to get it to work properly. I changed the main answer to be the idea with the push to list. Hopefully that's most clear and correct. Thanks!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Jul 2020 16:56:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/tokens-priority-to-advance/m-p/13499432#M14972</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-07-13T16:56:20Z</dc:date>
    </item>
  </channel>
</rss>

