<?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: Generating token based on probability and distribution in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539972#M46981</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Put the expression into the Arrival field at the bottom that appears when you have a table cell selected, not into the table directly. (Writing it into the cell directly interprets it as text, not FlexScript).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1675061928943.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515033i646E3264CB0E6F98/image-size/large?v=v2&amp;amp;px=999" role="button" title="1675061928943.png" alt="1675061928943.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In your case the resulting table should look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1675061949963.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515034i04A0E5F426BA1CD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="1675061949963.png" alt="1675061949963.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You only see the first row of the code that gets auto-generated when you type in the expression. This was changed in version 22.2 which my screenshot above is from.&lt;/P&gt;&lt;P&gt;Sorry for the confusion.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 30 Jan 2023 07:00:23 GMT</pubDate>
    <dc:creator>moehlmann_fe</dc:creator>
    <dc:date>2023-01-30T07:00:23Z</dc:date>
    <item>
      <title>Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539967#M46976</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.0.8 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi -&lt;/P&gt;
 &lt;P&gt;im not quite sure if there is a way to generate tokens based on the following conditions:&lt;/P&gt;
 &lt;P&gt;Set a probability for token creation for each hourly slot. In the event a token where to be created set a randomize quantity distribution to be generated.&lt;/P&gt;
 &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 33.2339%;"&gt;Time interval&lt;/TD&gt;&lt;TD style="width: 33.2341%;"&gt;Probability&lt;/TD&gt;&lt;TD style="width: 33.3333%;"&gt;Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 33.2339%;"&gt;0600 - 0659&lt;/TD&gt;&lt;TD style="width: 33.2341%;"&gt;20%&lt;/TD&gt;&lt;TD style="width: 33.3333%;"&gt;1 - 4 (2)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 33.2339%;"&gt;0700 - 0759&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="width: 33.2341%;"&gt;50%&lt;/TD&gt;&lt;TD style="width: 33.3333%;"&gt;1 - 4 (1)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 33.2339%;"&gt;0800 - 0859&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="width: 33.2341%;"&gt;10%&lt;/TD&gt;&lt;TD style="width: 33.3333%;"&gt;1 - 4 (4)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thanks in advance.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&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>Sun, 29 Jan 2023 11:48:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539967#M46976</guid>
      <dc:creator>Vns</dc:creator>
      <dc:date>2023-01-29T11:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539968#M46977</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;To use different expressions for the hours of the day, it would be best to use the "Date Time Source".&lt;/P&gt;&lt;P&gt;One way to either create no tokens or a random number is to just multiply two distributions together. "bernoulli" can be set up to either return 1 or 0 with the given probability. So only if it returns 1 will the quantity be something other than 0. The second distribution controls the quantity if it does return 1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1675009684625.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515028iA88D91FB9AA1EA8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1675009684625.png" alt="1675009684625.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Jan 2023 16:28:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539968#M46977</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-01-29T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539969#M46978</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;bernoulli takes a percentage value not probability - so bernoulli(20,1,0)  gives 20% chance of returning 1.&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Jan 2023 17:41:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539969#M46978</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-01-29T17:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539970#M46979</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Right, that's an oversight on my part. Thanks for the correction.&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Jan 2023 17:56:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539970#M46979</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-01-29T17:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539971#M46980</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thanks &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; / &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; for sharing the inputs. &lt;/P&gt;
 &lt;P&gt;I can't seems to get the model to run to generate the tokens based on this setup. Is there a step that i missed? &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/63570-probability-and-distribution.fsm" target="_blank"&gt;probability and distribution.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 04:21:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539971#M46980</guid>
      <dc:creator>Vns</dc:creator>
      <dc:date>2023-01-30T04:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Generating token based on probability and distribution</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539972#M46981</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Put the expression into the Arrival field at the bottom that appears when you have a table cell selected, not into the table directly. (Writing it into the cell directly interprets it as text, not FlexScript).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1675061928943.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515033i646E3264CB0E6F98/image-size/large?v=v2&amp;amp;px=999" role="button" title="1675061928943.png" alt="1675061928943.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In your case the resulting table should look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1675061949963.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1515034i04A0E5F426BA1CD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="1675061949963.png" alt="1675061949963.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You only see the first row of the code that gets auto-generated when you type in the expression. This was changed in version 22.2 which my screenshot above is from.&lt;/P&gt;&lt;P&gt;Sorry for the confusion.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 07:00:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/generating-token-based-on-probability-and-distribution/m-p/13539972#M46981</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-01-30T07:00:23Z</dc:date>
    </item>
  </channel>
</rss>

