question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked tannerp answered

Operator is teleporting

teleportation.zip

The operator in charge of staging dollies in outbound buffers is teleporting for some reason. It is visually strange but the worst part is that it alters cycle times. Here's the code Im using when the AGV arrives to the unload station:

/**Custom Code*/
Object item = param(1);
Object current = ownerobject(c);
int port = param(2);
Object CONTROL = model().find("OUTBOUND_CONTROL"); //its a dispatcher that controls staging buffer list by connecting to their output ports
Object OPERATOR = CONTROL.centerObjects[current.OPERATOR];
int FROM = current.FROM; //label that states lowest buffer number this station serves
int TO = current.TO; //label that states hisghest buffer number this station serves
int CONTENTS = item.subnodes.length; //agv cage contents

current.output.close();

if(CONTENTS==0) //release to next station
{
	sendmessage(current,current,10);
}
else //create a task to unload
{
	treenode ts = createemptytasksequence(OPERATOR,0,0);
	for(int index = CONTENTS; index >=1; index--)
	{
		if(item.subnodes[index].BUFFER >= FROM && item.subnodes[index].BUFFER <= TO) //correct range of buffers
		{
			inserttask(ts,TASKTYPE_TRAVEL,current,NULL);
			inserttask(ts,TASKTYPE_LOAD,item.subnodes[index],OPERATOR,1);
			inserttask(ts,TASKTYPE_BREAK,NULL,NULL);
			inserttask(ts,TASKTYPE_TRAVEL,CONTROL.outObjects[item.subnodes[index].BUFFER],NULL);
			inserttask(ts,TASKTYPE_UNLOAD,item.subnodes[index],CONTROL.outObjects[item.subnodes[index].BUFFER],1);
			inserttask(ts,TASKTYPE_BREAK,NULL,NULL);
		}
		if(index == 1)
		{
			inserttask(ts,TASKTYPE_SENDMESSAGE,current,current,10,0,0,2);
		}
	}
	dispatchtasksequence(ts);
}
FlexSim 17.1.2
operatortask sequenceteleporting
teleportation.zip (1.1 MiB)
· 3
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

Why do you use in the load task as the load station, or in other words the object where you load the item from, the operator?

A transport tasksequence describes the complete process of a transport. The sequence consists of the part which loads the item from the object that sends the item and the part which unloads the item to the destination. The taskexecuter has only the duty to assists the transport. He isn't an object you loads items from or to in the load and unload tasks.

I didn't open your model, but if you have set at an object that releases items for the tote the option Use Transport, then there are existing transport tasksequences which are responsible to transport a single item to the destination object. Or you must have set an own operation that prevents the automatically created tasksequences and replace it to collect items at a buffer and create a similar tasksequence like the one above.

0 Likes 0 ·
Enrique Elizaga avatar image Enrique Elizaga commented ·

@Jörg Vogel What I am doing in the custom task sequence that activates "on entry" is send the operator to a location, grab one flowitem there, walk to "current", release the dolly into "current's" first subnode. Is there an alternate way to do this. The tasksequence works fine, but the operator is teleporting.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·

@Enrique Elizaga

Is it possible to send in your model or a sample model of the problem area? It's a lot easier to answer your question specifically if we can look at what the model is doing.

The reason I ask is that the .mp4 file in your zip file seems to be corrupted on my end. If you are still having problems or haven't solved this problem, please let us know.

Thanks.

0 Likes 0 ·

1 Answer

tannerp avatar image
1 Like"
tannerp answered

Note: Question answered in a private post.

5 |100000

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