Hi Everyone,
I have 100s of different products in a warehouse and I want to get statistics for all of them such as distance travelled, number entered and exited. So I created the entity instances for each product automatically through data table. The entity.totaldistancetraveled function doesnt increase since the entity doesnt moveby itself but moved by forklift instead. So I have created a state variable called "distanceonforklift" and increased by the difference between the forklift total distance travelled value when entity exits and enters to forklift. I have also created a function called "distancefunction" on the entity and equated it to "distanceonforklift" state variable of the entity. For the return type of function I have chosen "number" and set the unit to "length". I validated that both distance state variable and function is calculated correctly in the facility window. However I cannot output the result of this state variable on the model results screen. I used the following expression under model outputstatistic but it didnt work. "ProductA.DistanceFunction". That expression gives me 0 value although there are some entities of this product which enters and exits the system.
How can I see the average total distance travelled on forklift for the whole population of Product A?