question

wei Z4 avatar image
0 Likes"
wei Z4 asked CSN answered

shuttle model problems

My problem is that i can't get the shuttle’s location by referencing it from the

given key of allocate task in coordinated task sequence ,maybe there still have other problems.

shuttlev192.fsm

/**Custom Code*/
Object current = param(1);
Object item = param(2);
int port = param(3);
treenode destination = param(4);
double priority = param(5);
int preempt = param(6);


treenode dispatcher = current.centerObjects[1];  
treenode lift=Model.find("Elevator1"); 




treenode ts = createcoordinatedtasksequence(dispatcher);  
int opkey = insertallocatetask(ts, dispatcher, 0, 0); 
int liftkey = insertallocatetask(ts, lift, 0, 0);  


int oploc=insertproxytask(ts,opkey,TASKTYPE_TRAVEL,liftkey,NULL );//3
int liftloc=insertproxytask(ts,liftkey,TASKTYPE_TRAVEL,opkey,NULL );//3
insertsynctask(ts,liftloc);//6
insertsynctask(ts,oploc);//5






int opload=insertproxytask(ts,liftkey,TASKTYPE_LOAD,opkey,liftkey);// 7
insertsynctask(ts,opload);//8
int moveupdes1=insertproxytask(ts,liftkey,TASKTYPE_TRAVELTOLOC,NULL,NULL,xloc(lift),yloc(lift),vectorprojectz(up(item),xloc(item),yloc(item),zloc(item),model())); 
insertsynctask(ts,moveupdes1);//11




int loadupdes1=insertproxytask(ts,opkey,TASKTYPE_FRLOAD,item,NULL);//18
insertsynctask(ts,loadupdes1);//11


int moveupdes2=insertproxytask(ts,liftkey,TASKTYPE_TRAVELTOLOC,NULL,NULL,xloc(lift),yloc(lift),item.level-1); 
insertsynctask(ts,moveupdes2); 




int opmoveout=insertproxytask(ts,liftkey,TASKTYPE_MOVEOBJECT,opkey,model()); //13
insertsynctask(ts,opmoveout); 
insertdeallocatetask(ts,liftkey); 
insertproxytask(ts,opkey,TASKTYPE_SENDMESSAGE,opkey,item,1,0,0); 






insertproxytask(ts,opkey,TASKTYPE_TRAVELTOLOC,NULL,NULL,-0.31+0.6*(item.bay)+1.25,0.72,item.level-1);
insertproxytask(ts,opkey,TASKTYPE_UNLOAD,item,destination);//20






insertdeallocatetask(ts,opkey); 


dispatchcoordinatedtasksequence(ts);  






return 0;  
FlexSim 19.2.0
coordinated task sequence
shuttlev192.fsm (60.3 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

CSN avatar image
0 Likes"
CSN answered

Maybe You can look at this case similar to your comparison.http://www.flexsimasia.com/forum.php?mod=viewthread&tid=11204&highlight=AGV

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.