Transfer Shared Asset Between Tokens

Transfer Shared Asset Between Tokens

samuel_porter
Not applicable
26 Views
2 Replies
Message 1 of 3

Transfer Shared Asset Between Tokens

samuel_porter
Not applicable

[ FlexSim 16.2.1 ]

Is there a way to transfer a shared asset between two tokens? I'm splitting a token and want to split the two shared resources on that token as well.

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

matt_long
Not applicable
Accepted solution

Once a shared asset has been assigned, it cannot be transferred to another token. However, when you split a token, you have options on the Split activity as to what relationship you create them with (which if set to Child can give label access to the created token) and you have the ability to set labels on the newly created tokens. This would allow you to manually assign labels to the new tokens that would give you references to the shared asset.

I've attached a simple model as an example. Two resources are acquired and then the token is split. I create the new token as a child so it has label access on its parent. Both tokens set their opertator's color then release their operator. The biggest trick here is making sure we release the right resource. Currently, the Release Requirement wants either a reference to the Resource Shared Asset, or an index of the array. In the future this may change to allow you to pass in the object that you want to release which would make the releasing simpler. In order to work around this, the Release Requirement has some custom code in it to find the index of the resource.

splitresources.fsm

Message 3 of 3

samuel_porter
Not applicable

Thanks for your help! Didn't think of just releasing the shared asset on the first token by referencing it from the second. Used this for allowing the second token trigger exiting a zone (after additional processes) while the first token (retaining another shared resource) continued on to the next process.

0 Likes