question

mauser avatar image
0 Likes"
mauser asked Julie Weller commented

Referring contents of the rack with respect to the label

Basically, I have customers arriving at a shop and they are labelled upon creation with the same label with the contents of my "Refrigerator". A combiner is used to combine matching labels. The problem is if there are no contents in the rack with the same label as the customer that arrived in the combiner, the customer does not leave the combiner and the simulation is stuck.

I'm just a beginner at FlexSim and my problem is if there is a way to refer on the contents of the rack and it will be used for conditional ports in a queue or a combiner so that if there is no matching label on the rack, it will go to a specific output port. If there are also other workarounds to making this work, please do suggest too :D


Hope someone can help me with this. Thanks!

1685425837390.png

Model 1.fsm

FlexSim 23.1.2
rackscombinersconditional port
1685425837390.png (153.6 KiB)
model-1.fsm (80.2 KiB)
model-1.fsm (79.9 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.

Julie Weller avatar image Julie Weller commented ·

Hi @mauser, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Jason Lightfoot commented

You can refer to the items as subnodes of the rack. So you could loop through all items in the rack and compare the type values in the Send to Port code. Depending on whether an item is found or not, you send the item/customer to a different output. I would implement this in a queue, since with the combiner you would also have to deal with prematurely releasing the container object.

Apart from using subnodes, you can also query items in storage objects. https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.System.html#Method-findItem

This would essentially replace the for-loop you would need in the first case with a single command.

Lastly, you could use a list and Process Flow. Items entering the rack are pushed to a global list. When a customer enters the queue, a token is created in the Process Flow. This token tries to pull a matching item from the list. If it can't do so within the maximum wait time, the customer is send to the second sink, otherwise the item is moved to the customer and he is send to the first sink.

This method offers the most flexibility and is the fastest to set up, which is why I would personally use this approach.

model-1-fm.fsm


model-1-fm.fsm (90.0 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
Note that if you have a very large number of items to draw in racks then you would use Virtualized Items for which you would need to use the storage system queries or store references to the Storage.Items, not the subnodes.
1 Like 1 ·

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.