question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Jason Lightfoot commented

Travel to dynamic GIS location

Hi,

Based on this post I am dynamically creating GIS routes, which I know I'm probably not supposed to do :-)

The route update seems to work fine: in the attached GIS_demo.fsm the GetGISDuration user command synchronously waits for the route update, if needed, then returns the duration of the trip between A and B.

The problem in this model seems to be when I try to send a Task Executer down the newly executed path. To reproduce:

  • Call InitializeGISPoints to create some new points on the map.
  • Reset and Run the model.
    • You'll get an exception the first time a token enters the Travel task.
    • Note that the TravelTime label, which is the requested duration, is shown correctly.
  • Reset and Run again.
    • You'll notice that this time, the TE correctly travels down the indicated path.
    • The same exception now happens for the second leg, which did not exist yet.
  • When run again, all previously seen paths will work correctly but new ones do not.

I'm hoping there's a simple event function I can call to fix this... please help? :-)

FlexSim 24.0.1
task executergis navigatordynamic routing
gis-demo.fsm (90.8 KiB)
· 3
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

Phil BoBo avatar image
0 Likes"
Phil BoBo answered

The routing table for the GIS navigator is only updated on reset. You shouldn't be dynamically creating new connections between points during the model run.

If you want to have dynamically calculated routes during the model run, follow the example in the post you linked to: Update an existing connection route rather than creating new ones.

5 |100000

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