Optimizing allocation in a warehouse network