I am using calculate route in routing api to identify distance and time from source to destination. In developers documents I have seen one of the transport mode as car HOV. What kind of vehicals exactly comes under this category.
Like when I say truck it covers multiple types of vehicals like. Caravan , camper e.t.c. In the same way what comes under car HOV category.
Please find below the definition provided for carHOV in Here documentation (developer.here.com/documentation/routing/topics/transport-modes.html)
carHOV: same as routing for cars, but also allows usage of HOV (high-occupancy vehicle) lanes and roads.
HOV stands for High-occupancy vehicle lane. A high-occupancy vehicle lane (also known as an HOV lane, carpool lane, diamond lane, 2+ lane, and transit lane or T2 or T3 lanes) is a restricted traffic lane reserved for the exclusive use of vehicles with a driver and one or more passengers, including carpools, vanpools, and transit buses. These restrictions may be only imposed during at peak travel times or may apply at all times. The normal minimum occupancy level is 2 or 3 occupants.
YOu can read more about HOV in Wikipedia https://en.wikipedia.org/wiki/High-occupancy_vehicle_lane.
In addition there are some rules that mark certain vehicles as equivalent to HOV.
These are defined in map specification and not exposed to routing request / response. Example:
Toll is same as HOV
Motorcycle/Hybrid/Alternative Fuel... is same as HOV
Thus if you are calculating route / travel time you may get status code that route is violating HOV rule (since you didn't specify transport type). In real life it may mean that road is open to carpool or people with "EasyPass" (or equivalent toll system).
An example would be I-66 in VA inside Capital Beltway (USA).
Related
Problem: Truck assignment with limited quantity to deliver to the customers.
The truck has to be assigned to the customer. As the truck has limited quantity, the truck needs to return back to reload again to deliver to the next customer.
Trip - load at Depot, unload at customer/few customers, come back to depot.
The problem facts are available trucks and customers to be delivered. We need to find dynamically how many trips can be possible from truck-based on few timing-related conditions(like truck available time, driver hours, etc).
The solution I can think off:
Pre-compute max number of trips by the truck based on business understanding- use this as a planning variable. Provide hard score for violating time constraints, so few trips will be left unassigned if truck exceeds the available truck/trip time.
Need Help:
For every solved example, we have a fixed number of planning variables before planning. Even In the chained planning variable(Like TSP,VRP), we have the fixed number of trucks beforehand.
Any help is appreciated. If there is no direct solution, is the approach I have come up is the best possible?
That solution is indeed recommended currently:
Provide enough trucks in the anchorValueRange to make sure a feasible solution can be found. Defining that number can be tricky: typically double the average usage. For example, if you have 300 visits and do on average 100 visits per truck, give it 6 trucks, as you never expect it to use more than 6 trucks (and probably a lot less). If trucks have skills or affinity, this becomes a bunch more complex.
Add an extra score level: if you're on HardSoftScore, switch to HardMediumSoftScore.
Add a medium constraint to penalize the number of trucks used. This is softer than the hard constraints (capacity etc) and harder than the soft constraints (distance etc).
(The alternative, adding/removing values to the value ranges on the fly, is only theoretically possible in OptaPlanner's architecture at the moment (don't use addProblemFactChanges for this!). It might sound like the perfect solution, but there are many subsystems that profit from a fixed value range, so that approach would have severe trade-offs.)
We are building mobile application for truck navigation. When using HERE SDK route calculation for trucks, it sometimes tries to avoid a particular road segment, that is in reality suitable for trucks.
One example - highway crossing:
When I calculate route for car, route is correct and meaningful, it follows the highway from south to the north and crosses under the east-western highway. We expect the same route also for a truck as trucks drive like this daily basis (legally).
But when we actually calculate route for truck, it makes a massive detour and takes us either to the westbound highway (blue route on the picture) or eastbound highway, where it turns back after several kilometers and comes back (green route on the picture), both of which is a nonsense. It seems as HERE wants to avoid going under the highway bridge.
I tried to put a waypoint slightly north of the east-western highway and suddenly even with truck setting the route is calculated correctly and does no longer want to avoid going under the bridge. So it seems HERE knows it is legal to go there, but tries to avoid this particular road segment at all costs. We witnessed such behavior multiple times at different places.
This is the exact setup:
Start: 49.154356, 16.600705
Destination: 49.190870, 16.594660
Traffic is disabled for route calculation
For tta time we use getTtaExcludingTraffic()
Truck dimensions were tested both with zero size and and with very small values, so that it certainly fits under the bridge
Question is what causes this behavior? It is a problem of HERE's data? Can we avoid such detours in our application?
Seems like this is more so data error, please use
Map creator (locate the poi and make the change, Here team will review and approve it)
Use Map Feedback API : https://developer.here.com/documentation/examples/rest/map_feedback/no-trucks-allowed-on-road
I'm experimenting with the Isoline API and have a question about the effects of two parameters:
Mode: Shortest
The docs imply that things like turns are penalized. By what factor? Known travel times, or some arbitrary estimation?
Traffic: Disabled
The docs imply that traffic is not taken into account. Does this mean the cost of traversing a component of a road is a function of the speed limit, or collected data on actual travel speeds on that route?
Thanks in advance.
For your questions:
Turns are penalization depend on multiple factors which are different for turns of different characteristic (road types, turn geometry etc).
This takes the actual travel speeds into account.
In this link:
https://developer.here.com/documentation/routing/topics/resource-param-type-routing-mode.html
One of the mode is publicTransport.
Is there a way to further classify publicTransport as "Bus", "Train"(for ex: if user wants to take only "BART" or "Metro" i.e. a Train instead of a Bus OR if the user wants to take only a Bus instead of a Train)?
The Routing Service does not support this deeper level. Therefore you can use the Traffic API.
The transit modes allow you to specify various types of vehicles that
you wish to be included in the transit routing results:
High-speed trains
Intercity/EuroCity trains
Inter regional and fast trains
Regional and other trains
City trains
Buses
Boats/Ferries
Metros/Subways
Trams
Ordered services/Taxis
Inclined/Funiculars
Aerials/Cable Cars
Rapid Buses
Monorails
Airplanes
I need to calculating times and distances with multple travel modes, I try to pass multiple travel modes separated with | like this:
https://maps.googleapis.com/maps/api/distancematrix/json?origins=E149AQ&destinations=UB83PH|NW14SA|WC1E7HU|N78DB&mode=walking|bicycling|driving&language=en-GB&key=myKey
But it doesn't work as I expected.
Only a single travel mode is supported per request. To get results for multiple travel modes, make multiple requests.
The documentation implies that but doesn't state it explicitly:
Optional parameters
mode (defaults to driving) — Specifies the mode of transport to use when calculating distance. Valid values and other request details are specified in the Travel Modes section of this document.
Travel Modes
For the calculation of distances, you may specify the transportation mode to use. By default, distances are calculated for driving directions. The following travel modes are supported:
driving (default) indicates distance calculation using the road network.
walking requests distance calculation for walking via pedestrian paths & sidewalks (where available).
bicycling requests distance calculation for bicycling via bicycle paths & preferred streets (where available).
transit requests distance calculation via public transit routes (where available). This value may only be specified if the request includes an API key or a Google Maps API for Work client ID. If you set the mode to transit you can optionally specify either a departure_time or an arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time). You can also optionally include a transit_mode and/or a transit_routing_preference.
Note: Both walking and bicycling directions may sometimes not include clear pedestrian or bicycling paths, so these directions will return warnings in the returned result which you must display to the user.