resource release?

resource release?

gavin_douglas
Not applicable
9 Views
6 Replies
Message 1 of 7

resource release?

gavin_douglas
Not applicable

[ FlexSim 17.1.2 ]

I want six tokens to grab six resource and then get batched into one token. No problem so far. At some point in the model, the single token, needs to pass back six resources, not just one. I know its just one token now but can you release six resources based on one token? I have tried everything. Being able to track the number of resources that make up a batch and then release that number comes up in every model I write. I have hacked my around the problem and hope there is a clean way of doing this.

0 Likes
Accepted solutions (1)
10 Views
6 Replies
Replies (6)
Message 2 of 7

kari_payton
Not applicable

Have you tried using synchronize and join tools instead of batching? @Gavin Douglas

0 Likes
Message 3 of 7

Matthew_Gillespie
Autodesk
Autodesk

You can set the # of Tokens to release on the Batch to be equal to the Batch Quantity. That way the batch doesn't destroy any tokens and each token can release it's own resource.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 4 of 7

gina_lasure1
Not applicable

I have some follow-up questions on this -

In my experience, releasing the batch quantity to retain resource information only works if you're releasing the same quantity that was collected in that specific activity.

I'd like to be able to have 10 items (each using 1 resource) be batched into a single token, run through several other activities as one token, and then be unbatched into 10 individual tokens again. It's easy to split the tokens back up, but I've never been able to correctly carry the resources through so they can be properly returned. 9 of them always go missing.

Is there a way to do this that I'm missing? Obviously you can get around it with code, but it would be easier if I didn't have to.

0 Likes
Message 5 of 7

anna_lisa_dierking
Not applicable
Accepted solution

I had the same issue recently.

In the attached example model each token acquires one resource. After that four tokens get batched to one token. I used the Label Aggergation to store the resource information of each token onto the token that is going to leave the batch activity.

8220-release-all.png

Then I used the "Release All" function to release all the resources now stored on that one token. But the problem is that only one resource gets released. Is the "Release All" function not the right one to make this happen?

0 Likes
Message 6 of 7

SCHamoen
Advisor
Advisor

@Anna Lisa Dierking If you put a delay after the batch and step through your model you will see that when the 3 tokens are destroyed in the batch, the 3 resources are already released. So apparently destroying a token automatically releases the resource. You could release the batch amount and store all but one in a list. When the last one is ready to release you pull all the tokens from the list and releasing every resource that way.

0 Likes
Message 7 of 7

anna_lisa_dierking
Not applicable

For some reason, I missed that. Thanks for pointing that out. Unfortunately, the resources seem to be released but can't be acquired again. If you step further you will see that only the fifth token can acquire a resource and the sixth token (and so on) can only send a request.

0 Likes