question

Hai L2 avatar image
0 Likes"
Hai L2 asked Hai L2 commented

Tracking operator used on a flow items?

Hi,

I have a 3d model with a dispatcher and multiProcessors. There are 10 named operators assigned to the dispatcher. How can I track which named operator was selected to work on the flow item?

Thanks,

Hai

FlexSim 20.1.2
flexsim 20.1.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.

1 Answer

Parker S avatar image
0 Likes"
Parker S answered Hai L2 commented

@Hai L2

You can do this in an On Receive Task Sequence on the operator. This is the custom code which calls the item using taskSequence.tasks[4].involved1

  1. Object current = ownerobject(c);
  2. TaskSequence taskSequence = param(1);
  3. Object item = taskSequence.tasks[4].involved1;
  4.  
  5. { // ************* PickOption Start ************* //
  6. /***popup:SetLabel*/
  7. /**Set Label on Item*/
  8. Object object = /**\nObject: *//***tag:object*//**/item/**/;
  9. string labelname = /**\nLabel: *//***tag:label*//**/"Operator"/**/;
  10. Variant value = /**\nValue: *//***tag:value*//**/current/**/;
  11. object.labels.assert(labelname).value = value;
  12. } // ******* PickOption End ******* //

Here's a sample model:

operatorlabels.fsm


operatorlabels.fsm (41.9 KiB)
· 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.