<?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 Know if there is a specific item within a queue in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502197#M17137</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello!&lt;BR /&gt;How can you know if there is a especfic item inside a queue? What code do you have to write?&lt;BR /&gt;I made a simple model where the operator has to take the item with the "cilindro" label from the queue, and if not wait.&lt;BR /&gt;This is not exactly what I want to do in my real model but the idea is that.&lt;/P&gt;
 &lt;P&gt;I have set "model().find("Queue1").subnodes=token.cilindro" in the decide tool but it doesn´t works.&lt;BR /&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45423-cilindro.fsm" target="_blank"&gt;cilindro.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 29 Oct 2021 08:49:37 GMT</pubDate>
    <dc:creator>oscar_c13</dc:creator>
    <dc:date>2021-10-29T08:49:37Z</dc:date>
    <item>
      <title>Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502197#M17137</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello!&lt;BR /&gt;How can you know if there is a especfic item inside a queue? What code do you have to write?&lt;BR /&gt;I made a simple model where the operator has to take the item with the "cilindro" label from the queue, and if not wait.&lt;BR /&gt;This is not exactly what I want to do in my real model but the idea is that.&lt;/P&gt;
 &lt;P&gt;I have set "model().find("Queue1").subnodes=token.cilindro" in the decide tool but it doesn´t works.&lt;BR /&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45423-cilindro.fsm" target="_blank"&gt;cilindro.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Oct 2021 08:49:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502197#M17137</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-10-29T08:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502198#M17138</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The 'token.cilindro' label does not exist until you create the object in the second Create Object activity, after the Decide activity:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1635499599252.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507863i321A9A1B34A6B27E/image-size/large?v=v2&amp;amp;px=999" role="button" title="1635499599252.png" alt="1635499599252.png" /&gt;&lt;/span&gt;When you first create the object, you are storing a label called 'box', so I guess you should compare the subnodes with this label. What I don´t understand in your model is why you are checking if there is a certain item in the queue as you are always creating it before the condition.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:35:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502198#M17138</guid>
      <dc:creator>roi_sn</dc:creator>
      <dc:date>2021-10-29T09:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502199#M17139</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;What I am trying to simulate is that it checks if there something specific in the queue. If this is the first time the token has passed through there, the item being searched for in the queue has probably not been created yet. But since it will be process that ir repeated over time, in the following iterations that item will exist in the queue.&lt;/P&gt;
 &lt;P&gt;The problem is that if I search for something in the queue, that has not yet ben created in the model, it gives me an error.&lt;BR /&gt;&lt;BR /&gt;Imagine that a worker looks at a table to see if there is an item, if there is not, he has to go to the warehouse to find it (create object). He uses that item and then leave it on that table, so the second time he goes to look, the item will be on the table. Within the 3rd iteration the item will no longer serve, and it will be destroyed, so he will look at the table again an there will be nothing.&lt;/P&gt;
 &lt;P&gt;Well, that is what I have done, but, if the operator looks for that item that has not been created, it gives me an error. Any idea how to deal with that? I don´t know if I have explained myself correctly&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Nov 2021 12:16:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502199#M17139</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-11-02T12:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502200#M17140</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;You can use "token.cilindro?" to check whether the item in question exists. This will return "false" if either the label doesn't exist or the value of the label is zero/empty/"null" (for example after the previously assigned item got deleted).&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Nov 2021 13:07:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502200#M17140</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2021-11-02T13:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502201#M17141</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Logical comparison &lt;PRE&gt;a == b&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Nov 2021 16:34:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502201#M17141</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2021-11-02T16:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502202#M17142</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;This is the error&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1635925183276.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507865i974A2ED5A6D54596/image-size/large?v=v2&amp;amp;px=999" role="button" title="1635925183276.png" alt="1635925183276.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;I attach the mini-model&lt;BR /&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45531-cilindro.fsm" target="_blank"&gt;cilindro.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Nov 2021 07:40:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502202#M17142</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-11-03T07:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502203#M17143</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;It may be easier with lists, checking if the item is in the list.&lt;BR /&gt;But i have done something wrong&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45532-cilindro2.fsm" target="_blank"&gt;cilindro2.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Nov 2021 07:54:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502203#M17143</guid>
      <dc:creator>oscar_c13</dc:creator>
      <dc:date>2021-11-03T07:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Know if there is a specific item within a queue</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502204#M17144</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;The "Decide" activity seems to be corrupted somehow. It's not keeping the enteres values for the first two fields.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1635928424881.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1507866i8E3C45B797FDB703/image-size/large?v=v2&amp;amp;px=999" role="button" title="1635928424881.png" alt="1635928424881.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After replacing it with a new one, it works.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45525-cilindro-fixed.fsm" target="_blank"&gt;cilindro_fixed.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In your model using a list there are two problems.&lt;/P&gt;&lt;P&gt;You didn't check the "Keep On List On Early Release" option in the "Push to List" activities, so the values disappear from the list when the token leaves the activity.&lt;/P&gt;&lt;P&gt;You didn't enter anything into the query field of the "Pull from List", so you are only checking if there is &lt;EM&gt;anything&lt;/EM&gt; on the list. You could for example use the name of the items to distinguish between the types. Add the "Name" field (Expression Field) to the list, then you can use it in the query.&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/1519923i3F111F55C7ACC0F0/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;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/45534-cilindro2-fixed.fsm" target="_blank"&gt;cilindro2_fixed.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Nov 2021 08:37:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/know-if-there-is-a-specific-item-within-a-queue/m-p/13502204#M17144</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2021-11-03T08:37:00Z</dc:date>
    </item>
  </channel>
</rss>

