implement clustering algorithm for AmbulancePlanning