flexibility optimisation