4.7. Optimization Engine