here_location_services.tour_planning_api module

This module contains classes for accessing HERE Tour Planning API.

class here_location_services.tour_planning_api.TourPlanningApi(api_key=None, auth=None, proxies=None, country='row')[source]

Bases: here_location_services.apis.Api

A class for accessing HERE Tour Planning API.

Parameters
__init__(api_key=None, auth=None, proxies=None, country='row')[source]
Parameters
solve_tour_planning(fleet, plan, id=None, optimization_traffic=None, optimization_waiting_time=None, is_async=False)[source]

Requests profile-aware routing data, creates a Vehicle Routing Problem and solves it.

Parameters
  • fleet (here_location_services.config.tour_planning_config.Fleet) – A fleet represented by various vehicle types for serving jobs.

  • plan (here_location_services.config.tour_planning_config.Plan) – Represents the list of jobs to be served.

  • id (Optional[str]) – A unique identifier of an entity. Avoid referencing any confidential or personal information as part of the Id.

  • optimization_traffic (Optional[str]) – “liveOrHistorical” “historicalOnly” “automatic” Specifies what kind of traffic information should be considered for routing

  • optimization_waiting_time (Optional[Dict]) – Configures departure time optimization which tries to adapt the starting time of the tour in order to reduce waiting time as a consequence of a vehicle arriving at a stop before the starting time of the time window defined for serving the job.

  • is_async (Optional[bool]) – Solves the problem Asynchronously

Returns

requests.Response object.

Raises

ApiError – If status_code of API response is not 200 or 202.

get_async_tour_planning_status(status_url)[source]

Get the status of async tour planning calculation for the provided status url.

Parameters

status_url (str) –

Return type

requests.models.Response

get_async_tour_planning_results(result_url)[source]

Get the results of async tour planning for the provided result url.

Parameters

result_url (str) –