Problem with preemptions

Problem with preemptions

oscar_c13
Not applicable
114 Views
10 Replies
Message 1 of 11

Problem with preemptions

oscar_c13
Not applicable

[ FlexSim 22.1.2 ]

Hello everybody,
I have a problem with mi moden and I tried to replicate it with this example.

While an activity that lasts 60 seconds is being executed (being in fr1), every 40 seconds the operators must go to FR2 and stay 5 seconds. When the operator finis the activity that he is doing in fr1 he has to go to fr3 but he have to keep in mind that every 40 secons he still has to go to fr2. fr2 has to go a totl of 2 times. I made a tracked variable so that it looks at the times it has already fone fr2 and make the save context with differente values. It gives me an error and it doesn´t work either.
Any ideas?

preempt.fsm

0 Likes
Accepted solutions (1)
115 Views
10 Replies
Replies (10)
Message 2 of 11

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Please take a look at this post where the use of task sequences and milestone is outlined. This is a better way to preempt that the token context saving method you have tried.

This is the example model:

interruptionv2-jl3.fsm

0 Likes
Message 3 of 11

oscar_c13
Not applicable

Thanks for your answer

The problem with the attached model in your answer is that it is not doing exactly what is requested. The 10 seconds are counted all the time, and not from the moment the operator arrives at queue2. Another problem is that it is an infinite loop, it does not stop when the operator has been in queue2 for 40 seconds.


On the other hand, I didn´t understand the use of milestones and how they can help.

0 Likes
Message 4 of 11

jason_lightfootVL7B4
Autodesk
Autodesk

It was from another question (linked) so I didn't expect it to have the same parameters as yours.

It isn't in an infinite loop - the 'core system' task completes at 479 seconds, having been preempted away for the other 439 seconds.

It's an example of how to preempt a task executer using the best method. If you had any number of core tasks at different locations , the use of the milestone allows you to preempt to a different location and not worry about knowing where the operator needs to return to complete a task - the milestone does it for you. Change the timing and see how it works.

0 Likes
Message 5 of 11

oscar_c13
Not applicable
Sorry really, but I don´t understand how your model works. What makes it stop at that time?


0 Likes
Message 6 of 11

oscar_c13
Not applicable

I tried to do with the milestone but it does not work properly.

preempt.fsm

0 Likes
Message 7 of 11

jason_lightfootVL7B4
Autodesk
Autodesk

Here's your scenario:

interruptions_jl4.fsm

0 Likes
Message 8 of 11

oscar_c13
Not applicable
Ok thanks, I understood it. Only 2 clarifications.

1. How can I make that the source that creates a token every 40 seconds start at a certain time? That is, in my real model I don´t want it to run every 40 seconds from the beginning, but I want it to run after a sequence of previous steps. It is possible to activate and deactivate that source from a code editor?

2. Why the first sub flow run for 78 seconds and not 60?

0 Likes
Message 9 of 11

jason_lightfootVL7B4
Autodesk
Autodesk
1. Call the Preempting FR2 as a subflow from something else that is generating events with the timing you want.

2. You preempt the CoreTask for about 18 seconds so it takes longer than the 60 second delay.



0 Likes
Message 10 of 11

oscar_c13
Not applicable
Sorry Sir, but How can I make it stop when he has already gone twice to fr2? Is it possible to disable the token creation every 40 seconds?
0 Likes
Message 11 of 11

jason_lightfootVL7B4
Autodesk
Autodesk

Sorry I missed that the FR2 visits are only twice.interruptions_jl5.fsm

0 Likes