question

Zakir avatar image
1 Like"
Zakir asked Carter Walch commented

How to reduce object speed once colliding in proximity agent system?

AgentSystemExample.fsm

I want my operator (Ship1) to reduce its speed by half when it enters the plane (B1) and return to its initial speed once it exits the plane (B1). How do I go about this?

FlexSim 23.0.9
proximity agent system
· 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.

Carter Walch avatar image Carter Walch commented ·

Hi @Zakir, was Carter Walch'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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

Carter Walch avatar image
0 Likes"
Carter Walch answered

Hi @Zakir ,

agentsystemexample.fsm

Overall, your proximity system is working as intended. There are a couple minor things you could change depending on how you want it to work.

In your proximity system, you have set an Active Rule to apply "only when traveling." Your process flow uses load, unload, and travel activities to move the flow items to their destinations with Ship1. While the load and unload activities include offset travel as part of their logic, the proximity system will only be active during an actual Travel activity. This is why the system currently only works when coming back to the queue because that is the only Travel activity.
1688409236500.png

1688409362296.png

The two ways to fix this are:

1. Add a travel activity for the ship going to the destination so your process flow looks like this. While you have this Active Rule, having two travel activities applies your code for the ship going to the destination AND coming back to the queue.

1688409485742.png

2. If there might be other cases where the ship would enter the storm (B1), it might be better to remove the Active Rule entirely. This way your logic to slow the ship in the proximity system would execute any time the ship enters the storm, regardless of what activity the ship is doing.

ship.gif

This gif shows your code executing and slowing the ship both leaving the queue and coming back. Hope this helps!


1688409236500.png (175.2 KiB)
1688409362296.png (17.4 KiB)
1688409485742.png (17.5 KiB)
ship.gif (496.8 KiB)
5 |100000

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