Download Optimization And Optimal Control: Theory And Applications