question

mark zhen avatar image
0 Likes"
mark zhen asked Jeanette F commented

A* custom code problem

我之前有在另一個問題詢問過了,但因為檔案的問題無法解決,目前的問題是我不知道報錯發生的問題是甚麼。1659934941759.png

FlexSim 20.0.10
agvastarcustomcode
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
0 Likes"
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.

1660085959851.png

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

1660086203936.png

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 ·

沒錯這是您之前回覆的問題,但我想要嘗試將兩者進行結合,這樣也方便在很窄的路上利用a*來進行路徑的計算可以不會有邏輯死結的情況。

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.

1660199391557.png

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.

1660199693008.png

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.

1660200022415.png

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

1660199988397.png

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