ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
a question about task preempt
Hello
I am facing a case about task preempt. It makes me very confused the process of the modle i submit in the attachments is: first "crane6" will do the normal tasksequence passed from "source3" and when its "onload" trigger fired ,i insert a preempt task which i want to let "crane6" be delayed in the UTILIZE state for 30 sec. and then "crane6" goes back to finish the noraml tasksequence. the problems in my model is : 1. althought the delay task preempts in "crane6" activetasksequence, "crane6" will go on doing the normal tasksequence,and then go back to do the "delay" tasksequence. 2. in the process the model running, system console will appear several exceptions and the activesequence node in "crane6 will contain two tasksequences, i donnot know what is the problem. what i should do to solve the problems? Thanks in advance... |
#2
|
||||
|
||||
Hello,
there might be a conflict in the runtime, if you put a preempting tasksequence in the OnLoad-Trigger. You can instead send a delayed message to the crane and create the preempting tasksequence in the OnMessage-Trigger. That should work. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
oliver xie (06-09-2012) |
#4
|
||||
|
||||
Hello,
I don't know, i can only guess. The task you preempt is the tasktype frload. After you preempt, this task will be executed again. Then the OnLoad trigger is executed again. Another delay tasksequence is dispatched. That might the runtime problem. If you send a delayed message, the frload-task is finished and the delaytask is dispatched only once. Jörg |
#5
|
||||
|
||||
What I don't understand is why you need a preempting task to make you crane have a utilze task? If it happens all the time you can put it in your tasksequence. If it depends on the situation, use a CALL_SUBTASK.
|
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Jörg Vogel (06-11-2012) |
#7
|
|||
|
|||
hi Steven
thank you for your reply. as you advise, CALL_SUBTASK is good way to solve the problem, but i just want to know what preempt tasksequence can do and what need to be payed attention to when using it. |
#8
|
||||
|
||||
I have taken a look at your model and indeed it is very strange. The delay task is in the active tasksequence but is not executed until the normal sequence is finished. I think you should send this to Flexsim. It might be that you found a bug.
I must say that when I open your model I get in a number of places very strange codes like: "¸ù¾ÝÈÎÎñÐòÁÐÓÅÏȼ¶½øÐÐÅÅ� �ò" on the Queue strategy but that might be due to language problems? |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Jörg Vogel (06-12-2012) |
#10
|
||||
|
||||
At the top of this website you will find Support (between Free Trial and Account) You have to log in to your account and then you can send your model and the description to Flexsim.
|
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
oliver xie (06-18-2012) |
#11
|
|||
|
|||
The reply to the bug from Flexsim is:
What you are doing is creating a task sequence in the middle of code running. Part of the event of loading the object is to break to travel, since the OnLoad trigger is called before that, it will break away from any task that was created in the OnLoad trigger, including your DELAY task. Commands that aren't new task sequences will work fine. |
The Following 2 Users Say Thank You to oliver xie For This Useful Post: | ||
Steven Hamoen (06-18-2012) |
#12
|
||||
|
||||
You can still insert a task in the active tasksequence. It will be then the last task. Move or rerank it right behind the active task. That should work, too.
Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
oliver xie (06-18-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Preempt Definition | shashanktrivedi | Q&A | 3 | 06-11-2011 09:04 AM |
Tasksequences: BREAK, CALLSUBTASKS, or PREEMPT? | Stefan Trabut | Q&A | 7 | 04-10-2011 12:57 PM |
How to interrupt active task and implement another task? | Ilivid zheng | Q&A | 2 | 01-15-2011 02:30 AM |
how to set preempt by label? | Vic Li | Q&A | 4 | 10-19-2008 01:51 AM |
Task Sequence Question | David Chan | Q&A | 1 | 05-27-2008 03:56 AM |