I am trying to calculate the traveled distance of a resource agent throughout the network when accomplishing its tasks.
I tried the functions distanceTo, but they return the Euclidean distance and not the distance traveled through the paths.
I also looked the distance recorded by the model logs in the agen_movement_stats_log and agent_movement_raw_log, but they are erroneously calculated, it takes just a speed*time calculation to realize that the log doesn’t calculates the correct distance traveled. The log calculates just the movements of the resource agent when it doesn’t has an agent attached to it, so in an attempt to get the total distance traveled, I looked for the distance traveled by the agent that was being moved by the resource, but this distance is calculated based on the agent’s speed and not the resource speed regardless of the fact that the agent moves at the resource speed accordingly to its configuration and run time evidence.
Is there any easy way to calculate the total distance traveled by the resource regardless of if it has an agent attached or not?
Thank you.
Only two movements are recorded in the log for the resource: agent_movement_raw_log
The agent being moved gets recorded in the log with its own speed instead of the resource speed (Pala is the attached agent and Extensible is the resource agent):
Do the logs have a bug?