HI, Everyone
I am studying Flexsim to make a simulation.
I want to distribute items to each rack of cell following the types of item with using globaltable.
There are 2 object Sorce1,Rack1
Sorce1 makes 12 items each item number, and Rack1 has 12 LocaID
LocaId is maked up BayI and LevelI
I want to distribute Items to each rack of set following the types of item with using global table
Forexemple, item type 5 is put on LocaId 5 (Bay : 2,Level : 2)
I made the source to load the item, but it does not work.
I dont know what is the problem. So someone pleae tell me about how can I solve this problem
The source is as follows
Object item = param(1); Object current = ownerobject(c); /***popup:ByExpression*/ /**By Expression*/ int t = getitemtype(item); int baynum; for(int a=0; a==100; a++){ if(t = gettablenum("LocaTable",1,a)){ baynum = gettablenum("LocaTable",3,a); return baynum; break; } } return rackgetbayloc(current,baynum);
/**Custom Code*/ Object item = param(1); Object current = ownerobject(c); double baynumber = param(2); int t = getitemtype(item); int levelnum; for(int a=1; a==100; a++){ if(t = gettablenum("LocaTable",1,a)){ levelnum = gettablenum("LocaTable",4,a); return levelnum; break; } } return rackgetlevelloc(current,baynumber,levelnum);