Goodnight, I have the following code to define the specific bay depending on the itemtype, but I can not define that cell capacity is one, the rack is filled with empty fields and overflow flowitem
ATTACHMENT MODEL
CODE PLACE BAY:
/**Custom Code*/
treenode item = param(1);
treenode current = ownerobject(c);
int cellcap = 1;
int baynum=0;
if (getitemtype(item)==1)
{ baynum=duniform(1,3); }
if (getitemtype(item)==2)
{ baynum=duniform(4,6); }
if (getitemtype(item)==3)
{ baynum=duniform(7,9); }
return max(1, min(rackgetnrofbays(current), baynum));