Unexpected Resource Release behavior when Releasing multiple Numeric Resources Assigned to the same Label

Unexpected Resource Release behavior when Releasing multiple Numeric Resources Assigned to the same Label

hch123LYTCT
Observer Observer
98 Views
1 Reply
Message 1 of 2

Unexpected Resource Release behavior when Releasing multiple Numeric Resources Assigned to the same Label

hch123LYTCT
Observer
Observer

I found this problem while going through Flexsim tutorial part 3. (FlexSim In-Depth Tutorial: Part 3 | FlexSim 52:40 ~ )

 

In the video, he chooses to assign two numeric resources to one token's label and then release the first resource by choosing "First Acquired" for Resource(s) to Release property of Release activity. The video doesn't involve execution.

 

It didn't work and I read

"Multiple numeric resources can also be acquired and assigned to the same label. (...) not guaranteed that the resources will be released in the correct order when using pick options like First Acquired and Array/Range of Resources. To ensure the correct resource is released you can pass a reference to the Resource shared asset into the Resource(s) to Release property."

from the documentation.

 

So I put getstat(getactivity(processFlow, "Resource: Cutting"), "Output", STAT_CURRENT, current) for Resource(s) to Release.

1.png

 

 

I expected this to release only the resource acquired from Resource: Cutting, while leaving the other numeric resource acquired by the same token untouched. 

 

 

The following screenshots show the 1st, 2nd, and 4th tokens, respectively, at the Delay: Polishing activity. They show unexpected Release behavior.

1st.png

 

2nd.png

 

4th_1.png

 

The 4th token keeps the first acquired resource permanently, so the model practically stops at this point.

4th_2.png

 

 

 

0 Likes
Accepted solutions (1)
99 Views
1 Reply
Reply (1)
Message 2 of 2

FelixMoehlmann
Mentor
Mentor
Accepted solution

Only put 'getactivity(processFlow, "Resource: Cutting")' into the Resource(s) to Release field. The sampling tool inserts getstat() (I also find this irritating), but you want a reference to the activity and not one of its statistics in this case.