Optimisation of vehicle transmission and shifting strategy for minimum fuel consumption and NOx emissions