Hi, I'm having problems with the following custom code:
Object current = param(1); treenode activity = param(2); Token token = param(3); treenode processFlow = ownerobject(activity); Array racks_LU = [Model.find("Libre_1"),Model.find("Libre_2"),Model.find("Libre_3"),Model.find("Libre_4"),Model.find("Libre_5")]; if(racks_LU[1].subnodes.length < Model.parameters.cap_rack_LUg){ token.donde2 = Model.find("Libre_1"); } else { for (i=1;i<=5;i++){ if(racks_LU[i].subnodes.length < Model.parameters.cap_rack_LU){ token.donde2 = racks_LU[i]; break; } } }
The idea is to set a storage location with the label "donde2".
The array contains the different racks in the model in ascending order. The purpose is to store in one rack at a time, once the rack is full proceed with the next one.
Thank you!.