0

Is there any specific way (except writing functions myself) to calculate traveled distance of a ped object in pedestrian library, something like getDistanceDriven() method in Road Traffic Library?

1 Answers1

1

there is only one way I can think of beyond coding it yourself: use the "Log model execution" functionality. Just click on the database on the project view and tick the box:

. enter image description here

Then run your model and it will record the distance travelled for each agent in the dbase view "agent_movement_stats_log". Note that you can turn off any of the other logs you don't need...

enter image description here

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • Interesting point, and probably I'll use it in future, but for now, I need this data for specific `ped` chosen by user, and meantime I need a way to reach this value in my model both for calculations and display. Is there any form this log? P.S. Although it seems self-coding it is much easier. – Mohammad Hasan N. Oct 28 '18 at 18:57
  • 1
    you cannot define which individual agents to log, only which class (in the class properties). You can reach the vaues with the normal SQL statements but I am not sure if the logs are updated continuously throughout the model or only at the end, you'd need to check that. But I agree: self-coding might be much easier. – Benjamin Oct 29 '18 at 07:35