A framework for the numerical solution of optimal control problems is modified such that an arbitrary subset of the state variables can be treated as quasi-stationary quantities. This framework is used to reduce the number of state variables of a turbocharged Diesel engine by sequentially omitting the pressure dynamics, the turbocharger inertia, and the thermal dynamics. By comparison to a dynamic simulation using the resulting optimal control inputs, the effects of neglecting these dynamics are assessed. A physics-based combustion model is used in combination with an extended mean-value model for the air path, and a segment of 295s of the World-Harmonized Transient Cycle is considered. The methodology bridges the gap between stationary engine calibration and dynamic optimisation. It reveals which control signals can be represented by lookup maps. For the remaining dynamic control paths, optimal feedforward maps are obtained. Furthermore, the results indicate suitable feedback variables and provide optimal reference maps.