question

Weilong avatar image
0 Likes"
Weilong asked Weilong commented

Why does not the barrier work immediately?

test_barrier.fsmI added a barrier to the model after the program ran for 20 seconds by code, but it didn't work immediately, the taskexecuter can still drive in that area. It won't work until reset. Is there any way to make it effective immediately?

FlexSim 22.2.0
astarusing codebarrier
test-barrier.fsm (623.1 KiB)
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Weilong commented

Add this line:

AStar.navigator.addDynamicBarrier(barrier);

You can also have the barrier in the model at time zero and just add a rule that tests the time.

· 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.

Weilong avatar image Weilong commented ·

Thanks, Your comment solved my problem perfectly!

0 Likes 0 ·