question

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

Detect only a specific range by the agent system

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?

FlexSim 21.0.10
agent systems
5 |100000

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

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Ryusuke T commented

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.


1655216414802.png (181.3 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.

Ryusuke T avatar image Ryusuke T commented ·

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

1655262381604.png


Is there a problem with the settings?

twophaseagvsystem_GT.fsm

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Ryusuke T commented ·

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.

0 Likes 0 ·
Ryusuke T avatar image Ryusuke T Phil BoBo ♦♦ commented ·

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 0 ·
20220616-1.png (211.5 KiB)
Show more comments