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
|
|||
|
|||
another problem about TE
A TE transports two products from a queue to a sink.
I set the capacity of TE with 2. And in the "use transport" trigger, I select "Task Sequence Example 1, Creates a standard task sequence manually" There is a task "inserttask(ts,TASKTYPE_FRUNLOAD,item,outobject(cu rrent,port),opipno(current,port));" I think when the TE executes this task, it will only unload one item. But in fact, it unload two, why? thanks |
#2
|
||||
|
||||
Qin Tian,
For every product that the queue sends to the sink a seperate tasksequence is created. The capacity actually tells the transporter how many tasksequences it can perform at the same time, controlled by the break to task. So if you load 2 products, the taskexecuter has 2 tasksequences so he also unloads 2 products. Steven |
The Following 3 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
qin tian (10-24-2008) |
#3
|
|||
|
|||
Thank you, Steven. But According to the mannual, when breaking to the second TS, I think the unload task in the first TS will not be executed, the unload task in the second TS will be executed.
So, why two products are unloaded? TS 1: TRAVEL, LOAD, BREAK, TRAVEL, UNLOAD ____________________| | TS 2: TRAVEL, LOAD, BREAK, TRAVEL, UNLOAD |
#4
|
||||
|
||||
Qin,
after the second task is finished the taskexecuter will return to the first tasksequence and finish that one as well so there is your second unload. You can check it because the first one loaded is the last one unloaded. Steven |
#5
|
|||
|
|||
Steven, That confused me.
According the mannual, only subtask can return to the original TS. The breaktask will not return to the original TS. Am I wrong? Or the mannual is wrong? |
#6
|
||||
|
||||
Qin,
In your taskexecuter (TE) there are 2 lists of tasks. Both can be found as a variable in the tree. These are: tasksequencequeue and activetasksequence. When a TE receives a tasksequence in his tasksequencequeue it looks and when it is doing nothing this task is moved to the activetasksequence list and executed. When it hits a breaktask, it looks through the tasksequencequeue if there are any tasks that it can breakto (the conditions are defined in the breakto trigger). If not, it simply continues with the current task and finish that one. If it finds a task it can breaks to, the tasksequence in the activetasksequence is placed back in the tasksequencequeue and the new task that you are breaking to is placed in the activetasksequence. When that one is finished, there is still the unfinished task in the tasksequencequeue so it will continue with that task. So the difference between a breakto and a call sub task is, is that the call subtask will return to exactly one tasksequence (the one that called the subtask!) while after the breakto, the tasksequence is placed back in the tasksequencequeue and is simply executed when the taskexecuter takes a new task. I hope this makes it a bit clearer. Steven |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
shafizad (10-06-2010) |
#7
|
|||
|
|||
Thank you Steven, I have got many from your explanation. But about Var2 of Breaktask, still confused.
I have make a test, set var2 to not zero, and the behave of the model doesn't make any difference. why? By default (0), the TaskExecuter will see if it has any task sequences in its queue. If the queue is empty, then it will open its input ports and receive a task sequence from an upstream dispatcher. Does this happened before break to logic? If the queue is empty, how to receive a ts? |
#8
|
||||
|
||||
Qin,
I think the guys from Flexsim have to conclude here if I am correct or not but what I think is that this parameter is there for a use in special occasions. If you have a dispatcher before a tasksexecuter, the tasks are not all dispatched to the taskexecuter but are stacked in the dispatcher. In normal circumstances (var2 = 0) if there no valid tasksequences anymore, it will open its ports and receive a new tasksequence and see if it can break to that tasksequence. If var2 is not 0 it will simply not open the ports again so if there are no tasks in it's queue it can break to it will not break to anything but continue with it's current task. So as said before I think this is only for special situations and certainly if you are a beginner, forget about these parameters. Steven |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
qin tian (10-26-2008) |
#9
|
||||
|
||||
Yes, Steven is correct on this. Usually you will want to receive stuff from the dispatcher anyway, so setting var2 to non-zero won't be used very often. It was just something that might be needed in very special situations (although I don't know when).
|
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
qin tian (10-30-2008) |