question

Nanjana avatar image
0 Likes"
Nanjana asked Nanjana commented

How to assign value to each item stored in the rack?

I have created a model with source and rack with item type and color as a trigger, which stores 3 different color boxes in particular bays. After getting stored in the rack, I want to assign each item's with unique value so that with this value I can retrieve the item. How can I assign unique values to each item for this model?

rack.fsm

FlexSim 19.1.2
rackrack storagestorage
rack.fsm (19.2 KiB)
5 |100000

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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Nanjana commented

Just assigning some value to an item will not get you a reference to said item in other parts of the model. This sounds like you might want to use a list for this purpose.

https://docs.flexsim.com/en/19.1/ConnectingFlows/Lists/KeyConceptsLists/KeyConceptsLists.html

· 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.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

If you convert the item reference into a number, you have a unique value.
https://docs.flexsim.com/en/19.1/Reference/CodingInFlexSim/CommandReference/Commands.html#tonum

If you convert the value back by

https://docs.flexsim.com/en/19.1/Reference/CodingInFlexSim/CommandReference/Commands.html#tonode

you get a direct reference to the item.

· 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.