question

Ahmed Azab avatar image
0 Likes"
Ahmed Azab asked Adrian Haws edited

how to get arrival rate for flow items that arrive an object or node within a time interval ?

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)

Other (please specify)
Other
network nodestriggersarrivalsarrival sequencearrival rate
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeff Nordgren avatar image Jeff Nordgren commented ·

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.

1 Like 1 ·
Adrian Haws avatar image
1 Like"
Adrian Haws answered Adrian Haws edited

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.

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;

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:

settablenum("GlobalTable1", 1, 1, getstat(current, "Input", STAT_CURRENT) / 
(time() / 1200));

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

Record interarrival time

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.

A 20 minutes ticker

  1. use a user event in the model triggers of the main menu item tools, which you set to repeat.
  2. use a delayed message on a reset trigger and in receiving use the same function to repeat the 20 minutes interval (send delayed message)
  3. 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.

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.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.