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
|
|||
|
|||
Problem with TaskSequence
Hello,
I have created a tasksequence on Flow tab of a queue. It resembles Kitting Operation where operator will travel, collect emptycontainer, travel to location near bay/level of rack, select the required item, load & move to the container and then travel to destination queue. Once the TaskSequence is created, its passed on to dispatcher and then on to forktruck. What happens is while forktruck is performing ts1, ts2 is dispatched to it. ts1 is aborted & going on to coordiantedtasks when ts2 is received. I am attaching snapshot of the model tree & code of ts that I created. I will try to create sample model and share. Is this bug in Flexsim 7.7 & 2016? Or is something wrong in the code that I have written? the code: treenode dispatcher = centerobject(current,1); // the dispatcher or task executer string KitName = getname(item); int KitType = getitemtype(item); treenode ts = createemptytasksequence(dispatcher,priority,preemp t); inserttask(ts,TASKTYPE_TRAVEL,current,NULL); // Go to the InQueue inserttask(ts,TASKTYPE_LOAD,item,current,port); // Load the Kit Pallet for(int row = 1; row <= gettablerows("KitListDay1"); row++) { if ( KitName == gettablestr("KitListDay1",row,7)) { // Travel to the Rack string Loc = gettablestr("KitListDay1",row,6); treenode To_Go_Loc = node(Loc,model()); inserttask(ts,TASKTYPE_TRAVEL,To_Go_Loc,NULL); int bay = gettablenum("KitListDay1",row,4); int level = gettablenum("KitListDay1",row,5); string rackname = gettablestr("KitListDay1",row,3); treenode rack = node(rackname,model()); int numContainers = rackgetbaycontent(rack, bay); int ToCollectItemType = gettablenum("KitListDay1",row,2); for(int numCont = 1;numCont<=numContainers;numCont++) { treenode Container = rackgetitembybaylevel(rack,bay,level,numCont); if(objectexists(Container)) { int SelectContianer = getitemtype(Container); if(SelectContianer == ToCollectItemType) { treenode part = rank(Container,1); if(objectexists(part)) { inserttask(ts, TASKTYPE_LOAD,part,rack); //inserttask(ts,TASKTYPE_MOVEOBJECT,part,item); break; } else { moveobject(Container,node("ContainerREcycle", model()),0); } } } } } } treenode FinishedKitDestination = node("QueueKitting",model()); inserttask(ts,TASKTYPE_TRAVEL,FinishedKitDestinati on); // Go to the OutQueue inserttask(ts,TASKTYPE_UNLOAD,item,FinishedKitDest ination,0); // Unload the pallet dispatchtasksequence(ts); // return a 0 so this object will know that you made your own tasksequence and it doesn't need //to make the standard tasksequence automatically return 0; |
#2
|
||||
|
||||
This sounds like the ts2 is preempting ts1. So in your code you have this line:
treenode ts = createemptytasksequence(dispatcher,priority,preemp t); what is the value of preempt? Is it taken from the object where this code is generated on and is that value not 0 by any chance? |
#4
|
||||
|
||||
You didn't open the tasksequence in your screenshot of the tree so we couldn't see how it looks. But anyway, sending a small model would help us more.
Have you tried to step through your code where you create the tasksequence to check if there is nothing strange happening there? |
Tags |
kitting, tasksequencequeue, travel |
Thread | Thread Starter | Forum | Replies | Last Post |
Use of Global TaskSequence with Combiner | Poey Ching Neo | Q&A | 1 | 09-24-2015 11:55 AM |
Coordinated Tasksequence question | Zulay Sarmiento | Q&A | 3 | 09-17-2015 11:39 AM |
Tasksequence problem. | Seunguk Park | Flexsim Student Forum | 3 | 06-10-2015 02:00 AM |
Repeating Tasksequence | Lorenzo Gutierrez | Q&A | 8 | 11-18-2013 07:59 PM |
one question about tasksequence? | LINWEIXU | Q&A | 12 | 08-12-2009 08:01 PM |