question

Talia Z avatar image
0 Likes"
Talia Z asked Logan Gold answered

How to assign item types so I can "Send to Port" and "Use Transport" correctly?

bottle-unloader-process.fsm

I tried to set the item type for my combiner "bottles to pallet" to be 1 on exit and the "caps to pallet" combiner to be 2 on exit. Then, I set the item type equal to 3 for the TruckB and TruckC sources on creation.

My aim was to assign different values to pallets containing bottles, caps and the truck itself, as those need to travel to different locations after the "Unload truck" step. Item 1 should then travel to the "Bottles" queue, item 2 should travel to the "Caps" queue and item 3 should move onto the conveyor and enter the sink labelled "Truck leaves" Items 1 and 2 should be transported by "Transporter 1" while item 3 should just move to the conveyor.

Below is how I programmed the Send To Port and Use Transport fields. I would greatly appreciate help figuring out how to make my model run as desired. Thank you!

FlexSim 17.2.5
separatoritemtypeports
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

Logan Gold avatar image
1 Like"
Logan Gold answered
@Talia Z

The issue is the triggers you are using to set the item type for all the different items is creating a label on each of the items named Type and then setting those labels to their respective number. Using the Type label is a newer way to set item types and does not use the same functionality as the old method where you would use setitemtype() and getitemtype().

To fix this, you just need to change all the uses of getitemtype(item) to item.Type in the model. As far as I can tell, that will be in the same two places you mentioned in your post. If you go to the Port By Case logic in the Send To Port field, a dropdown next to Case Function gives this as an option to choose:

The Conditional Transport logic in the Use Transport field does not have the same dropdown, so you just need to change the Condition to this:

item.Type == 1 || item.Type == 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.