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 07-10-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 changetask command

hello
i have used the command changetask to change some parameters of the active tasksequence, but the changed tasksequence did not take effect immediately. how can i improve this condition. thanks in advance!
  #2  
Old 07-11-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 Oliver,

you can change parameters in a task, if the task is not begun.
E.g. you can change the unloadstation of a frunload-task in the Onload-Trigger of a taskexecuter.

Jörg
Attached Files
File Type: fsm Changetask_JV.fsm (36.7 KB, 286 views)

Last edited by Jörg Vogel; 12-03-2014 at 03:23 AM.
  #3  
Old 07-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
thanks for your reply!
if i change your code as following
on onload:
senddelayedmessage(current,2,current,1,0,0);
on message:
treenode newstation = node("/Queue3",model());
treenode ts = gettasksequence(current,0);
treenode loadeditem = gettaskinvolved(ts,2,1);
changetask(ts,4,TASKTYPE_TRAVEL,newstation);
changetask(ts,5,TASKTYPE_FRUNLOAD,loadeditem,newst ation,0,0,0,0);

what i found is the changed travel task donot take effect when the message trigger was fired, the operator will travel to the first destination and then unload the item to the second destination. why did not the changed travel task take effect immediately?how can i make it done?
  #4  
Old 07-12-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 Oliver,

your "immediatly" is delayed with 2 seconds. Then the task frunload might be begun. It is running. Now you can only abort that task. Then you can give the taskexecuter something else to do.
Look Onmessage which task is active, e.g. profiletasksequence(obj. tasksequence)

If I make the same changes as you did in my model, everything works still.

Jörg
  #5  
Old 07-12-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
maybe i did not express my real meaning clearly. my thought is like this:
in the middle of travling process i want to change the operator' destination, so i send the delay message( 2 secnond later) after it frload the item and then change the active traveling task. with your advised command profiletasksequence, i found the operator is doing the traveling task before or after i change the task. so the task frunload task did not begin. but i find the operator did not take the changed travel task effect and still traveled to the first destination. when i add two command "stopobject" and "resumeobject" after the changing travel task code, the model works rightly. so i want to ask is there any commands to refresh the changed task and make it effect immediately when it's parameters were changed.the attached file maybe can help you to know what i want to do.
ol.fsm
  #6  
Old 07-12-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 Oliver,

please read my posts again.The commands stopobject and resumeobject don't work directly on taskexecuters, as you think. Stopobject creates a preempting tasksequence with high priority. The activets tasksequence is aborted and starts the current task on resume again. If you change that aborted and begun task during the stop and resume events, is the same as changing parameters on a not BEGUN task. The time is important, when you change something in tasksequences.

Jörg
  #7  
Old 07-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 Jörg
you think if the task begins,we can not make the task which was changed after that time point effect? is this right? unless we abort that task and run the task again? is there no command to refresh the running task to have a new parameter and change the task running direction?


Thread Thread Starter Forum Replies Last Post
family command? zhang xin Q&A 0 01-14-2010 06:33 PM
a question about the command "getitemtype" Vic Li Q&A 2 10-04-2008 11:47 PM
Command getnextnetnodeoutport Martijn van Oostenbrugge Q&A 0 02-22-2008 05:42 AM
releaseitem command AlanZhang Q&A 3 10-04-2007 10:11 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.