We're currently using the reverse geocoder to get the speed limit on the road of a specified lat/long position. However that speed limit is always for cars, but we have to consider trucks as well. Anyone knows a way to get the speed limit meant for trucks?
This is offered in the HERE "Platform Data Extension" service: https://developer.here.com/documentation/platform-data/topics/introduction.html
Found a general speed limit example for PHP here (probably you have to adapt the layer to the right one for truck speed limits instead of car speed limits):
https://github.com/seaBass3/here-pde-speed-limit/blob/master/Here_PDE_Demo.php
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.)
I am using the https://m.fleet.ls.hereapi.com/2/calculateroute.json method to match a GPX trace and get the speed limit data for LINK_IDs throughout the route.
The documents for the PDE layers state:
Please be aware that 3-4 different layers need to be evaluated to determine the actual link speed limit: SPEED_LIMITS_FCx (general speed limits), SPEED_LIMITS_VAR_FCx (variable speed limits), SPEED_LIMITS_COND_FCx (conditional speed limits), and TRUCK_SPEED_LIMITS_FCx (in case of a vehicle is a truck). The lowest speed limit on a link is the legal one.
I ideally want to know how the speed limit varies on roads with variable speed signs/smart motorways where the traffic determines the speed.
The information I receive from the layer is:
{
"CONDITION_ID": "743194725",
"LINK_ID": "811864174",
"VSS_ID": "100384",
"DIRECTION": "2",
}
As it doesn't provide a speed limit value, how would I use this information, and is it of any use for what I need to achieve?
The use case of SPEED_LIMITS_VAR layer is to recognize that on some road link a speed limit could be volatility time by time and it means that you can get reality speed limit only by currently traffic info. You know, the SPEED_LIMITS_VAR layer also gives some information about DIRECTION, VARIABLE_SPEED_SIGN_LOCATION, TIME_OVERRIDE, VEHICLE_TYPES, DATE_TIMES.
To get traffic info you can utilize TRAFFIC_SPEED_RECORD_FCn layer, currently you can send the request to API like this: https://pde.api.here.com/2/calculateroute.json?mode=car&departure=2020-11-23T13:54:14&attributes=SPEED_LIMITS_FCn(*),TRAFFIC_SPEED_RECORD_FCn(*)&app_id=---&app_code=---&routeMatch=1 but unfortunately, currently, you have to use only domain name "pde.api.here.com" in request and use for it only app_id, app_code parameters. For domain names like https://s.fleet.ls.hereapi.com and apiKey credentials the layer TRAFFIC_SPEED_RECORD_FCn (as 'attributes' parameter) will be available later.
The description of layer TRAFFIC_SPEED_RECORD_FCn you can read on https://tcs.ext.here.com/pde/layer?region=TSRWORLD&release=&url_root=pde.api.here.com&layer=TRAFFIC_SPEED_RECORD_FC1
If you don't have app_id, app_code but have apiKey then to get info from layer TRAFFIC_SPEED_RECORD_FC you need to send second request using https://s.fleet.ls.hereapi.com and Corridor search or Tiles search
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.
Is there a way to limit the size/resolution when retrieving area shapes from the here.com API?
I love the highly detailed resolution, but unfortunately the size of the shapes is killing my application performance and taking forever to load on the map.
Here currently doesn't provide any means to limit the resolution of the WKTShapeResponse. However, you can limit the resolution at your end by writing an algorithm to smooth the points before rendering it on the map.