ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-08-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default 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...
Attached Files
File Type: fsm 6.fsm (262.6 KB, 105 views)
  #2  
Old 06-09-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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)
  #3  
Old 06-09-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

Hi Jörg
thank you for your reply,you're right, the model works rightly. but can you explain why does this conflict in the runtime happen?
  #4  
Old 06-10-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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  
Old 06-10-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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)
  #6  
Old 06-11-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

hi Jörg
thank you! but i find the onload trigger is executed only once for every transport tasksequence. so the delay tasksequence is dispatched only once. the key problem is even the preempt task sequence is in the activesequence node, the crane goes on doing the transport tasksequence,until it finish doing the last task. and then come back to do the preempt tasksequence. i donot know why. at last the activetasksequence node of crane will contain two tasksequence like the picture i submit, and the finished transport tasksequence will never disappear.
Click image for larger version
Name:	problem.jpg
Views:	113
Size:	45.8 KB
ID:	1793
  #7  
Old 06-11-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

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  
Old 06-12-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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)
  #9  
Old 06-13-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

hi steven
is the strange codes in the Queue strategy of crane6? if so, yes it is chinese. how to send this bug to flexsim?
  #10  
Old 06-13-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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  
Old 06-18-2012
oliver xie oliver xie is offline
Flexsim User
 
Join Date: Dec 2010
Posts: 53
Downloads: 37
Uploads: 0
Thanks: 21
Thanked 11 Times in 7 Posts
Rep Power: 123
oliver xie is on a distinguished road
Default

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  
Old 06-18-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.