How can I change token's information in array information?

How can I change token's information in array information?

francesco_s2
Not applicable
321 Views
3 Replies
Message 1 of 4

How can I change token's information in array information?

francesco_s2
Not applicable

[ FlexSim 20.0.0 ]

elci.fsm

Hi everyone, in my model I would that my task executer travel in my warehouse in order to pick box from different rack.

I give travel information to task executer in "travel TaskExecuter" but i would like to modify token information in array information. the array information is showed in picture but I have to write this information in a string to put in "destination" in "travel TaskExecuter".

May anybody help me?33144-im3.png

0 Likes
Accepted solutions (1)
322 Views
3 Replies
Replies (3)
Message 2 of 4

raja_sekaran
Not applicable
Accepted solution

@FRANCESCO S2

In the attached model, SkuOrd and QtyOrd label contains array value. You can assign the destination in the travel activity using token.ITEM label value like below.

33165-traveldestination.png

Let me know if this is what you are looking for.

Thanks

Message 3 of 4

joerg_vogel_HsH
Mentor
Mentor

You convert a pointer (e.g. treenode, Object) into a string by the method getpath().

token.ITEM.getPath(model())

If you want to put the string into an array, you create an empty array.

token.labels.assert("newArray",[]);

And then you add an element to the array.

token.newArray.append(token.ITEM.getPath(model()))

But I do not know, why do you want to do this, because you can put the marked label value as a direct destination into the "Travel to" activity

token.ITEM

or

token.ITEM.up 
Message 4 of 4

francesco_s2
Not applicable
First thank everybody for the answers.I did not use token.ITEM because i am not sure that the task executer reaches the right position near the rack to pick the item.

For example in a case where the task executer have to pick an object at the end of rack 11, are we sure that with "destination: token.ITEM", in "travel task executer", it goes at the end of the rack and not in the middle, for example?

I would that the task executer reaches the best position near the item,placed in rack, becuase I suppose that the operation of picking should be done by robotic arm and it doesn't have huge dimension.

0 Likes