[optimization] Calculate best initial condition for loops