question

Connor M2 avatar image
0 Likes"
Connor M2 asked Connor M2 commented

How to pull 2 operators from a list, and reference operators in process flow?

I'm looking to utilize the custom processors with operators. In order to pull the operators, I'd prefer them to be pulled from a list which is parametrized. As currently set up, the token pulls two operators and stores them in an array. However, later in the process flow, the label on the token is being referenced by its first index only.


See: When the operators are pulled, only one of them travels to the processor.


Is it possible to reference task executers in a token array similar to the fashion I'm trying to currently?

Is there a better way to reference global operators that what I'm trying?

See attached.
Pulling2OperatorsFromList.fsm

FlexSim 21.1.2
operatorsflexsim 21.1.2global listprocessorsmultiple 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 need to split an array, you do it in sub flow by the array length. And if you want to keep the array you use as index “creationRank”. It is a declared variable in the source code of call sub flow. Otherwise you pop each element by the same named method.

1 Like 1 ·
Connor M2 avatar image Connor M2 Joerg Vogel commented ·

Is there a way to view and edit the source code of the sub-flow? Can you explain the potential use case for the "pop" of an array?

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Connor M2, was Eric M's answer helpful? If so, please click the red "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 0 ·

1 Answer

Eric M avatar image
2 Likes"
Eric M answered Connor M2 commented

Hi @Connor M2, the easiest way to do this is with the "synchronize" activity in process flow. You can see I've added this to the first part of your model (you may need to move the operators so they're apart before running it to see how it works). I also changed the acquire resources to only pull 1 operator and changed the resource to reference the group of operators instead of the list. You can use this same process for using two operators to move the boxes from the processor too.

There's also a great tutorial in the manual that might be nice to look at if you would like.

pulling2operatorsfromlist_EM.fsm


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

Connor M2 avatar image Connor M2 commented ·

Hi Eric! Thanks for the prompt response. This does indeed accomplish the use case for two operators working together. However, I'd like to be a little more flexible with my operator calling by task.


You see, I'm referencing an external excel file which is imported to a global table in my model. I'm then referencing that table to set operator requirements and task delay times. In the model you created, I don't see how it could be flexible in such a way. See attached for something that is a little closer to what I'm actually working with. Pulling2OperatorsFromListGlobalTable.fsm


Additionally, as I understand it, aren't "resource" shared assets treated as simplified lists on the back end? What is the difference between the settings I can control on lists vs. the ones that are already set and controlled on "resource" blocks?

I think if I could figure out a way to either reference multiple indices at the same time, or assign two labels to a token from one "pull from list", that would send me in the right direction.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Connor M2 commented ·

You should use a subflow to assign the 'operator' label to each token it created based on the array size and then reference the operator in the task activities.

Model

Model attached.pulling2operatorsfromlistglobaltable_jl.fsm


1 Like 1 ·
Connor M2 avatar image Connor M2 Jason Lightfoot ♦♦ commented ·

This is a great solution! I've implemented it and it seems to be working quite well. I appreciate the prompt responses!

0 Likes 0 ·