In-flight optimization of the total propulsion system