question

Yokota T avatar image
0 Likes"
Yokota T asked Yokota T commented

How to move around inactive AStar members

Hello all,

We are now trying to override the AStar mechanism so that if there is an inactive A* member, the task executer can bypass it rather than ignore it or wait for it to leave.

In the process, we tried to use the AStar.Cell.canGo() method to determine which cells the task executer can move to.

However, this method seems to return false for the direction occupied by the fixed resource, but true for the direction occupied by the task executer.

Is there a better way to determine which direction the task executer can move in?

Thank you.

FlexSim 22.0.14
astar
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Yokota T, was Jordan Johnson's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Yokota T commented

There is an Answers post about making a Kiva system with an attached model:

https://answers.flexsim.com/articles/132744/kiva-system-demo-model.html

In the KivaRobotProcess, a Wait For Event activity listens for when an AGV cannot allocate an AGV node. Then a Wait For Event waits for the node to be allocated for 10 seconds. If the node is not allocated in 10 seconds, then a custom code block issues a preempting delay task. I believe this causes the AGV to re-route around the allocated nodes when it resumes its travel task. Maybe an approach like that would be useful for you.

That approach seems like the right one. However, if it's not for some reason, you could also consider using Dynamic Barriers. For example, if an traveler finishes a set of activities and is waiting to pull a new task from a list, you could place a dynamic barrier while it is waiting, and then remove it when the traveler starts the next task. Here's the dynamic barrier API:
https://docs.flexsim.com/en/22.2/Reference/CodingInFlexSim/FlexScriptAPIReference/AStar/AStar.Navigator.html#Method-addDynamicBarrier

The Kiva model also has examples of placing and removing dynamic barriers.

· 5
5 |100000

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

Yokota T avatar image Yokota T commented ·

@Jordan Johnson,

Thank you for your response. Sorry for my late reply as I was checking requirements with the customer.

I understand that you advised me to switch the navigator to AGVNetwork, but I have confirmed with the customer that it must be A*.

Also, you suggested to use Dynamic Barriers, but the version after 22.1 is not localized for Japanese, so we would like to know if there is a feasible way in 22.0.


I have one additional question.

Is it a specification that the canGo() method returns true for cells allocated to a traveler?


Thank you.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Yokota T commented ·

Can you post an example model? Are your fixed resources listed as Astar members? Have you unchecked the box to ignore inactive members?

1680786111635.png

0 Likes 0 ·
1680786111635.png (16.9 KiB)
Yokota T avatar image Yokota T Jason Lightfoot ♦ commented ·

@Jason Lightfoot

Thanks for the reply.

Can you post an example model?

No. Actually, the model that is causing the problem is with the customer and we have already asked the customer if he could send us the model, but he replied that he could not disclose it.

Therefore, we do not have the actual model in our possession and are unable to provide it to you. We are truly sorry.


Are your fixed resources listed as Astar members?

Yes.


Have you unchecked the box to ignore inactive members?

Yes. If the ignore inactive members checkbox is unchecked, the traveler may be blocked by the inactive member and continue to wait, as shown in the attached sample model.

agv_blocked.fsm

To avoid this, the client is trying to override A*'s algorithm so that the route bypasses the inactive member as well.

In doing so, they assumed that they could use the canGo() method to get the cells that is not allocated by any A* members, but the canGo() method did not seem to take the travelers into account. So they contacted us to see if it was a bug.

And that is why I posted the question here, in order to provide them with a workaround.

I would appreciate it if you could just answer if it is a specification that the canGo() method returns true for a cell that is allocated by an inactive A* member.z


Thank you in advance.

0 Likes 0 ·
agv-blocked.fsm (79.1 KiB)
Show more comments
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

I found a different article on Answers about using AStar:
https://answers.flexsim.com/articles/107103/example-kiva-system-model.html

This article has a model attached made in version 21.2, so it should work in version 22.0.

One key feature is that this model uses dynamic barriers. So you can investigate the code used to add and remove dynamic barriers and use that to go around inactive members.

5 |100000

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

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.