Threshold-driven optimization for reference-based auto-planning. (8th February 2018)