Epidemic monitoring in real-time based on dynamic grid search and Monte Carlo numerical simulation algorithm