question

Mel avatar image
0 Likes"
Mel asked Jeanette F commented

Collecting/grouping tokens at a specific time interval and ungrouping the parent

I want to implement multiple layers of grouping and ungrouping of tokens, representing the process of packing and unpacking some boxes. I have multiple sources in the process flow, each of them generating tokens (boxes) with a specific properties and label value.

1. First grouping/labeling:

I want to combine these tokens, group, and label them at each 'x' minutes passing (a time interval), using tokens' creation time. So, tokens that have been generated in the first 'x' minutes of the simulation time, have label 1 and so on.

2. Second grouping/labeling:

I have some number of containers as a resource with the capacity of 'y'. I want to see the tokens that got the same label in step 1 require how many containers. i.e. if they are 15 tokens with label 1 in step 1, they need 'z = ceiling(15/y)' number of containers and will get that value as their label value.

3. After doing some operations on the containers, I want to ungroup them based on the label they got at step 1 and then based on the label they got in step 2.


FlexSim 22.0.16
batchzoneconditional decide
· 4
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Mel,

It looks like this question may be part of a homework assignment or academic project. The professors who assign simulation modeling exercises using FlexSim expect that the academic integrity of their assignments will be maintained. In addition, we are supportive of Honor Codes or Pledges that regulate the behavior surrounding academic assignments.

I recommend reading our best practices page on the subject, which includes some resources that you should find helpful as you use FlexSim for academic purposes. I also highly recommend Dr. Allen Greenwood's FlexSim Primer, which was written specifically for students and professors.

0 Likes 0 ·
Mel avatar image Mel Jeanette F ♦♦ commented ·

Hi Jeanette, thanks for the information. However, this is not a homework assignment! I went through the FlexSim's youtube tutorials provided by the main FlexSim page and have difficulty applying some steps in my personal project. My main problems are as follows:

1. How to group tokens while preserving their initial labels and properties and ungroup them based on those initial properties:

After generating tokens in process flow, I did some labeling based on the global table lookup and pushed them into a list. Via a source triggering a pull from a list activity each 'x' minutes, I pulled all the tokens existing in that list but my problem is the list is not getting emptied out for the next pull. Also, the tokens will not preserve their initial labels that I added before pushing them to the list. I need those labels for later unpacking and ungrouping the tokens.

1708384401103.png

0 Likes 0 ·
1708384401103.png (16.6 KiB)
Jeanette F avatar image Jeanette F ♦♦ Mel commented ·
Hello @Mel, Can you share your model?
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Mel, was Joerg Vogel'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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

In a Batch activity you can decide what you want to do with labels of batched items. I suggest you aggregate them in arrays. Then you have still access to label values.
Once you have reduced your number of tokens inside a Batch activity you loose all references of previous existing tokens. Later you can only create new tokens and assign data of your arrays to them.

If you need a more specific answer, we need a model to discuss it with you.

5 |100000

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

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.