Applied optimal control