question

Mohamed Eldakroury avatar image
0 Likes"
Mohamed Eldakroury asked Mohamed Eldakroury commented

Plot deliveries total cost or route cost in a GIS model

I am looking at calculating the total cost of deliveries within a GIS model. So, If a flow Item travels between points A and B, I want to record the cost and get a total cost for every route at the end.


I can click on a route in the map and know the cost to travel on this route, but I don't know how to pull this data and use it.

Is there a simple example somewhere?

FlexSim 24.2.1
gis
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 Mohamed Eldakroury commented

You can use the getCost() method of the navigator class to read the distance/duration/cost of a travel action between two GIS points.

Using a task executer reference as the first parameter does not seem to work as advertised in the documentation though. In the attached model I thus trigger the data acquisition just before the travel task starts, so I can read the current location of the truck from the navigator. There are of course numerous other ways of how one could keep track of what point a TE is at at the moment.

gischarts-2.fsm


gischarts-2.fsm (2.9 MiB)
· 1
5 |100000

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

Mohamed Eldakroury avatar image Mohamed Eldakroury commented ·
Thank you! That worked. Good to learn how to do that and get familiar with getCost function.
0 Likes 0 ·