question

FRANCESCO S2 avatar image
0 Likes"
FRANCESCO S2 asked Raja Sekaran answered

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

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?

FlexSim 20.0.0
travelflexsim 20.0.0tokendestination
im3.png (550.4 KiB)
im3.png (484.8 KiB)
elci.fsm (277.9 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.

Raja Sekaran avatar image
1 Like"
Raja Sekaran answered

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

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

Thanks


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
1 Like"
Joerg Vogel answered FRANCESCO S2 commented

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

  1. token.ITEM.getPath(model())

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

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

And then you add an element to the array.

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

  1. token.ITEM

or

  1. token.ITEM.up
· 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.