question

Alberto F2 avatar image
0 Likes"
Alberto F2 asked Patrick Zweekhorst answered

Problem in Global Table Update

Hello everyone,

I am building a simple warehouse model with a single forklift using the A* module. I also want to create a sort of heat map in which I have the total time spent by the forklift in an area and in which state it is.

My first approach is to use the A* heatmap, but then I see that it records only the traversals and not the time spent in each cell. After that, I tried using a global table and gathering this data directly from the model using the following code:

1634209123235.png

Now, It's happen something strange. If I click on the forklift and run the model very slowly, the table accurately updates, as you can see in the left table. But if I run the simulation faster, the table messes all the data (right table) and update the position and the total travel distance only when the forklift state change.

1634210551771.png 1634209592104.png



Could you suggest how to solve this issue, if necessary, also by changing the approach?

Thanks a lot for your time.

Here you can also find my model.

warehouse model v1_9.fsm

global tablewarehouseheat map
5 |100000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst answered
Hi @Alberto F2 ,

It might be good to call updatelocations before you request the location of the forklift. So I would add updatelocations( Model.find( "Forklift" ) ) on line 23 and try again.
Good luck.

· 1
5 |100000 characters needed characters left characters exceeded

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

Thank you very much. It works perfectly now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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