Why is source making this type of issue?

Why is source making this type of issue?

AdvitSphinX
Not applicable
36 Views
8 Replies
Message 1 of 9

Why is source making this type of issue?

AdvitSphinX
Not applicable

[ FlexSim 24.0.1 ]

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.

Image.png1712767711138.png

1712767752775.png


0 Likes
Accepted solutions (1)
37 Views
8 Replies
Replies (8)
Message 2 of 9

AdvitSphinX
Not applicable

The first image didn't get posted.

1712767965575.png

0 Likes
Message 3 of 9

moehlmann_fe
Observer
Observer
Accepted solution

"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

Message 4 of 9

AdvitSphinX
Not applicable

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
Message 5 of 9

moehlmann_fe
Observer
Observer

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.

Message 6 of 9

AdvitSphinX
Not applicable

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
Message 7 of 9

moehlmann_fe
Observer
Observer

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
Message 8 of 9

AdvitSphinX
Not applicable

Thankyou for your quick support and feedback.

As per your suggestion, I have made the final simulation where at sink each coming as 14. If I want to improve more part at sink what improvement you suggest?

Please see the below simulation dashboard for your reference.

Thanks & Regards

1712848228569.png

0 Likes
Message 9 of 9

moehlmann_fe
Observer
Observer
I don't know the process times on your processors. But since 3 out of 4 are waiting for the operator, it seems very likely that the speed of Operator2 is the determining factor for the throughput.
0 Likes