question

Pinakin K avatar image
0 Likes"
Pinakin K asked Jason Lightfoot commented

How to release the resource when preemption is used?

Hello,

in the attached model, i have a process where an operator is used. A random breakdown occurs where all the tokens in the processflow are sent to a save point. But for taking care of the breakdown, the same operator is acquired. But, as the operator was acquired before, the Maintenance is not carried out.

How should I release the operator, when the preemption occurs, and also how would the operator would be reacquired for the work he left incomplete .

preeemption-and-shared-assets.fsm.

Thank You!

FlexSim 18.1.2
processflowresourcepreemptionshared assets
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Kari Payton avatar image
1 Like"
Kari Payton answered Jason Lightfoot commented

13798-preeemption-and-shared-assets.fsm

I modified the process flow to release the resource when you send the preempted tokens to the custom code. Then when the maintenance is done acquire the resource again before restoring the context. @Pinakin K


· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Liu Y avatar image Liu Y commented ·
@Kari Payton

Brilliant idea!

But I found when the token come back to "Delay" TS after preemption, it will recaculate delay time in this activity instead of continuing stay. What can we do to solve it?

0 Likes 0 ·
Kari Payton avatar image Kari Payton Liu Y commented ·

@Liu Y would this work 13799-13798-preeemption-and-shared-assets.fsm?

I added some labels to track the time differences.

1. What time the process starts in real time

2. In the preemption subtract the start time for the process from the real time again to see how much time has elapsed.

3. Reassign the cycle time label based on the already elapsed time minus the original cycle time of 200. So when your token goes back to the delay it will finish the process based on the calculations instead of starting over with a delay of 200.

0 Likes 0 ·
Andrea M39 avatar image Andrea M39 Kari Payton commented ·
In this case, what happens if you are pre-empted twice (or many times) during the delay. Is the token.delayStartTime the time of the re-start or the original start?


0 Likes 0 ·
Show more comments
jing.c avatar image jing.c commented ·

@Kari Payton

Thanks for your support.

In your new model, I tried to preempt the token several times during it Delay in activity. But it can not work. I found that the token will acquire resource before be preempted, but it will lose resource after be preempted.(As pic shown below)

I think use List instead of Resource maybe can solve this question.

I upload my modified model, and may it helps~

preempted-several-timesv181.fsm

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.