question

Gulati avatar image
0 Likes"
Gulati asked Gulati commented

sending item issue

Hello everyone,

in the attached model. one by one main product is coming from Queue1 and then on machine one,two and three main product get some sub-items in a lot as described in label tab of each sink of corresponding machines.with the help of sink i am just tracking my lot size getting used i am not interested to send them manually to Respective processors. in on entry trigger of each machine i made a code which help to supply next batch from the respective queue to sink as 80% of the item get used. My mean as processor use 80% of batch next batch should arrive on the sink. it is working perfectly if i am not using queue6 which is connected to source 2 for centralized products or we can say kind of warehouse here. what i am trying here is that as 80% of the item gets used on respective machines new item must get enter in respective queue. for example, as 40 item get used by machine one(LOAD_H) a message should go to the main queue which is queue 6 to send a new batch to queue2 and from queue2 to sink1. i tried to assign a code logic in on entry trigger of queue 2 for close input by putting some if condition. but i am not getting what pull strategy i should use from queue 6.the same it should work for other queues.

FlexSim 17.2.5
sending item issue
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

·
Cliff King avatar image
0 Likes"
Cliff King answered Gulati commented

I'm I correct in assuming that queue's 2,3,4&5 represent the inventory of four subcomponents located at the point where the parts are depleted by the main product, and that queue 6 represents a warehouse located further away that contains a larger inventory of the four parts? If this is true, then it doesn't make sense to me why you would use the same criteria for pulling inventory from queue's 2,3,4&5 as you use to pull inventory from queue 6. I would expect you to be pulling inventory from the local queues at the rate the subcomponents are utilized by the main product, and then pull from the warehouse when the local queue inventories reach a lower threshold.

I'd also like to know what you would like the flow items at the local queue to represent (a single part, or a batch of parts, etc.?) and what the flow items at the warehouse queue should represent (a batch, a shipment, etc.?).

It also didn't make sense why you have this line of code on the OnEntry of your local sinks: Processor.resume(0); Is it because you had plans to stop the processors when they run out of local inventory and then start them back up again when the inventory is replenished?

You might want to take a look at the Kanban Tutorial to get some ideas on how to model inventory depletion and replenishment based on a pull or "kanban" type system: https://answers.flexsim.com/articles/23394/tutorial-kanban-labeler-1.html

· 9
5 |100000

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

Gulati avatar image Gulati commented ·

Thanks cliff for the response.

1) well queue 2,3,4 and 5 representing batching queue. Queue 6 is an main kind of warehouse u can say or centralised queue from where i am trying to give supply to respective queue based on different products. From queue 2,3,4&5 then a batch is going to sink and then to processor in lot that just i am tracking with labels at sink.

2) in entry trigger of processor i used processor.resume() because i am resuming processor till a batch doesn't reach sink from queue. Because model represent here that the main product which is coming from queue 1 some subcomponent(coming from queue2 to sink) has to get use on that main product. So that line of code is for just to stop processor till a batch reach sink.

0 Likes 0 ·
Cliff King avatar image Cliff King commented ·

You say queue's 2,3,4&5 represent "batching queue", but what does that mean? Does it mean they are just in the model as a way of creating a "batch" of parts to be sent to the processor and that they do NOT represent an actual queue that holds an inventory of parts?

You also didn't tell me what you want a flow item to represent at different stages in the model...

Finally, the use of Processor.resume() implies that Processor.stop() has been called earlier. Was it your intention to call Processor.stop() on the processors when there was no inventory of parts at the cooresponding sink, because I don't see where you have done this?

0 Likes 0 ·
Gulati avatar image Gulati Cliff King commented ·

1) queue 6 is main warehouse where different kind of components is located. Queue 2,3,4&5 is a place where a batch of particular no. Is reaching from warehouse. Till main product doesn't reach to processor 1 (Load_H) batch of components which i want to put on main product is waiting at queue 2. As product reach for example a engine hub reach procesdor 1 a batch of 50 screw start from queue 2 and goes to sink. Sink i use just to destroy them because i am not so interested to see visually lots from sink is getting combine with main product(engine hub ) or not. Just tracking from label is enough. After put a lotsize of screw on emgine hub product will go to next machine same will repeat there a set of some batch should reach queue 3 from queue 6 for example rings as main product after assembled with screw reach second machine a batch of ring should reach sink 2 and so on for further machines.

2) about processor on entry trigger code is not finished yet if possible you can ignore that processor.resume() line or even remove is not an issue for now.

3) here main issue is only as 80% of item get use by machine next batch of item should reach respective queues from main waiting queue(warehouse).

0 Likes 0 ·
Cliff King avatar image Cliff King commented ·

Your model seems to be working exactly how you described, so I'm now wondering what needs to be "fixed"?

Currently, you close the input to the local queues when they receive a shipment of parts from the warehouse and Currentcontent >= 0.20*Batchrotation. Then you reopen the input to the local queue when the processors deplete the inventory and Currentcontent < 0.20*Batchrotation. Isn't this exactly what you said you wanted it to do? You mentioned wanting to know what "pull strategy" logic you should write to receive stuff from Queue6, but you already have written logic to open and close the inputs of the local queues to pull stuff from Queue6. I only have a few concerns about your current approach:

  1. You do not have OnReset triggers to reset your Currentcontent label values back to a starting condition.
  2. You need to decide whether you want the local queue's input to begin the model run in a closed or open state. If they should start in a closed state, then do this in the OnReset trigger.
  3. You do not close the input to the local queues immediately upon receiving a flow item from Queue6. Instead you close the input after calculations are made in the OnEntry of the Sink which later after the flow item received from Queue6 travels down the conveyor. During this time, the local queue will continue to receive items from Queue6 indiscriminately, and I don't think this is what you want!
0 Likes 0 ·
Gulati avatar image Gulati Cliff King commented ·

@Cliff King. Thanks for your effort. yes as you mentioned in point number 3 in your comment that is my main issue. i just want here as queue recieve one item from main queue6 next item should not come inside queue2 till 80% of item get used. same should be for other queue. as you can see after run model lots of item is coming randomely this is my issue. i want first it should come to queue2 then queue3 then queue4 and then repeat as per situation. can you help me with this?

0 Likes 0 ·
Cliff King avatar image Cliff King commented ·

How about just moving your closeinput statement to the local queue instead of the sink?

0 Likes 0 ·
Gulati avatar image Gulati Cliff King commented ·

@Cliff King.well yeah mistake was that i was puting statement in sink instead of local queue. in attached model i created new label with queue and made a logic in on entry and on exit trigger. here now i am trying to color my items like one particular item color should go to queue2 other to queue3 other to queue4 so that it could be more good to identify yes one particular correct item is going in desired queue. is it possible?trial-model.fsm

0 Likes 0 ·
trial-model.fsm (50.1 KiB)
Cliff King avatar image Cliff King Gulati commented ·

You can easily change the color of flow items at any time. There are trigger pick list options to do so. If you want to change the color of an item contained in an object other than the object the trigger is written on, then you will need to properly reference the item. For instance, if you wanted to change the color of the first item in Queue6 using a trigger on one of your Processors, you would need to write something like this:

Queue6.first.as(Object).color = Color.green;

or if you prefer the old syntax it would be written like this:

colorgreen(first(Queue2));

I have a couple comments regarding the code I see in your latest model:

  1. Don't use the comparator && on line 21 of your processor trigger. This is not the way to do two things if the condition is true. Simply separate the things you want to do with a ; within the brackets of the if statement.
  2. I don't understand why you are sending a message to Queue6 to create an item AND using Source2 to create items as well. You don't want to do both do you?
0 Likes 0 ·
Gulati avatar image Gulati commented ·

1) thanks for the suggestion about color of items

2) well before i was trying to run model without using source just by creating items. Later i added source but i forget to remove logic on on message trigger of queue 6. As now source is sending items so i do not need to use send message to queue 6 in on entry trigger of processors. Thanks for the suggestion about using two if conditions.

0 Likes 0 ·

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.