Tracked Variables are accessed from the Toolbox.
Tracked Variables accessed through the toolbox are stored in the MODEL:/Tools/TrackedVariables folder. These tracked variables are global for the model. Work In Progress and Time In System are the two default Tracked Variables. When a Flowitem is created, an associated value is added to both of these default variables. These values remain in the model until the model is reset. Additional Tracked Variables may be added to your model through this window.
Tracked Variables can be stored on other nodes in the model. These include, but are not limited to, Global Tables and object labels. You can also create Tracked Variables dynamically using FlexScript.
Tracked variables have the following properties:
|Pins the tracked variable to a Dashboard as either a histogram or line graph.|
Shows the current Tracked Variables. Enter text to rename the Tracked Variable.
The type affects what metadata will be collected and how it will be calculated. Type can be one of the following values:
Tracked variables can be displayed in the Dashboard in multiple graphs:
FlexSim's simulation objects also use tracked variables to record many of their own object-specific statistics. Each object will usually track the standard set of statistics, which are:
Each object can also publish additional statistics depending on the type of object. To see the list of available statistics for an object, you can add a Tracked Variable vs Time chart to a dashboard, then use the button in its properties window to hover over the object of interest. This will list out the object's available statistics.
You can also manually get various statistic values of an object using the Object's
stats property which will give you a reference to each Tracked Variable the
Using the process flow module's Wait For Event or Event-Triggered Source activities, you can also execute logic when an object's statistic changes. Use the button in the activity's properties pane and hover over the desired object to get a list of statistics that can be listened to. Statistic change events will have the format On[StatisticName]Change. A global or local tracked variable will have the OnChange event.
On Change occurs whenever the value of a tracked variable changes
It has the following parameters:
|Old Value||double||The previous value of the tracked variable|
|New Value||double||The new value of the tracked variable|