question

Nicholas D avatar image
0 Likes"
Nicholas D asked Nicholas D answered

Multiple Teams - Set State of First Operator Until Other Operators Available

I have a model in which the processor uses multiple teams as a dispatcher. When the first operator arrives, the state of that operator is automatically set to Utilize (even if the other operators needed are not available yet). Is there any way to change the state of this operator during this "waiting for other operators duration"?

FlexSim 21.0.3
dispatcherflexsim 21.0.3multiple operators
· 3
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 ·

If you explore the tree of the taskexecuter (eg, operator), you will find a ongoing coordinated tasksequence in activetasksequence node. Herein you have a utilizetask. A utilizetask can set a taskexecuter in any state. Currently the state is STATE_UTILIZE or 22 (list of states). If you want to set a different state then you have to exchange the state parameter, when the taskexecuter receives the tasksequence in the utilize task. (OnReceive event or trigger). You will identify the tasksequence and cast a pointer to the class TaskSequence, if the receiving tasksequence is still a treenode. Then you set a pointer in the tasksequence by their task rank in the tasks array to get access to the task. Var1 is responsible of the state the taskexecuter gets into, when the utilize gets executed.

1 Like 1 ·
Nicholas D avatar image Nicholas D commented ·

@Logan Gold I apologize for the urgent request, but this is a time-sensitive matter. Is there any chance you can get back to me sometime today on this?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
To do this we need to take control of all the operator requests by creating task sequences in code.

How long do we have?

0 Likes 0 ·

1 Answer

·
Nicholas D avatar image
0 Likes"
Nicholas D answered

@jason.lightfoot I was able to figure out an effective way to get this done. When the operator receives the task sequence a message is sent to the corresponding processor that sets the operator as a label on the processor. The processor then has an OnSetupFinish trigger (both operators must be available) that sets the state of the operator to Busy rather than Utilize. I can then track the operator utilization by only considering the duration in which the operator is in the Busy state.

· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Okay thanks for the update. I'll still try and post a task sequence method here for future reference.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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