<?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: how to get  arrival rate for flow items that arrive an object or node within a time interval ? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517753#M29346</link>
    <description>&lt;P&gt; As Jeff mentioned, there are many useful features available in our most recent version of FlexSim. For example, if you're trying to display the average of a processor's input over the most recent 20 minutes, this can be done with a very small amount of code in a Process Flow text object. For this example I just used triggered a source with the "On Entry" of the processor, then entered a Zone. You can write to the global table in the same code, or elsewhere if you wish.&lt;/P&gt; 
&lt;PRE&gt;treenode zone = getactivity(processFlow, "Zone");
if (time() == 0)
	return 0;
var stat = getstat(zone, "Input", STAT_CURRENT) / (time() / 1200.0);
//sets the value in the global table
settablenum("GlobalTable1", 1, 1, stat);
//displays the value in the text object
return stat;
&lt;/PRE&gt;
&lt;P&gt;The command getstat() can be used outside of Process Flow as well. If all you need is a global table value you can simply set that value from a trigger in a processor, for example. Here is what that might look like:&lt;/P&gt;
&lt;PRE&gt;settablenum("GlobalTable1", 1, 1, getstat(current, "Input", STAT_CURRENT) / 
(time() / 1200));&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Sep 2016 01:41:35 GMT</pubDate>
    <dc:creator>adrian_haws</dc:creator>
    <dc:date>2016-09-01T01:41:35Z</dc:date>
    <item>
      <title>how to get  arrival rate for flow items that arrive an object or node within a time interval ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517751#M29344</link>
      <description>&lt;P&gt;I have sources that create flow items , these flow items will meet at a processor and network node. and i want to know the arrival rate of these flow items at the processor and the network node per each 20 min. i need to record them in a global table too. (flexsim 5)&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 20:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517751#M29344</guid>
      <dc:creator>ahmed_azab</dc:creator>
      <dc:date>2016-08-31T20:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to get  arrival rate for flow items that arrive an object or node within a time interval ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517752#M29345</link>
      <description>&lt;P&gt;My guess is that if you are using FlexSim 5 you or your organization are not current on your maintenance agreement.  You would have to attach your model (current version - 16.1.2) so that we could see how you are trying to do what you are asking.  My guess is that it could be done in a Dashboard.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 00:40:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517752#M29345</guid>
      <dc:creator>jeff_nordgren</dc:creator>
      <dc:date>2016-09-01T00:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to get  arrival rate for flow items that arrive an object or node within a time interval ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517753#M29346</link>
      <description>&lt;P&gt; As Jeff mentioned, there are many useful features available in our most recent version of FlexSim. For example, if you're trying to display the average of a processor's input over the most recent 20 minutes, this can be done with a very small amount of code in a Process Flow text object. For this example I just used triggered a source with the "On Entry" of the processor, then entered a Zone. You can write to the global table in the same code, or elsewhere if you wish.&lt;/P&gt; 
&lt;PRE&gt;treenode zone = getactivity(processFlow, "Zone");
if (time() == 0)
	return 0;
var stat = getstat(zone, "Input", STAT_CURRENT) / (time() / 1200.0);
//sets the value in the global table
settablenum("GlobalTable1", 1, 1, stat);
//displays the value in the text object
return stat;
&lt;/PRE&gt;
&lt;P&gt;The command getstat() can be used outside of Process Flow as well. If all you need is a global table value you can simply set that value from a trigger in a processor, for example. Here is what that might look like:&lt;/P&gt;
&lt;PRE&gt;settablenum("GlobalTable1", 1, 1, getstat(current, "Input", STAT_CURRENT) / 
(time() / 1200));&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 01:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517753#M29346</guid>
      <dc:creator>adrian_haws</dc:creator>
      <dc:date>2016-09-01T01:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to get  arrival rate for flow items that arrive an object or node within a time interval ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517754#M29347</link>
      <description>&lt;P&gt;Record interarrival time &lt;/P&gt;&lt;P&gt;In the source code of the interarrival time you find a function, which sets the return value. Iniate with this function a variable in the source code, Use the picklist item Add Row and Data to Global Table from a Trigger to store the variables value. And finally return the value in the Interarrival Time. The last function is a method to store the data of the arrival in a network node or a processor, too.&lt;/P&gt;&lt;P&gt;A 20 minutes ticker&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;use a user event  in the model triggers of the main menu item tools, which you set to repeat.&lt;/LI&gt;&lt;LI&gt;use a delayed message on a reset trigger and in receiving use the same function to repeat the 20 minutes interval (send delayed message)&lt;/LI&gt;&lt;LI&gt;build a small process with a source which releases every 20 minutes an item right to a sink. Or build a small process, consisting of a source, queue and processor. The connections go from source to queue to processor and back to the queue again. Set the process time to 20 minutes. &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Each of this variant creates events which repeat every 20 minutes. With the involved triggers you can evaluate the global tables which store the data. Labels are used to get or set the last row of the last evaluation.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 04:47:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-get-arrival-rate-for-flow-items-that-arrive-an-object-or/m-p/13517754#M29347</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2016-09-01T04:47:40Z</dc:date>
    </item>
  </channel>
</rss>

