Optimization of Logistics: Theory and Practice