question

mark zhen avatar image
0 Likes"
mark zhen asked Jason Lightfoot commented

AGV COLLISION

碰撞偵測.fsm現在關於COLLISION的部分已經趨於完美但我現在有一個想法就是在碰撞的過程中我可以控制其中一台車先移動嗎?

現在是兩台車停下來去做等待那左右兩台車必須停留,那我現在想要左邊停下來5秒鐘後回復運行,右邊則直接進行工作,這是可以完成的嗎?

1656569525516.png

FlexSim 20.0.10
agvcollision
1656569525516.png (10.5 KiB)
碰撞偵測.fsm (68.5 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @mark zhen , was Felix Möhlmann'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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

Here is my attempt to implement this:

I added a custom code activity 'Compare position in network'. In this activity I read the current position of the AGVs on their path from the navigator's tree.

In order to make this work in most situations and because 'left' and 'right' aren't useful indicators because the direction depends on the viewpoint, I implemented the following logic:

If both AGVs are on the same path, the one that has a higher position can continue immediately. (Each path has a set direction, even if it allows two way travel. 'Higher position' means the AGV is position farther along in that direction)

If they are on different paths, the AGV whose path has the higher rank in the tree can continue immediately.

This is done by setting the 'priority' label on the token. The delayTime is later multiplied by this value, so if it is 0, the AGV can continue immediately, if it is 1, the delay time happens as before.

mz.fsm


mz.fsm (71.2 KiB)
· 22
5 |100000

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

mark zhen avatar image mark zhen commented ·

我如果想要套用到別的模板中我該怎麼做直接複製pf是一個好的方法嗎?

0 Likes 0 ·
mark zhen avatar image mark zhen mark zhen commented ·

還有關於樹中的設定可以請您提供您的方法給我嗎?

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

If the other model uses the same process flow, then yes, you should be able to simply copy the new activity and the changes to the delay time assignment.

The token has a reference to the AGV. From its variables treenode, I get to the node of the AGV inside the navigators tree.

The navigator stores the following information:

- The distance the AGV has already traveled during its current movement. ('cachedTravelDist')

1656579469246.png

- The current travel path of the AGV. This path is split into sections by control points and transfers between paths.

- Each section contains information about the start position of the travel on that section (fromDist) and the end position (toDist). Both are given as distance along that path object.

- Each section also knows how far into the total travel distance the AGV will arrive at it (atTravelDist).

1656579498278.png

In this screenshot we see that the travel starts 0.1m along Path1. The AGV will then travel to the end of Path1 at 6.22m with a control point at 4.69m inbetween. So after a total travel distance of 6.12m it will transfer to Path8 at travel another 6.02m on it (from 0 to 6.02).

Together with the total travel distance from the picture above, this allows us to determine which section the AGV is currently on (by comparing the 'cachedTravelDist' to the 'atTravelDist' values. Once we know the section, we can calculate the current position on that path.

0 Likes 0 ·
1656579469246.png (22.9 KiB)
1656579498278.png (13.4 KiB)
Show more comments