Head (before)

Count number of labels that have the same value — SIMUL8 Community Forum

Head (after)

Ask the SIMUL8 Community

Content (before)

Count number of labels that have the same value

NewforSimul8NewforSimul8
Created at
in Community support

Hi there,
I am trying to use routing in collection with the function of matching (for the same label value). However, the number of collection is not a fixed value, the collect value can be between 30 - 54, but they must have the same label value. For example, if the number of items that have the label value of 1 is 44 in the queue, then the activity will collect those 44 items. if the number of items with the label value of 2 is 60, then it will collect only 54 of them. I think I need to use VL, but have no clue where to start.
Also, at the end of the process, I need to batch them out (I have to assemble them during collection), which means, whatever number that were used to collect, must be the number for batching out.
Any ideas? Thanks in advance!!



Comments

  • Was this answer helpful?


    0

    Hello,
    Since you are using Collect Routing in, I believe Match is a useful feature. And the number collected can be adjusted by using the Set Collect Number command in Visual Logic.

    For the Collect Number varying on the label value, you can create 3 Dummy Activities (with Fixed 0 timing), direct Label values to each Dummy using Batch by Condition (e.g. Dummy 1 to collect only when lbl_type = 1), and set a different collect number for each Dummy. That wouldn't require Match I guess. Then, connect the 3 Dummies to the Actual Activity. Make sure to Group the 3 Dummies and the Actual Activity and limit work items in Group to 1: https://www.simul8.com/support/help/doku.php?id=features:groups

    Here's also some help on batch by Condition: https://www.simul8.com/support/help/doku.php?id=features:batchbycondition

    This could match your needs! - Nassim

  • BetweenComments (1)

  • Was this answer helpful?


    0

    @nasSim said:
    Hello,
    Since you are using Collect Routing in, I believe Match is a useful feature. And the number collected can be adjusted by using the Set Collect Number command in Visual Logic.

    For the Collect Number varying on the label value, you can create 3 Dummy Activities (with Fixed 0 timing), direct Label values to each Dummy using Batch by Condition (e.g. Dummy 1 to collect only when lbl_type = 1), and set a different collect number for each Dummy. That wouldn't require Match I guess. Then, connect the 3 Dummies to the Actual Activity. Make sure to Group the 3 Dummies and the Actual Activity and limit work items in Group to 1: https://www.simul8.com/support/help/doku.php?id=features:groups

    Here's also some help on batch by Condition: https://www.simul8.com/support/help/doku.php?id=features:batchbycondition

    This could match your needs! - Nassim

    Hello Nassim,
    Thank you very much for your help!
    Actually my headache is: I have different label values representing different types of products, and the collection number for each label value is not fixed, it can be varied from 30-54 depending on the number of items of each type in the queue. and the rule is the type that has higher amount will be picked first, so If type 1 has 31 items, and type 2 has 45 items, then the activity will collect type 2, and the collection number is 45. If type 1 has 54, type 2 has 60, then it will still pick type 2, but the collection number is 54 (as the maximum collection number is 54). If the amount for each type is less than 30, then there will be no collection happen (as minimum collection number is 30).
    Also, as they will be assembled and moved as one piece after this collection, but at the end of the process, they need to be disassembled, which means I need a way to "memorize" what was the collection number for that batch, and then set the batch out number as the previous collection number.

    Thank you again!

  • BetweenComments (2)

  • Was this answer helpful?


    0

    Hi mate,
    Then, I suggest sticking to the separate Dummy Activities approach, but you can make use of "Batching based on Work item count". Here's a link which explains this, and the other options of Batching In: https://www.simul8.com/support/help/doku.php?id=features:lblbatch , should work for you! Nassim

  • BetweenComments (3)

  • Was this answer helpful?


    0

    @nasSim said:
    Hi mate,
    Then, I suggest sticking to the separate Dummy Activities approach, but you can make use of "Batching based on Work item count". Here's a link which explains this, and the other options of Batching In: https://www.simul8.com/support/help/doku.php?id=features:lblbatch , should work for you! Nassim

    Hello,
    Thanks again for your information! Then if I use the separate Dummy Activities, how I can make the simulation know that they need to always pick the one that has highest number of work items.
    Thank you

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Content (after)