question

Mokhtar W avatar image
0 Likes"
Mokhtar W asked Benjamin W2 edited

How to modify the sequence of the filling machine ?

hello guys

in the following model the 3 filling machines work together at the same time with one bin at a time

i want to modify the model by make each machine work individually with bin.

to be more specific what i want is to make at the first cycle when the operator travels with bin this bin will work on filling machine 1 then at the second cycle the bin will work on filling machine 2 and at the third cycle the bin will work filling machine 3 .......... then repeat the cycle.

please note i want once the bin is get out in the bin stock immediately without waiting the batch to be filled on the machine the operator should go to pick the bin to the second machine and again with the third machine.

hall-with-3-filling-machines-v3.fsm

FlexSim 19.1.1
flow chartflow chart modification
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

·
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Benjamin W2 edited

Hi @Mokhtar W,

To accomplish this, we will need to adjust your process flow and add a fixed resource global list and a global variable.

  1. Please watch this GIF for instructions on how to create a fixed resource global list.
  2. Please watch this GIF for instructions on how to create a global variable:
  3. Adjust your process flow to look like the following:
  4. In the first block of activities that moves the bin:
    1. Open the second Travel activity. In the destination field, click the custom code button
    2. Add the following code to this activity.
    3. Open the Assign Labels: Assign Next Processor to Token activity. Configure it like the following.
      1. Insert the custom code for the Processor:
      2. /**Custom Code*/
        Object current = param(1);
        treenode activity = param(2);
        Token token = param(3);
        Variant assignTo = param(4);
        string labelName = param(5);
        treenode processFlow = ownerobject(activity);
        
        
        if (token.NextProcessorIterator == 1)
        {
        	return Model.find("filling process 1").as(Object);
        }
        if (token.NextProcessorIterator == 2)
        {
        	return Model.find("filling process 2").as(Object);
        }
        if (token.NextProcessorIterator == 3)
        {
        	return Model.find("filling process 3").as(Object);
        }
        
    4. Configure the Change Visual as follows:
    5. Add the following custom code to the custom code activity called Custom Code: Iterate Global Variable
       /**Custom Code*/
      Object current = param(1);
      treenode activity = param(2);
      Token token = param(3);
      treenode processFlow = ownerobject(activity);
      
      
      ProcessorIterator++;
      ProcessorIterator = ProcessorIterator % 4;
      if (ProcessorIterator == 0)
      {
      	ProcessorIterator++;
      }
      

    Configure the following Activities in your Items Sub-Flow

    1. For the Assign Labels: Iterator, configure it as follows:
  5. Link the FillingProcessors list to the Fixed Resource global list created above.
  6. Configure Pull from List: Processor as follows:
  7. Configure the Push to List: Return Processor as follows:

This should give you the behavior you are looking for.

3processorsroundrobin.fsm


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

Mokhtar W avatar image Mokhtar W commented ·

@Benjamin W2 the operator doesnt transfer the bin from the bin stock to the filling machine in the model you sent i didnt figure out where is the problem ?

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Mokhtar W commented ·

@Mokhtar W I forgot to connect the process flow list to the global list. It should be working now.

Note, this will have the operators transfer the bins in a round robin fashion. I just re-read your question and found you want to have the operator move the bin as soon as its ready. This will require some modification. I won't be able to get back to the model for a bit, feel free to play around with it to see if you can get the desired behavior.

0 Likes 0 ·
Mokhtar W avatar image Mokhtar W Benjamin W2 commented ·

okay i got the connection and it's working now but i am little bit can't identify at which direction should i start to add this modification to make the operator moves the bin as soon as its ready @Benjamin W2

0 Likes 0 ·
Show more comments

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.