question

Tamilselvan avatar image
0 Likes"
Tamilselvan asked Felix Möhlmann answered

Gets stats of Decision point and Station

Is there is any way to Get the Stats like subnodes.length of the conveyor's Decision point and Station, i could not get the stats if i use Model.find("Station1").subnodes.length.

FlexSim 23.1.1
conveyor
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Getting subnodes of a Decision Point or Station should still work. But those objects generally do not have any subnodes, if you didn't place them there while building the model.

Statistics such as input and output are accessed through the "stats" property like with other objects.

https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Property-stats

To check whether there currently is an item waiting at the DP or Station you can use the following:

Object dp = ...;
Object item = dp.as(Conveyor.DecisionPoint).activeItem;
if(objectexists(item))  {
    // There is an item at the DP
}
5 |100000

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