Auto add new techs in agent systems

Auto add new techs in agent systems

preetdesai
Not applicable
20 Views
4 Replies
Message 1 of 5

Auto add new techs in agent systems

preetdesai
Not applicable

[ FlexSim 23.0.2 ]

Hello!

I am sharing a demo model here which is a mini version of my bigger model.

I have operators (tech) who are connected to dispatcher. They are used to fix the fault on processors. I have a safety system in place where if they come into the proximity of processors, that processor will stop until the tech is inside the radius. Eventually, I am going to run my actual simulation with different options of operators which are controlled via parameter.

I noticed that on model reset, the copies of tech is created but not all of them automatically added to agent system. Only 1 tech gets added. How would I do that? They do get added to the tech group and connected to the dispatcher. Only not added to agent system.

demo_model_3.fsm

1677628503150.png

0 Likes
Accepted solutions (1)
21 Views
4 Replies
Replies (4)
Message 2 of 5

Jeanette_Fullmer
Community Manager
Community Manager
Accepted solution

Hello @Preet,

I added some code to the On Set trigger for the parameter. Line 27 creates all the connection and adds the new operators to the groups that the original operator had. After that line I added in basically the same code that is in the create agent and activate agent behavior picklist options in the custom code activity.

1677642975494.png

1677642959009.png

demo-model-3_1.fsm

0 Likes
Message 3 of 5

preetdesai
Not applicable

Hi @Jeanette F. Thank you very much. This is exactly what I am looking for. ONe more question. How would I make default behavior off for these new agents?

1677687497911.png

0 Likes
Message 4 of 5

Jeanette_Fullmer
Community Manager
Community Manager

Hello @Preet,

You will need to add in something that on model start the operators have their behavior turned off. I have not been successful in getting the behavior to turn off before the model run.

demo-model-3_2.fsm

0 Likes
Message 5 of 5

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Preet, was Jeanette F'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