Dynamic Rack Initialisation with inventory type

Dynamic Rack Initialisation with inventory type

Vns
Not applicable
96 Views
1 Reply
Message 1 of 2

Dynamic Rack Initialisation with inventory type

Vns
Not applicable

[ FlexSim 23.2.3 ]

Hi All - im trying to dynamically fill all the racks in the same order at startup. Where the first 1/3 of bays will be filled with part type ‘A’ followed by 2/3 by ‘B’ and the remaining ‘C’. Considering the length of the racks.


Thanks in advance for the advice.


0 Likes
Accepted solutions (1)
97 Views
1 Reply
Reply (1)
Message 2 of 2

chanykE2WUT
Advocate
Advocate
Accepted solution

You can use the reset trigger where you can define the Type. But, first set up a label in the Storage System call Type.

Using a for loop in the reset trigger, you can define the starting bay to the ending bay with the respective level with Type value.

The following example is for loop. You need to have three sets of these for the different range of the bay.

Object current = ownerobject(c);
Storage.Object rack = current;
int ending_bay= rack.bays.length;

for (int row=1; row<= ending_bay ; row++)
{
int ending_level = rack.bays[row].levels.length;
for (int col =1; col<=ending_level;col++)
{
Storage.Slot slot = rack.as(Storage.Object).bays[row].levels[col].slots[1];
slot.Type = 1;
}

}
0 Likes