<?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: Loading All Items From Queue in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544855#M50840</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;If you use regular port connections and don't push to lists then I think you get closer to the 'correct' behaviour avoiding some of the issues you describe.&lt;/P&gt;&lt;P&gt;The issue relating to loading all items from the queue doesn't appear at first glance to be one of the transporter's BreakTo - it's the PassTo of the dispatcher. At 0.88 the male operator goes to the queue with two boxes but only picks up one of them because the other task has already been given to the female operator.&lt;/P&gt;&lt;P&gt;If you want to use lists I'd suggest using a process flow to coordinate the jobs rather than rely on a dispatcher and default pull logic.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Nov 2020 14:09:09 GMT</pubDate>
    <dc:creator>jason_lightfoot_adsk</dc:creator>
    <dc:date>2020-11-17T14:09:09Z</dc:date>
    <item>
      <title>Loading All Items From Queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544853#M50838</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I generally work with the healthcare environment but I have a project that I need to utilize the standard environment in. I've attached my model for reference as well. This might have been better built using the process flow tool but I have 2 issues that I'm working through:&lt;/P&gt;
 &lt;P&gt;1. The transporter is responsible for moving items from outbox queues to inbox queues. I have a dispatcher that is connected to all 3 outboxes and are called to transport items between these queues. I believe the logic is that when an item enters an outbox queue, a transporter is dispatched for that specific item. The problem I'm having is that other items may enter the outbox queue before the transporter gets to that queue to transport the item. Is there a way to possibly add a trigger to the dispatcher to reevaluate how many items are in the outbox queue so that ALL items are taken from that queue and not just the one that was dispatched for? I've read some other answers but can't quite narrow down to this specific case.&lt;/P&gt;
 &lt;P&gt;2. Without the solution to the previous method, I notice that the items aren't FIFO when placed from an outbox queue to an inbox queue when the transporter carries more than one item. I notice this as the red item travel through the process. I'm thinking it has something to do with the push/pull lists but I'm not entirely sure.&lt;/P&gt;
 &lt;P&gt;Thank you for the help.&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/34276-airplane-exercise-simulation-test.fsm" target="_blank"&gt;Airplane Exercise Simulation (Test).fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 00:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544853#M50838</guid>
      <dc:creator>dmdurbinMDA</dc:creator>
      <dc:date>2020-11-17T00:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loading All Items From Queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544854#M50839</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The default transport job action is in fact LIFO for the last loaded item, then it depends on the order of the tasksequence queue. &lt;/P&gt;&lt;P&gt;Taskexecuters get into action whenever they receive a Task Sequence. When a Task Sequence finishes, then a next Task Sequence is chosen from the Task Sequence Queue. You can order the Task Sequence Queue. The default mechanism is ordering by Priority value of Task Sequences. &lt;BR /&gt;There is a Task Type in the Sequence of a transport job, which is responsible to load more items. It is the &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/21.0/Reference/TaskSequences/TaskSequenceTypes/#break" target="_blank"&gt;Break&lt;/A&gt; task type. If the Task Executer is capable to load more items, because his transport capacity is not depleted, then the Break task let execute the function&lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/21.0/Reference/3DObjects/TaskExecuters/TaskExecuterConcepts/#events" target="_blank"&gt; &lt;U&gt;To Break&lt;/U&gt;&lt;/A&gt;&lt;U&gt; &lt;/U&gt;in the Taskexecuter. The default option chooses a next available Task Sequence of Task Sequence Queue, which has not begun already. The Task Sequence, which has initiated the break function is put as an already begun Task Sequence into the Task Sequence Queue to get finished later. &lt;BR /&gt;You can set priorities of Task Sequences to force an order after a Task Sequence had finished to execute the next Task Sequence. But there is still the problem of the last loaded item. This transport job Task Sequence runs without executing the Break To function and will be unloading the last loaded item first. There is a parameter in the Break Task which forces the Taskexecuter to execute always the Break To function. If &lt;U&gt;Var1&lt;/U&gt; is set not to 0 then the Break To function gets executed anyway. Then you can customize the source code to divert the execution of Task Sequence from the currently active to a different Task Sequence. If the  Taskexecuter has not got any transport capacity left or there aren’t any Task Sequences to begin with, then the Taskexecuter must continue the already begun Task Sequence which loaded the first item into him. There are maybe more conditions to fulfill, but that is something you must decide.&lt;/P&gt;&lt;P&gt;You can enforce the parameter Var1 to be 1 in the On Receive Task Sequence event trigger of the Taskexecuter by changing the Variable value. Therefore you must cast the Task Sequence treenode ts into the Class Tasksequence, if it has not been done in the source code header of the trigger. Then you can set the &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/21.0/Reference/CodingInFlexSim/FlexScriptAPIReference/TaskExecuter/TaskSequence.Task.html#Property-var1" target="_blank"&gt;first variable&lt;/A&gt; of the &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/21.0/Reference/CodingInFlexSim/FlexScriptAPIReference/TaskExecuter/TaskSequence.html#Property-tasks" target="_blank"&gt;third task&lt;/A&gt; of the task sequence to the value 1.&lt;/P&gt;&lt;PRE&gt;Tasksequence castedTS = ts;
castedTS.tasks[3].var1 = 1;&lt;/PRE&gt;If you want to enforce FIFO then you can set the &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/21.0/Reference/CodingInFlexSim/FlexScriptAPIReference/TaskExecuter/TaskSequence.html#Property-priority" target="_blank"&gt;priority&lt;/A&gt; of the receiving descending begining from first loaded item. &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/answers/92506/view.html" target="_blank"&gt;Here&lt;/A&gt; you find a similar approach in another thread.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 05:56:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544854#M50839</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2020-11-17T05:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loading All Items From Queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544855#M50840</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;If you use regular port connections and don't push to lists then I think you get closer to the 'correct' behaviour avoiding some of the issues you describe.&lt;/P&gt;&lt;P&gt;The issue relating to loading all items from the queue doesn't appear at first glance to be one of the transporter's BreakTo - it's the PassTo of the dispatcher. At 0.88 the male operator goes to the queue with two boxes but only picks up one of them because the other task has already been given to the female operator.&lt;/P&gt;&lt;P&gt;If you want to use lists I'd suggest using a process flow to coordinate the jobs rather than rely on a dispatcher and default pull logic.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 14:09:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544855#M50840</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2020-11-17T14:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Loading All Items From Queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544856#M50841</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;This makes more sense, I didn't realize it would be a break activity but makes sense with your description.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:15:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544856#M50841</guid>
      <dc:creator>dmdurbinMDA</dc:creator>
      <dc:date>2020-11-17T18:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loading All Items From Queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544857#M50842</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you, I used the standard port connections vs pushing them to a list. My instinct was to use the process flow vs default logic. I may give it another try using this approach.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:17:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/loading-all-items-from-queue/m-p/13544857#M50842</guid>
      <dc:creator>dmdurbinMDA</dc:creator>
      <dc:date>2020-11-17T18:17:17Z</dc:date>
    </item>
  </channel>
</rss>

