question

Jerry avatar image
0 Likes"
Jerry asked Jerry commented

Proximity agent is given a label when staying for a certain period of time

Hello.

While using Flexsim HC, there are parts that need to be resolved regarding the Proxy agent.


If an agent is within the scope of a Proximity agent and stays within that range for a certain period of time, I want to give a specific label to the affected agent.


Please give me some advice. Thank you.


Jerry.

FlexSim 22.2.2
lableproximity agentscope
· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
On first approach or detection you send a delayed message to involved agents and set instantly a label value. As long as no other event like separating both changes this label, you can test on receiving if the label value and received message are still valid, then you can set your label as you like.
0 Likes 0 ·
Jerry avatar image Jerry Joerg Vogel commented ·

스크린샷23.png

Thank you for your answer.

But it doesn't work out even if I keep trying.

Is my method wrong?


When another agent approaches an agent whose label value Jerry is 1, I wanted to make the label value of the agent 1 after a certain period of time.

So I set a 40-second delay, but as soon as the agent enter the range, a lable value of 1 is given.

0 Likes 0 ·

1 Answer

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

Youi wrote an assignment operation into the field of the first message parameter. This writes the label value as soon as the message command is executed.

What you want to do is send the value that shall be written to the label as the message parameter and then do the assignment in the "On Message" trigger of the agent. Supposedly after a check to make sure that the other object didn't leave the proximity radius in the meantime.

The message should also better be send from the "On Enter Proximity" trigger. You only want one pending message, not one every time the proximity is updated.

ProximityLabel.fsm


proximitylabel.fsm (34.6 KiB)
· 5
5 |100000

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

Jerry avatar image Jerry commented ·

No matter how much I look at it, I don't know the conditions under which Jerry label is created within Operator when Operator approaches Jerry in the model you sent me.


Since there is no part related to Jerry in the On Enter Proximity code, it seems that it needs to be set somewhere else, so could you tell me where it is?


It's very difficult because I'm not used to Flexsim yet.

Thank you for your valuable time.


Jerry.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Jerry commented ·

The label is set in the "On Message" trigger.1666198823029.png

0 Likes 0 ·
1666198823029.png (53.4 KiB)
Jerry avatar image Jerry Felix Möhlmann commented ·

I said I'd look for it well, but I don't think I did.

can I ask you one last question?


Thanks to this, we succeeded in assigning labels to close agents by adding On Message Trigger to patients we created prior to the start of simulation.


If so, how can I give On Message Trigger to patients who have been created since the start of the simulation?


I'm sorry that you seem to be having a hard time. Thank you.

0 Likes 0 ·
Show more comments