Calculation of length for the Assignment Planer