question

Bryan V avatar image
0 Likes"
Bryan V asked Joerg Vogel commented

Help me! Problem with split in Separator

Hello guys, i have a big problem.

I have 4 items types in my model: Product1, Product2, Product3 and Product4.

All these items are created from Source and going to enter the separator.

Product1 and Product3 dont need to be split, only processed and then sent to a specific output port.

Product2 and Product4 need to be split into 3 work items, then they needs to be routed to different ports, 2 items on queue1 and 1 on queue2.

My model works when i have only 1 quantity for each items:

Separator mult-Input.fsm ----------> This is the working model

But when i increase quantity of Product2 and Product4 from the Source, my model dont works good after the 5th item processed in the Separator:

not working.fsm ----------> This model is not working good after increase quantity

FlexSim 19.0.0
sourceflexsim 19.0.0separator logic
not-working.png (103.4 KiB)
not-working.fsm (14.8 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.

Bryan V avatar image Bryan V commented ·

Thank a lot for the replay and for your time.

Exactly but types 1 and three produce one flowitem going to the queue number 1 while types 2 & 4 generate 3 flowitems each and one flowitem go to queue number 1 and 2 flowitems go to queue number 2, Example:

Sequence start

type 1: entry on separator, that doesnt split and go to queue 1

type 2: entry on separator, that split in 3 flowitems then 1 flowitem goes to queue 1 and 2 flowitems go to queue 2

type 2: entry on separator, that split in 3 flowitems then 1 flowitem goes to queue 1 and 2 flowitems go to queue 2

type 2: entry on separator, that split in 3 flowitems then 1 flowitem goes to queue 1 and 2 flowitems go to queue 2

type 3: entry on separator, that doesnt split and go to queue 1

type 4: entry on separator, that split in 3 flowitems then 1 flowitem goes to queue 1 and 2 flowitems go to queue 2

type 4: entry on separator, that split in 3 flowitems then 1 flowitem goes to queue 1 and 2 flowitems go to queue 2

(This sequence is just an example, i want to work with difference sequence like "n" type1, "m" type2, "p" type3, "q" type4 , with "n,m,p,q" as a quantity from Source)

Your model is the same as mine and i see no difference, is that a bug? Or it is a problem due to the different versions? Or other? Sorry but i'm a beginner

0 Likes 0 ·
Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered

@Bryan V,

Attached is your model with the changes that I've made. I hope that I have understood exactly what it is you are trying to do. In short, types 1 and three produce one flowitem going to the queues while types 2 & 4 generate 3 flowitems each.

Take a look at the model and see if something like this would work for you.

If you have any problems or questions, please let us know.

Thanks.

separator-mult-input-JN1.fsm


5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

@Bryan V, I follow a different approach. Instead of modulus operation I use label value reset and decrement value to achieve the distribution of items to different queues.

  • On Process Finish the Send To Port function is not evaluated yet I set a label "CycleOutput" at the Separator to high value like 100.
  • Then Send To Port evaluates this label value current.CycleOutput to send the item to Port 1 in the case of value 100.
  • On Exit trigger increments the label current.CycleOutput by -1, which infact results in decrementing the value by 1.
  • Then all other items of the same process are going to Port 2 by default case in Send To Port function and they are decrementing the label value also.

You have implemented already splitting items and set Process Time by case. @Jeff Nordgren has implemented a sequence of items in different quantities. I added a Send To port mechanism, that starts over again On Process Finish and Send items To different ports.

.separator-multi-input-jn-jv.fsm


· 2
5 |100000

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

Bryan V avatar image Bryan V commented ·

Oh wow nice guys, this is now working perfectly! You saved me, thanks

is possible to know how the case function "current.CycleOutput" works? If you explain me, thank you very much

And where can i find other case function?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Bryan V commented ·

current.CycleOutPut is just a label I set at the object. I have given the name for the label myself. It is a name and not a function. The label gets evaluated in Send To Port function of the separator object for Port By Case Property. As I describe above I reset the label value to 100, when the process time of the separator finishes. It is an event trigger in the properties of the separator. This leads to the behavior every first released item goes through port one. If the first item leaves the separator the label value CycleOutput is decremeted by one. The next item of the separation process evaluates the Send To port again and tests the label value CycleOutput of himself. Now the value is 99 and the default case sends the item through output port 2.This event decrements the value CycleOutput again by 1 and the labele value is then 98. If an item enters the separator, it will fire the process finish trigger after processing and reset the label value back to 100.

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.