Starting optimisation.