How to plot distance travelled on graph by agent(s) in Anylogic in Discrete Event Simulation?

350 views Asked by At

Dear Anylogic Experts,

I am trying to calculate the cost based on distance travelled by the agents in GIS environment. Does anyone know how can I calculate this? The final graph function is supposed to look like this: Distance moved by Agent in km or meter multiplied by the Cost per km or meter.

The idea is to see which route will cost how much. The way I have moved agents in via PML. please see picture attached of the process taking place. PLease see picture link here

1

There are 1 answers

2
Benjamin On

there is no default way for this, several options:

  1. Turn on "Model execution logging" and you will get total travelled distance for each agent.
  2. In your MoveTo blocks, log the departure and arrival location (lat/lon) of your agent and use getDistanceGIS(...) to log the total distance from your agent