I'm running into a problem finding random slots on racks that are created by code at the beginning of a simulation.
Basically, my warehouse is divided into different zones, and I'm just trying to get a random slot in a specific zone. However, while filtering on zone works, the Find Slot activity always returns the same slot within a zone: aisle 1, bay 1, level 1, slot 1. The problem does not occur when querying racks that are created "manually": I'm guessing that something happens on model reset that is required for proper functioning of the Storage System, which is then missed by the racks that are created by code after model start.
Attached is a minimal example with a Process Flow and some racks, showing the difference between "code" racks and "manual" racks. The Code Rack Slotting.fsmSQL query used for getting a slot is simply WHERE slot.zoneID == "X" ORDER BY RAND() ASC, where X is the zone ID.
Why is this not working for "code" racks? Is there a way to get this working simply with Find Slot + a query? I can think of some workarounds to this using more code, but I'd rather just use Find Slot, as this seems like the most direct approach.