Build the code for arrival prediction