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

Overflow error - do bounds-check? #81

Closed
e-lo opened this issue Jul 10, 2017 · 2 comments
Closed

Overflow error - do bounds-check? #81

e-lo opened this issue Jul 10, 2017 · 2 comments
Assignees

Comments

@e-lo
Copy link
Member

e-lo commented Jul 10, 2017

Getting an overflow error when running traces on Network version: network_draft1.14_fare
Is this a network problem? if so, would we do a bounds check?

('Unexpected error:', <type 'exceptions.OverflowError'>)
2017-07-10 12:10:35 [CRITICAL/MainProcess] Unexpected error: <type 'exceptions.OverflowError'>
Traceback (most recent call last):
  File "run_trace.py", line 25, in <module>
    time_window      = 30)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/Run.py", line 202, in run_fasttrips
    r = ft.run_assignment(fasttrips.Assignment.OUTPUT_DIR)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/FastTrips.py", line 169, in run_assignment
    r = Assignment.assign_paths(output_dir, self)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/Assignment.py", line 667, in assign_paths
    Assignment.simulate(FT, output_dir, iteration, pathfinding_iteration, pathset_paths_df, pathset_links_df, veh_trips_df)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/Assignment.py", line 1819, in simulate
    veh_trips_df   = Trip.update_trip_times(veh_trips_df, Assignment.MSA_RESULTS)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/Trip.py", line 828, in update_trip_times
    trips_df[Trip.STOPTIMES_COLUMN_TRAVEL_TIME    ] = trips_df[Trip.STOPTIMES_COLUMN_TRAVEL_TIME_SEC].map(lambda x: datetime.timedelta(seconds=x))
  File "//anaconda/envs/fast-trips-develop/lib/python2.7/site-packages/pandas/core/series.py", line 2177, in map
    new_values = map_f(values, arg)
  File "pandas/src/inference.pyx", line 1207, in pandas.lib.map_infer (pandas/lib.c:66124)
  File "/Users/elizabeth/Documents/urbanlabs/MTC/SHRP2/working/fast-trips/fasttrips/Trip.py", line 828, in <lambda>
    trips_df[Trip.STOPTIMES_COLUMN_TRAVEL_TIME    ] = trips_df[Trip.STOPTIMES_COLUMN_TRAVEL_TIME_SEC].map(lambda x: datetime.timedelta(seconds=x))
OverflowError: cannot convert float infinity to integer
@e-lo e-lo assigned lmz Jul 10, 2017
@lmz
Copy link
Member

lmz commented Jul 10, 2017

Does this commit fix it: b16d71e

It believe this was because acceleration/deceleration wasn't specified so we were doing a div by zero to calculate acceleration/deceleration seconds.

@e-lo
Copy link
Member Author

e-lo commented Jul 10, 2017

Confirmed, Fixed b16d71e

@e-lo e-lo closed this as completed Jul 10, 2017
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

2 participants