uxsim.TaxiHandler.TaxiHandler_nearest

class uxsim.TaxiHandler.TaxiHandler_nearest(W)[source]

A taxi handler that assigns trip requests to nearest taxis (based on Euclidean distance).

Initializes a taxi handler.

Parameters:

W (World) – The world object.

__init__(W)[source]

Initializes a taxi handler.

Parameters:

W (World) – The world object.

Methods

__init__(W)

Initializes a taxi handler.

add_trip_request(orig, dest, depart_time[, ...])

Adds a trip request to this handler.

assign_taxi(vehicle, trip_request)

Assigns a trip request to a vehicle.

assign_trip_request_to_taxi()

Assigns trip request to nearest available taxi.

basic_to_pandas()

Converts the basic statistics on taxi travels to a pandas DataFrame.

compute_stats()

Computes basic statistics of the taxi travels.

get_trip(tr)

Get a TripRequest instance by name or object.

print_stats()

Prints the basic statistics.

trips_to_pandas()

Converts the trips and their travel records to a pandas DataFrame.

assign_trip_request_to_taxi()[source]

Assigns trip request to nearest available taxi.