Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trip end time before drop off change event time #29

Open
gautamarora opened this issue Sep 23, 2019 · 0 comments
Open

Trip end time before drop off change event time #29

gautamarora opened this issue Sep 23, 2019 · 0 comments

Comments

@gautamarora
Copy link

👋hey @morganherlocker - thanks for this amazing tool 🙇

Wanted to report a small issue that I've observed: the change event time for user_drop_off is always greater than the trip end_time. This appears to be happening due to this code section: https://github.com/sharedstreets/trip-simulator/blob/master/src/agent.js#L200-L232

if (this.simulation.time >= this.next) {
...
  if (this.changes) {
  ..
    event_time: this.simulation.time
  ..
  }
if (this.trips) {
  const trip = {
    ..
    end_time: this.next,
    ..
}

Apart from the values being different, the end time is also a floating point number instead of an int.

I've locally tested a fix

    end_time: this.simulation.time,

and it works - but I wanted to check with you incase there was a reason to log them differently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant