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 Sequence Problem
Hi All,
please find the attached model. As per our requirement, the operator will pick the item from Queue4 and Queue3 and dump it into Staging Queue. Next task is to collect items from Queue1 and Queue2 and again dump it into the Staging Queue. We have written some task sequence logic in FLOW tab (use operator option) of Queue4 to pick item from Queue4, then from Queue3 and and finally dump it to Staging. Same code is written in FLOW tab (use operator option) of Queue2. When we run the model, the operator is picking the items in wrong order(may be default order). We could not find the proper solution. Task 1: Queue4 --> Queue3 --> Staging Queue Task 2: Queue2 --> Queue1 --> Staging Queue the above tasks repeats. Operator has to pick all items at once while collecting from single Queue. |
#2
|
||||
|
||||
Hello Manoj,
you work quit a bit of time with flexsim. You should know by now the reference item in a trigger or function is set to a specifi item. It is the item which the function handles now. It isn't a universal reference which the flexsim engine guesses and points to your expected item. Your custom Tasksequence uses for the item of the first and second queue the same reference item. But the Item in the first queue is different to the second queue. They are not the same. The main problem are the Items, you want to collect. They aren't in your model when you write your customed tasksequence. Maybe you can use the Break to - Function of your operator.It works well with the standard tasksequence. There is a template to load items from the same loadstation. You can customize the template. If there aren't anymore items or better taskquence with the same loadstation, you break to a tasksequence which suit you as you described in your post. If there isn't a suitable Tasksequence to load, break to a tasksequence which has already loaded the item. Then the operator will finish this tasksequence. If you want that the begun tasksequences are finished before the operator load new items, the begun tasksequences should have a higher priority than the not begun tasksequences. You can achieve your task with a combination of a customed break to function and the dynamically changing of the priority of the tasksequences in the tasksequencequeue. You will find all you need in the chapter Task Sequences of the manual. Querrying Information on Task Sequences is very usefull to identify the Tasksequnece to break to. Setprioity changes the priority of a Tasksequence. If you want to stay at your approach of customed tasksequences you can use the tasktype callsubtask. So you create the tasksequence when the item is in your model. Jörg |
#3
|
||||
|
||||
Hello Manoj,
the following code is tested in Flexsim V6. It should work in Flexsim V5, too. The code is from the Break To (Requirement) function. It loads further items from the same load station until the load capacity ends. Or the operator loads another item from another station chosen from the switch-case method. Code:
treenode activets = parnode(1); treenode current = ownerobject(c); // JV - Loadstation from the activets treenode loadstation = gettaskinvolved(activets,2,2); // extract two digits of the name of a queue as a loadstation (LS) // used it in a switch method int numloadstation = stringtonum(stringcopy(getname(loadstation),6,2)); //pr();pd(numloadstation);// test loadstation number /**Same Load Station*/ /** \nOnly break to tasksequences that load flowitems from the same station object or a second one.*/ /** \n\nObject queueing the tasksequences: */ treenode theobject = /**/current/**list:current~inobject(current,1)*/ ; treenode tsqueue = gettasksequencequeue( theobject ); treenode returnts = NULL; // other and here second loadstation of loading tour for (int indexloadstation = 1; indexloadstation <= 2; indexloadstation++) { for(int index = 1; index <= content(tsqueue) && ! returnts; index++) { treenode curts = rank(tsqueue, index); if( gettotalnroftasks(curts) == getnroftasks(curts) // first check to see if it is a new tasksequence (not partially completed) && gettaskinvolved(curts, 2, 2) == loadstation// check to see if involved2 (station) matches for the second task (load task) of the current and active task ) returnts = curts; } if(objectexists(returnts)) break; else { switch(numloadstation) // choose second loadstation { case 1: { loadstation=node("/Queue2",model()); break;} case 2: { loadstation=node("/Queue1",model()); break;} case 3: { loadstation=node("/Queue4",model()); break;} case 4: { loadstation=node("/Queue3",model()); break;} default: { pr();pt(" no valid loadstation"); return tonum(returnts);} } } } /** \n\nThis option assumes that the tasksequences are standard sequences. (i.e. Travel/Load/Break/Travel/Unload)*/ return tonum(returnts); |
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Manoj Kumar (09-16-2013) |
Tags |
task sequence |
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with a coordinated task sequence. Could somebody please help spotting the problem? | Vadim Fooks | Q&A | 1 | 08-27-2012 03:26 PM |
Operator task sequence | George Serhan | Q&A | 12 | 03-06-2012 07:19 AM |
Task Sequence Example 1 | Li Chin | Q&A | 4 | 10-27-2008 06:50 AM |
Task Sequence Question | David Chan | Q&A | 1 | 05-27-2008 03:56 AM |
coordinated task sequence, need help. | qin tian | Q&A | 4 | 05-12-2008 05:52 PM |