Define different global variables for different attributes. And at the entrance of a Store write a entry point method by identifying the attribute and add it to a count function.
I have tried your suggestion.
However, the Method "Count" is only counting the first Entity in the Store. All other parts are not going to be considered.
I tried to include a for loop but this didn´t help. What do I need to do, that all occupied places at the Store are going to be considered?
Amongst others you forgot to address the part locations / indexes in the store.
The code below works.
1. Cosmetics -> Rename your table to T_production_program (also in init method)
2.The count method should be executed only once at the end of the simulation.
Therefore delete it from the store entrance.
var CL : table[object] scrap_part.ContentsList(CL) vEntity1:=0 vEntity11:=0 vEntity12:=0 for var i:= 1 to CL.xdim loop for var j:= 1 to CL.ydim loop if CL[i,j].name = "Entity1" then vEntity1+=1 T_production_program[5,1] := vEntity1 else print "leer" end if CL[i,j].name = "Entity11" then vEntity11+=1 T_production_program[5,2] := vEntity11 else print "leer" end if CL[i,j].name = "Entity12" then vEntity12+=1 T_production_program[5,3] := vEntity12 else print "leer" end next next