question

Avantasia2012 avatar image
0 Likes"
Avantasia2012 Suspended asked Joerg Vogel commented

Items on ASRS

There are two items on the asrs fork,i want the top one place on the side of the botom one,i use command setloc,but it is no use,would you please tell me how can i solve this problem. thanks a lot.

FlexSim 7.5.4
asrs
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

The setloc-function does not work. You can move the second loaded item into the first. Then you can set the location of the second relative to the first item. Unfortunately the ASRS-vehicle does not know how many items are loaded and will load more items than the maximum capacity. The Break To function is responsible for this behavior. You must force this function to ignore the internal counted content variable and tell the return value that there is nothing more to load when the second item is moved into the first.

"Break To" function source code:

treenode activets = parnode(1);
treenode current = ownerobject(c);
/***popup:BreakToSame*/
/**New Tasksequences Only ++ do not break after second loaded item*/
/** Only break to task sequences that have not been started already.*/
/** Object queueing the tasksequences: */
treenode theobject = /***tag:dispatcher*//**/current/**/;
treenode tsqueue =  gettasksequencequeue( theobject );
treenode returnts = NULL;
// JV: don't load more items if the first item contains another item
if(content(first(current)) > 0) return tonum(returnts);
// following: origninal lines of code
for (int index = 1; index <= content(tsqueue) && ! returnts; index++) { ....

Onload Trigger;

if(content(current) == 2){
	treenode firstitem = first(current);
	moveobject(item,firstitem);
	double newX = -xsize(item);
	setloc(item,newX,0,0);
}

place-items-next-to-another-asrs-by-moveobject.fsm


· 1
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 ·

Beware of this approach it works only in straight LIFO.

0 Likes 0 ·