<?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: Batch child tokens in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564015#M65961</link>
    <description>&lt;P&gt;This is the logic I have so far&lt;/P&gt;
&lt;P&gt;&lt;A id="21188" href="https://answers.flexsim.com/storage/attachments/21188-child-batch-logic.fsm"&gt;child-batch-logic.fsm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 11:25:26 GMT</pubDate>
    <dc:creator>sachin_n</dc:creator>
    <dc:date>2019-08-02T11:25:26Z</dc:date>
    <item>
      <title>Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564014#M65960</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.1.1 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I have a process where child/sibling tokens are created and then needs to be combined into the parent token for further processing. Each child must be combined with the original parent, I am not sure if this can be done through Group By option or through a label on the create token activity&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 11:23:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564014#M65960</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-02T11:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564015#M65961</link>
      <description>&lt;P&gt;This is the logic I have so far&lt;/P&gt;
&lt;P&gt;&lt;A id="21188" href="https://answers.flexsim.com/storage/attachments/21188-child-batch-logic.fsm"&gt;child-batch-logic.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 11:25:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564015#M65961</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-02T11:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564016#M65962</link>
      <description>&lt;A rel="user" href="https://answers.flexsim.com/users/7538/sachinn.html" nodeid="7538"&gt;@Sachin N&lt;/A&gt;&lt;P&gt;Here's a simple Process Flow that I think does what you are looking for:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21208-capture.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499834i2BA33C4C04EF4E9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="21208-capture.png" alt="21208-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this Process Flow, the "Create Tokens" produces a child token in "Do Stuff".  Then, the parent token waits in the "Wait for Event" activity until the child token exits "Do Stuff" and they are both batched together in the Batch activity.  The parent token is also given a label "Child" that has a reference to the child token so that it can wait for the token that matches token.Child to exit "Do Stuff":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21209-capture2.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499835i7C082F9DF06255D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="21209-capture2.png" alt="21209-capture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's a working model with this Process Flow: &lt;A id="21210" href="https://answers.flexsim.com/storage/attachments/21210-childbatchlogicanswer.fsm"&gt;childbatchlogicanswer.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 21:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564016#M65962</guid>
      <dc:creator>joseph_g3</dc:creator>
      <dc:date>2019-08-02T21:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564017#M65963</link>
      <description>&lt;P&gt;Thank you! This is what I was looking for!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 16:53:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564017#M65963</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-05T16:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564018#M65964</link>
      <description>&lt;P&gt;Is there a generic label for any child token created? I tried to use token.children.ToArray[] and token.children.length to batch specific child tokens to the parent when there are multiple sources sharing a resource and that didnt seem to work &lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 16:44:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564018#M65964</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-16T16:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564019#M65965</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/7538/sachinn.html" nodeid="7538"&gt;@Sachin N&lt;/A&gt; &lt;/P&gt;&lt;P&gt;To access any child token, use token.children[Index] where "Index" is the which token in the child array you want to access.  In my example, since I labeled all of the children as "token.Child", I can do the same thing (token.Child[Index]).&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 19:00:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564019#M65965</guid>
      <dc:creator>joseph_g3</dc:creator>
      <dc:date>2019-08-16T19:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564020#M65966</link>
      <description>&lt;P&gt;Instead of using a specific label such as token.Child, what is the method to reference child tokens specific to a Create Tokens object? I have multiple Create Token objects generating child tokens all mixed in a process. I would like to batch specific child tokens from the parent Create Token object that generated them. I know it is possible to create a separate label on each Create Token object such as Child1, Child2 and so on, but then the batching will not be possible with one object. Is there a way to use the builtin token.children.ToArray logic to do this batching process?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:43:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564020#M65966</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-19T11:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564021#M65967</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/7538/sachinn.html" nodeid="7538"&gt;@Sachin N&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The way to reference the child tokens of a specific token is by using token.children.  This will give you an array of the child tokens of the specified token.  If you want to access a specific child token, you just have to do token.children[Index].  For example if you wanted the second child token of a specific token, you can use token.children[2].&lt;/P&gt;&lt;P&gt;Correct me if I misunderstood, but it sounds like you want to batch a parent token with all of its children.  I think what you are looking for is something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21608-capture.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499837i32105A951C8EAC78/image-size/large?v=v2&amp;amp;px=999" role="button" title="21608-capture.png" alt="21608-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've modified the last model I gave you to give each parent token a label called "Group".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21609-capture2.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499838i5D3F171E109CC90F/image-size/large?v=v2&amp;amp;px=999" role="button" title="21609-capture2.png" alt="21609-capture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This label references the parent token.  Then, in the "Create Tokens" activity, I gave each of the children of the parent token the same label:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21610-capture3.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499839iB39F226F518CE218/image-size/large?v=v2&amp;amp;px=999" role="button" title="21610-capture3.png" alt="21610-capture3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That way, the parent token and the child tokens all reference the same token: the parent token.&lt;/P&gt;&lt;P&gt;Then I set the "Batch" activity to group the tokens by the "Group" label:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21611-capture4.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499840i224409FE479F838B/image-size/large?v=v2&amp;amp;px=999" role="button" title="21611-capture4.png" alt="21611-capture4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The result of all this is that the parent token and all of its children will get batched together at the "Batch" activity as long as the parent token + the number of children is the same as the batch quantity.&lt;/P&gt;&lt;P&gt;Here the working model: &lt;A id="21612" href="https://answers.flexsim.com/storage/temp/21612-childbatchlogicanswer2.fsm"&gt;childbatchlogicanswer2.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 17:12:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564021#M65967</guid>
      <dc:creator>joseph_g3</dc:creator>
      <dc:date>2019-08-19T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564022#M65968</link>
      <description>&lt;P&gt;I tried to use your logic to build multiple sources, but it still required as many Batch objects as the number of sources. I have a lot of sources generating Child tokens which needs to be batched after a shared process. This makes it unmanageable without accessing the token.children parameter used by flexsim rather than token.xxxx labels created for every source in the model. I would like to have just one Batch object that distinguishes parent/child no matter the source. &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="21662-childbatchinglogic-2.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499841iF91414070BC286B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="21662-childbatchinglogic-2.png" alt="21662-childbatchinglogic-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A id="21663" href="https://answers.flexsim.com/storage/temp/21663-childbatchlogic3.fsm"&gt;childbatchlogic3.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 12:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564022#M65968</guid>
      <dc:creator>sachin_n</dc:creator>
      <dc:date>2019-08-21T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Batch child tokens</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564023#M65969</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/7538/sachinn.html" nodeid="7538"&gt;@Sachin N&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can simply change it back to 1 label called (for instance) Group. Then you need only 1 Label and it doesn't matter from which source it comes. I attached the model. if you let it run you will see it creates all different batches, 1 batch for each token that was originally generated from a source.&lt;A id="21667" href="https://answers.flexsim.com/storage/temp/21667-childbatchlogic-talumis.fsm"&gt;childbatchlogic-talumis.fsm&lt;/A&gt;&lt;BR /&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/7538/sachinn.html" nodeid="7538"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 14:58:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/batch-child-tokens/m-p/13564023#M65969</guid>
      <dc:creator>SCHamoen</dc:creator>
      <dc:date>2019-08-21T14:58:44Z</dc:date>
    </item>
  </channel>
</rss>

