question

Carson M avatar image
0 Likes"
Carson M asked Steven Hamoen answered

Port by case, first available from a subset of the port list

In my attached model, I have three itemtypes coming from the source. I want itemtype 1 to use only port 1, itemtype two can use all three processors/ports, and itemtype 3 should be limited to processor/port 2 and 3. How do you do this because the syntax of "2 || 3" in the port by case does not work. I would like it to be first available between 2 or 3, and not use the Bernoulli function to do 50/50 in case the process times are highly variable.

portbycasemixture.fsm

flowfirst available destination
5 |100000

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

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Isaac Litster commented

@Carson M,

The reason 2||3 does not work is that field is expecting a port number (value), not a numeric comparison. There isn't really a drop down menu option that will do exactly what you want. So I created custom code in the Send To Port field of Queue1. Take a look at the model and see if this is what you are wanting it to do.

Thanks.

portbycasemixture-jn1.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.

Carson M avatar image Carson M commented ·

Thank you this is what I am looking for.

0 Likes 0 ·
Isaac Litster avatar image Isaac Litster commented ·

@Carson M

I found another way to do it using lists. I have attached the model below.

port-by-case-flexsim.fsm

0 Likes 0 ·
Carson M avatar image Carson M Isaac Litster commented ·
@Isaac Litster

That is an interesting way to do it using lists. How would you make it more robust so if you have 10 item types and each one has a different combination, it won't be as simple as >= 2 in the pull function. Would you then use WHERE Type = 1 OR Type = 4 OR Type = 6?

0 Likes 0 ·
Isaac Litster avatar image Isaac Litster Carson M commented ·

Yes, I just tested it. That should work.

0 Likes 0 ·
Steven Hamoen avatar image
1 Like"
Steven Hamoen answered

@Carson M I'm not sure what is exactly behind the source but instead of pushing you could also pull them. So on the downstreams objects select the correct pull strategy and pull requirements. This is usually much easier than trying to make a complex sendto statement.

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
0 Likes"
Joerg Vogel answered

If you don't like coding with ProcessFlow or FlexScript, you add simply more queues in the model. Instead of one queue you add an array of queues. The first queue transfers item Type values 2 or 3 to the next one. This queue sends the item then by first available.

A model is just a substitute for a real process. It doesn't matter how many FlexSim objects you use to replace the functions of a real object like a processor. At the end you can hide your different objects under one shape and the visual look is similar to the real world.

5 |100000

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

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.