fix bug add script for simulate train