descrete event based transport simulation in javascript