Inventory management in automated warehouses