Adaptive memory programming for a class of demand responsive transit systems