Optimization of Product Placement and Pickup in Automated Warehouses