StatisticsCollector
Description
A class that represents a Statistics Collector
Properties
collectedData | Provides access to data that may be used in Statistics Collector callbacks. |
Methods
getRowForValue | Returns the row number for given value, or 0 if that value is not tied to a row. |
Constructor
StatisticsCollector | Creates a reference to a Statistics Collector. |
Static Methods
getID | Returns a unique ID for a node. |
getPathFromID | Gets the path used to generate an ID for the node. |
StatisticsCollector | Creates a reference to a Statistics Collector. |
Details
Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector.collectedData
readonly StatisticsCollector.CollectedData collectedData
Description
Provides access to data that may be used in Statistics Collector callbacks.
Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector.getRowForValue()
int getRowForValue( Variant value ) |
Parameters
value | The value to find a row number for |
Returns
int | A row number |
Description
Returns the row number for given value, or 0 if that value is not tied to a row.
This method can be used to determine whether a value currently has a row in the current collector. For example, if the row mode is set to Unique Row Values, and you are listening to multiple events, it could be that you want to allow an event to update the row for the value, but prevent that value from adding a row. In this case, the event's Condition might have code like this:collector.getRowForValue(data.item)
Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector Constructor
static StatisticsCollector( Variant id ) |
Parameters
id | The value that specifies a Statistics Collector |
Returns
StatisticsCollector | A StatisticsCollector reference. |
Description
Creates a reference to a Statistics Collector.
Global Statistics Collectors can be referenced by name or by rank. A Statistics Collector's node can also be used.Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector.getID()
static double getID( treenode object ) |
Parameters
object | The node to get an ID for |
Returns
double | The ID of the node |
Description
Returns a unique ID for a node.
All Statistics Collector IDs are generated as they are needed. The first time an object is passed to this method, a new ID will be generated. Subsequent calls to this method for the same treenode will return the same ID. If the node is temporary, such as a flowitem, token, or any node that will be destroyed on reset, then the ID will be a incrementing number, starting with 1. If the node is more permanent, then an ID will be generated by hashing the full path of the object.Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector.getPathFromID()
static string getPathFromID( double id , int maxDepth = 0 ) |
Parameters
id | The ID to retrieve a path for |
maxDepth | The number of names to show in the returned path. |
Returns
string | The path used to create the given ID. |
Description
Gets the path used to generate an ID for the node.
If the ID is valid, and does not refer to a temporary object, this method returns the path that was used to create the ID. If maxDepth is greater than 0, the path will be shortened, so that only maxDepth names will appear in the path. If the ID is not valid, or refers to a temporary object, then an error text will be returned.Do no remove, this fixes the anchor on doc.flexsim.com
StatisticsCollector Constructor
static StatisticsCollector( Variant id ) |
Parameters
id | The value that specifies a Statistics Collector |
Returns
StatisticsCollector | A StatisticsCollector reference. |
Description
Creates a reference to a Statistics Collector.
Global Statistics Collectors can be referenced by name or by rank. A Statistics Collector's node can also be used.