Evaluation of piecewise affine control via binary search tree