Detect only a specific range by the agent system

Detect only a specific range by the agent system

tsuji_ryusuke
Collaborator Collaborator
1,860 Views
8 Replies
Message 1 of 9

Detect only a specific range by the agent system

tsuji_ryusuke
Collaborator
Collaborator

[ FlexSim 21.0.10 ]

The agent system detects with a circular radius. I want to detect only in a limited range.

Here's information about @Phil BoBo's ideas, but I don't know how to implement it.

Do you have any good advice?

0 Likes
Accepted solutions (1)
1,861 Views
8 Replies
Replies (8)
Message 2 of 9

philboboADSK
Autodesk
Autodesk
Accepted solution

See the AGV models in the Agent Module Example Models - FlexSim Community

1655216414802.png

It gets the intersecting neighbor's location, projects it onto the agent object's coordinate space, uses atan2() to determine the direction that the neighbor is relative to the agent, and then uses an if() statement to ignore collisions that are outside a particular window of direction. (-70 to 70 degrees in the image above for example.)

In those example models, they use that code to avoid triggering proximity with AGVs that are pulled off the main loop onto the spurs.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 9

tsuji_ryusuke
Collaborator
Collaborator

@Phil BoBo

Thank you for information.

I tried to fix it using the link model.

I want to shut down the agent system when the specified proximity range is exceeded, so I set the collision detection logic in OnInProximity.


However, it does not end even if it exceeds the expected range as shown in the figure below.

(It will end earlier than usual)

Image.png


Is there a problem with the settings?

twophaseagvsystem_GT.fsm

0 Likes
Message 4 of 9

philboboADSK
Autodesk
Autodesk

I don't understand what you are saying at all.

What are you trying to "fix"?

What does "shut down the agent system" mean?

Why are you using OnInProximity? If you want something to fire "when the specified proximity range is exceeded," then use OnExitProximity.

The "figure below" didn't attach correctly. All I see is a broken link.

I don't understand what you are trying to accomplish in order to know whether there's a "problem with the settings."

The program does whatever you tell it to do. If you want to do something different, then tell it to do something different.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 5 of 9

tsuji_ryusuke
Collaborator
Collaborator

I'm sorry I couldn't convey the information correctly.

In the original model, once it enter the proximity agent, it will not end unless it deviates from the proximity radius.

I wanted to terminate the proximity agent when it was out of a certain range. That's why I set On In Proximity.

I want to judge whether it is within a specific range for each update interval, and if it deviates from the judgment, I want to terminate the proximity agent.

20220616-1.png

Can this explanation convey it?

Please let us know if you have any missing information.

0 Likes
Message 6 of 9

jason_lightfoot_adsk
Autodesk
Autodesk
It looks to me that you successfully deactivate the narrow phase when it falls outside of the +-70 degree beam. Is that not what you wanted?
0 Likes
Message 7 of 9

tsuji_ryusuke
Collaborator
Collaborator

@Jason Lightfoot

Thank you for your reply.

Please check the attached image.

1655439085289.png

The yellow color of the AGV means that it is within the ± 70 degree beam. I look like I'm out of ± 70 degrees in this image.

Is my understanding wrong?

0 Likes
Message 8 of 9

jason_lightfoot_adsk
Autodesk
Autodesk

I think you may have had the relative position slightly wrong and certainly it did not account for rotations.

In the attached model I've added the drawing of the item location and made it relative to the front of the AGV. You can change the sensor position and check the effect.

twophaseagvsystem-gt_j2.fsm

I'm drawing a dot to check the position as the AGV sees it so you can check when it should be out of range:

1655740648642.png

next agent interval:

1655740725972.png

0 Likes
Message 9 of 9

tsuji_ryusuke
Collaborator
Collaborator

@Jason Lightfoot

Thank you for your reply.

This is exactly what I was looking for.

I am very grateful.