question

AdvitSphinX avatar image
0 Likes"
AdvitSphinX asked Felix Möhlmann commented

Why is source making this type of issue?

I want a source to make 4 types of products.

To achieve that, I added a trigger in source, 'on creation --> set label and color and added the value "duniform(1, 4, getstream(current))''.

This created first a green color product, then a red then a blue and then again red. But I wanted a 4th different part. The 4th yellow part comes but then many other blue, red and green parts come again before it.

How can I make the source to give me 4 types of parts then again 4 types and then again like that?

Kindly Guide

Some images are attached below for reference.

1712767682883.png1712767711138.png

1712767752775.png


FlexSim 24.0.1
sourcetypes of products
1712767711138.png (12.0 KiB)
1712767752775.png (254.6 KiB)
· 1
5 |100000

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

AdvitSphinX avatar image AdvitSphinX commented ·

The first image didn't get posted.

1712767965575.png

0 Likes 0 ·
1712767965575.png (231.6 KiB)

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

"duniform()" is a random distribution. Each item has an equal change of being assigned any of the possible values.

You can instead use a repeating sequence table and only assign the color in the On Creation trigger.

capture1.png

Or, if you want to use the inter-arrival time, use a modulo expression that determines the type based on the source's output statistic.

capture1.png


capture1.png (40.6 KiB)
capture1.png (8.3 KiB)
· 6
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

You can activate the "Pull" option for Queue2 and use similar logic as before. The Pull Strategy is evaluated when the queue is ready to receive a new item. The purpose of the Pull Strategy is to filter and order from though which port the object should receive an item. I use this to increment a label that denotes which type should be pulled next. Then I return a value of 0 which means the queue can pull through any input.

The Pull Requirement is evaluated for each item in the upstream object until one is found that can be pulled. This is a condition that the item has to fulfill in order to be pulled. In this case, the item's type has to be equal to the queue's "NextType" label.

pull-type-in-order-fm.fsm

In future, please ask follow up question with different topics than the original question in a separate post. It also helps and saves time if you upload your model file whenever possible.

1 Like 1 ·
AdvitSphinX avatar image AdvitSphinX Felix Möhlmann commented ·

Thanks a lot for your help.

But, I want that if the 1st item is already made by the processor then it should go to the queue and the operator takes that, to save the time.

If the operator keeps waiting for all types of products to be made then he will take then it would be a lot time consuming.

Can you please suggest some way...

1712835400259.png

0 Likes 0 ·
1712835400259.png (207.5 KiB)
Felix Möhlmann avatar image Felix Möhlmann AdvitSphinX commented ·

You can use an array and if the item type is part of that array, the item is pulled and the type is removed. Once the array is empty, it is reset in the Pull Strategy code.

pull-type-in-order-fm_1.fsm

Note that most of this is easier to set up through the use of lists and Process Flow. Though the underlying principle stays the same.

0 Likes 0 ·
Show more comments
AdvitSphinX avatar image AdvitSphinX commented ·

Thankyou for your reply and help.

I want the inter arrival time of 2 minutes so by using the second method you told.

Now in the next part, I want the machines to process each type of part and then make a bunch of it and then a forklift would take the bunch of parts then deliver it to the sink.

According to your suggestion and help the source issue is now resolved.

Now, I want that every bunch should have different type of part.

Right now for 1 time it does the same but then for the next bunch it makes 2 red and one green and one blue but I want every bunch to have 1 red, 1 green, 1 blue, 1 yellow.

Please guide me...


0 Likes 0 ·
video.mp4 (6.3 MiB)