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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2016
deepam panchal
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Default 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;
Attached Thumbnails
Click image for larger version

Name:	TSERROR.PNG
Views:	342
Size:	395.9 KB
ID:	3220  
Reply With Quote
  #2  
Old 03-29-2016
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 678
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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?
Reply With Quote
  #3  
Old 03-29-2016
deepam panchal
Guest
 
Posts: n/a
Downloads: 9
Uploads: 0
Default

I have kept Preempt value 0..
Reply With Quote
  #4  
Old 03-29-2016
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 678
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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?
Reply With Quote
Reply

Tags
kitting, tasksequencequeue, travel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 01:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.