question

Preet avatar image
0 Likes"
Preet asked Felix Möhlmann edited

Create items in tote and use operator to process each item.

Hello!

I have a big model with ~80 processors that process totes using operators. However, now I have a twist in the requirement and I need to create items in in a tote (anywhere from 1 to 6) and use the operator to process each item (using log normal 2 distribution) and track how many items they processed as a parameter for the output. How would I do that? I am attaching a sample model with 1 stations. I tried several things but nothing worked out. How want below things in the model.

1) Create items between 1 to 6 qty in each tote generated from the source?

2) When it arrives at the station, the operator process each item and takes time based on the lognormal 2distribution?

3) Track how many items they processed for far in dashboard or performance measure so that later on that can be used to calculate throughput.

multiple_items.fsm

FlexSim 23.0.2
items in tote
multiple-items.fsm (53.1 KiB)
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
0 Likes"
Jason Lightfoot answered Felix Möhlmann edited

One approach:

  • Make one of the processors the template and the rest instances of that (see Object Templates in the user manual)
  • Use a label to indicate on each tote how many items it contains.
  • Put an expression on the processor (template master) for the processing time similar to this:
  • double ptime=0;
    for (int n=item.numItems;n>0;n--)
          ptime+=lognormal2(0,10,2,getstream(current);
    return ptime;
  • Increment a label on each processor for the total items processed (or optionally use a tracked variable label).


· 7
5 |100000

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

Preet avatar image Preet commented ·

Hi @Jason Lightfoot ! Thanks for the answer.


I was able to generate items in the tote but being new to Flexsim, I was not successful in creating labels would track number of items in the tote. How would I do that? Also, where is the option to put the expression in the processor? Attaching the updated model.

multiple_items.fsm

0 Likes 0 ·
multiple-items.fsm (54.3 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Preet commented ·

If you're creating the items in the tote you can just find the content using

item.subnodes.length

Use the script icon to open the code window and delete everything - then past this in:

Object current = ownerobject(c);
Object item = param(1);
double ptime=0;
for (int n=item.subnodes.length;n>0;n--)
      ptime+=lognormal2(0,10,2,getstream(current);
return ptime;


0 Likes 0 ·
Preet avatar image Preet Jason Lightfoot ♦♦ commented ·

That worked fine. Thank you. Attaching the final model for reference.


multiple_items.fsm

0 Likes 0 ·
multiple-items.fsm (61.2 KiB)
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

You can replace processors by multiprocessors, if you do this with a 3D logic. A multiprocessor can do at an object several processes at an item. Your item is a tote. Number of processes is your number of items.

You can do this also with a Process Flow processor which runs several sub process flows for amount of items in a tote. Each sub process flow gets executed one by one.

5 |100000

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