Optimize inventory with safety stock analysis