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
|
|||
|
|||
task Executor
There will be crash in process of travel task executing .I postpone the task executor for some time in the "handle collision" ,however ,the task executor stopped immediately .I would like to ask you all ,how can there be deceleration process instead of immdiate cease with speed of "zero".thank you in advance!
|
#2
|
||||
|
||||
Hi julialiucsn,
If you add a network node and insert "STATE_WAITING" as the second parameter in the TASKTYPE_DELAY the problem may not occur Code:
inserttask(ts,TASKTYPE_DELAY,NULL,NULL,0, STATE_WAITING); Quote:
http://www.flexsim.com/community/for...ead.php?t=1541 Last edited by sagar bolisetti; 08-11-2014 at 08:50 AM. |
#4
|
||||
|
||||
Hi julialiucsn,
Quote:
A preempting tasksequence places the taskexecutor away from the network. You can change the maxspeed of the taskexecutor by a preempting tasksequence. But it is still only a workaround in the OnMessage Trigger of the Taskexecutor. The Taskexecutor cannot stand still but he can move very slowly, nearly with no speed. Code:
// OnMessage double curspeed = getvarnum(current,"maxspeed"); curspeed=curspeed/2; if (curspeed > 0.0001) { // the Taskexecutor nearly stands still, maxspeed of zero leads to a system error treenode ts = createemptytasksequence(current,1,1); inserttask(ts,TASKTYPE_SETNODENUM,getvarnode(current,"maxspeed"),NULL,curspeed,0,0,0);// set a new maxspeed inserttask(ts,TASKTYPE_SENDMESSAGE,current,current,0,0,0,1);// change speed again in 1 second dispatchtasksequence(ts); Jörg |
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
sagar bolisetti (08-12-2014) |
#5
|
|||
|
|||
Hi Jorg, hi everybody,
if it is not possible to said to a Task Executer while it's traveling on a Network to stop in a deceleration mode, what's the use of STATE_DECELERATING ? In fact when you suggested me in https://www.flexsim.com/community/fo...tasktype_delay to use TASKTYPE_DELAY i've thought that using state_decelerating as var2 would have worked, but it wouldn't |
#6
|
||||
|
||||
The parameter state is used just for the statistic. It hasn't got any functionality at all to the behaviour of an object in the model.
Jörg |
Thread | Thread Starter | Forum | Replies | Last Post |
How to get number of task sequences in queue for a Task executor? | mearjun | Q&A | 3 | 06-14-2014 12:41 PM |
FIFO in Task executor | Manoj Kumar | Q&A | 2 | 01-23-2014 04:21 AM |
How to interrupt active task and implement another task? | Ilivid zheng | Q&A | 2 | 01-15-2011 02:30 AM |