mark zhen avatar image
mark zhen asked Jeanette F commented

A* custom code problem


FlexSim 20.0.10
1659934941759.png (17.2 KiB)
· 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 @mark zhen , In reference to the original question, was Kavika F'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 ·

1 Answer

Kavika F avatar image
Kavika F answered mark zhen commented

Hey @mark zhen, I found one of your problems.

In your AGV Process Flow, the "Custom 1Code" activity tries to call ".first" on a variable that is null.


The "paths" variable comes out null, meaning that there is no "travelPath" subnode coming from the agvNavNode variable. When I go to the "agvNavNode" location, this is what I get (it's referencing TaskExecuter2 in the error at 18 seconds).


You'll have to get the paths of the agv another way.

1660086203936.png (4.8 KiB)
1660085970868.png (85.1 KiB)
· 7
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·
This looks like the code I provided in another question that was asking for prioritization on an AGV network. I thought it would be obvious that the same code won't work when using A*.
0 Likes 0 ·
mark zhen avatar image mark zhen Felix Möhlmann commented ·


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann mark zhen commented ·

I had a look at the model you uploaded to google drive in your other post.

The collision logic will work without the 'Custom 1Code' activity. It was used to determine which TaskExecuter would wait and which one could continue immediately (simulating the waiting one stepping out of the way).

The 'Ignore Inactive Members' setting is currently active in the A* navigator. So when a TaskExecuter gets stopped, it will deallocate its node which allows the other to continue.


If you still want to use the logic where only one has to wait, you could read the destination from the currently active task and make a decision based on that.

In the example below, the TaskExecuter that is travelling towards Queue1 does not have to wait.
Important: The destination is determined before the TaskExecuter is stopped (yellow)! The activity marked in orange then later checks if the destination is Queue1. If so, a delay time of 0s is returned.


I noticed two errors in the ProcessFlow:

- The order of the Push the List activities should be switched; the parking is only made available once the AGV is pulled by another task.


- The push values in both activities are not set properly. Those should be the respective objects (AGV, ParkPoint).


0 Likes 0 ·
1660199391557.png (9.2 KiB)
1660199693008.png (133.2 KiB)
1660199988397.png (19.4 KiB)
1660200022415.png (5.6 KiB)
Show more comments

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.