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
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- __init__(api_key=None, auth=None, proxies=None, country='row')[source]
- Parameters
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- 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.