Big difference in the cost of paying the round trip - here-api

The route from 46.371399% 2C2.569599 to 50.53027% 2C9.68613 costs 254.4 euros in France, and 74.2 euros back in France. Why such difference?
254.4 euros
https://fleet.ls.hereapi.com/2/calculateroute.json?xnlp=jsonAttributes%3D41&app_id=&app_code=&apikey=&mode=truck%3Bfastest%3Btraffic%3Adisabled&language=en-GB&representation=overview&metricSystem=metric&routeattributes=wp%2Csc%2Csm%2Csh%2Cbb%2Clg%2Cno%2Cshape&legattributes=wp%2Cmn%2Cli%2Cle%2Ctt&maneuverattributes=po%2Csh%2Ctt%2Cle%2Cti%2Cli%2Cpt%2Cpl%2Crn%2Cnr%2Cdi&linkattributes=sh%2Cle%2Csl%2Cds%2Ctr&instructionformat=html&trailersCount=0&alternatives=0&currency=EUR&trailerType=2&vehicleNumberAxles=2&trailerNumberAxles=3&hybrid=0&height=4m&trailerHeight=400&vehicleWeight=8000&limitedWeight=40t&width=225&length=16.5m&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=1&commercial=1&heightAbove1stAxle=300&fuelType=Diesel&detail=1&rollup=none%2Ccountry%3Btollsys&requestId=1631897604381&excludeCountries=CHE&truckRestrictionPenalty=strict&emissionType=6&shippedhazardousgoods=0&waypoint0=geo!46.371399%2C2.569599&waypoint1=geo!50.53027%2C9.68613&jsoncallback=H.service.jsonp.handleResponse(17)
74.2 euros
https://fleet.ls.hereapi.com/2/calculateroute.json?xnlp=jsonAttributes%3D41&app_id=&app_code=&apikey=&mode=truck%3Bfastest%3Btraffic%3Adisabled&language=en-GB&representation=overview&metricSystem=metric&routeattributes=wp%2Csc%2Csm%2Csh%2Cbb%2Clg%2Cno%2Cshape&legattributes=wp%2Cmn%2Cli%2Cle%2Ctt&maneuverattributes=po%2Csh%2Ctt%2Cle%2Cti%2Cli%2Cpt%2Cpl%2Crn%2Cnr%2Cdi&linkattributes=sh%2Cle%2Csl%2Cds%2Ctr&instructionformat=html&trailersCount=0&alternatives=0&currency=EUR&trailerType=2&vehicleNumberAxles=2&trailerNumberAxles=3&hybrid=0&height=4m&trailerHeight=400&vehicleWeight=8000&limitedWeight=40t&width=225&length=16.5m&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=1&commercial=1&heightAbove1stAxle=300&fuelType=Diesel&detail=1&rollup=none%2Ccountry%3Btollsys&requestId=1631897604381&excludeCountries=CHE&truckRestrictionPenalty=strict&emissionType=6&shippedhazardousgoods=0&waypoint1=geo!46.371399%2C2.569599&waypoint0=geo!50.53027%2C9.68613&jsoncallback=H.service.jsonp.handleResponse(17)

On the way forward, the route uses the paid highway section from "Montluçon" to "Saint-Maurice", which costs 244.20€ according to the HERE API, for trucks matching specified input parameters.
According to the current pricesheet from the French highway operator APRR, this section costs indeed 244.20€. See page 177, vehicle column Class 4. Therefore the high amount is not a data error.
The high difference comes from the fact that on the way back, the route exits the paid section much earlier at "Chalon-Sud", so the section to pay is "Saint-Maurice" to "Chalon-Sud", which costs 64€ for Class 4 vehicles.

Related

Transform a large list into a tibble with one column containing all elements [duplicate]

This question already has answers here:
Convert a list to a data frame
(26 answers)
Closed 3 years ago.
I'am sorry for this question because it seems quite obvious but I can't come up with a solution myself. I have a large list of 130 elements each a list of 10 single character strings.
I want to have this as a combined tibble with one column containing all strings.
If I try do.call(dplyr::bind_rows, y) on my list I still get an error: Error: Argument 1 must have names
For more insight about the list I will post the console output of the first sublist by calling dput(bribe.test[[1]])
dput(bribe.test[1])
list(list("\r\n Supercharge your R/C vehicle and also this systems will boost horsepower and performance of any RC nitro engines, visit us to get online xtm racing, xtm racing rail, xtm racing engine, xtm xt2 engine, and xtm nitro engine. Visit # https://rbinnovations.com/collections/super-chargers/xtm-racing\r\n ",
"\r\n The Powermatic 2+ or Powermatic 2 Plus Electric Cigarette Rolling Machine uses an electric spoon-fed cigarette injector that will make king size or 100's cigarettes in a few seconds and you can buy it online with us at Hard Working Products. Visit https://hardworkingproducts.com/powermatic-2\r\n ",
"\r\n Hello sir, My uncle just coming india yesterday night at ahmedabad airport from New Zealand. And i gave him 2 iphone , iphone 8 plus and iphone 11 pro.. and they called by custom department. The officer told him that they are not allowed with these phone. They force him to pay 42,000/- custom duty for these phone. He just arrived that's why they haven't got money at that time. But his son gave him 600 nzd for his expenses. And these bloody corrupt office force him to pay 600$. They felt helpless at that time and gave 600$ with the passport.My uncle dont know his name. You can check cameras if you want, he was at counter around 1:00 o'clock at night. It is bloody bad experience with them. I'm going to tell my friends and all the relatives which are here to not go india ever..\nI'm felling helpless to come my home country. If you can then take strict actions against these bloody corrupt officers who are cheating with our nation. Please take strict action. Hope you can save our nation from this corrupt officers\nSingapor airlines \nSQ530 arrived at 21:50 evening on 6/1/20\nThank you\r\n ",
"\r\n Date of the incident: 29th December 2019\nTime of incident: Around 8 PM in the evening\nPlace of incident: ECR road, Pondicherry to Tamil Nadu check post.\nWhile driving back from Pondicherry to our stay near ECR road, we (4 people in the car) took 8 beer cans of 500 ml each. At the checkpost (just 100mtrs before our lodge) police stopped us, started checking the vehicle. We voluntarily declared the beer quantity and handed over to them.\nThey asked us to pay Rs 4200 and go else, they will create a case on us and arrest us, seize the vehicle. Since we took the vehicle from self drive agency, we really wanted come out of this. We apologise to them as we weren't aware of the border lines between the states. Requested them to dispose the beers and let us go. My 5 year old daughter was crying seeing the officers are not allowing me to leave. Nothing was fruitful and we literally beg them to leave us. Language was a big barrier as we don't know tamil and none of the officers understand English/hindi properly. Somehow a communication happened and I had to show them the account balance online as I didn't have that much cash with me. Finally, the officer agreed to leave us with a cost of Rs 500 and 4 beer cans.\nWe noticed at the same time, 4 college students from chennai were also got caught with a bag full of Liquors. The officer was very casual to them and also denied money from them even though they offered him 200 rupees. They may be from families where the indian law does not get applied easily. I understand that.\nWe can't speak tamil or pondi language.. Is this what you are angry on us? Is this what you discriminate us? Don't you ruin the future of your own students in the name of partiality??\r\n ",
"\r\n Dear Sir,\nThis is not the first time I am facing this issue with Rohit Gas Agency. I tried to bring it to the notice of Indane. Its of no use. Rohit Gas Agency provides worst service. We do not have option. To Deliver the Cylinder, the Delivery boy demands Rs 50 everytime. This is a common issue. If not paid he shouts badly on road and moves out. Rohit Gas Agency is always unreachable. These bugs working in the Gas Agency are eating up the money paid by Gas Subscribers. \nMany a times, the cylinder is not delivered to home. We are forced to collect the Cylinder paying additional bribe of Rs 50 near Godown. If not paid, we need to lift the cylinder and carry the same back till the car parking and drive back home. \nThe Gas Delivery - Rohit Gas Agency is unfit to manage the delivery business. Please look into the complaints and reviews on google atleast. \nRegards\nPrashanth .P\r\n ",
"\r\n I paid bribe today to a police officer who came for passport verification of my mother. Even after providing all supporting documents and required information, officer asked to pay 500Rs for Chai Pani. When I asked to reduce the amount, officer said that it is decided by higher officials of police. \nI feel very bad after paying, this practice is so common in UP. Please take necessary actions against this to prevent civilians from such corrupt people. \nOfficer Name - Indrapal Singh\nThana - New Agra Police Station\nDate - 6th Jan 2020\nPlace - Agra\r\n ",
"\r\n I have asked to pay bribe to avoid huge penalty for putting tent sheet on car windows. Police asked me to pay 1100 rs fine or pay bribe instead of that. Since I don't had that much money and I was in urgency, I paid bribe to escape from the situation. This was happened at corporation circle church opposite to church at 12 30 PM. \r\n ",
"\r\n Help desk officer prashant who are trapping people to make work done by giving bribes to higher officials at malakpet rto malakpet Hyderabad \r\n ",
"\r\n Get free shipping when you buy the Revolution the great american electric cigarette machine, within the continental US from https://hardworkingproducts.com/revolution-electric-cigarette-machine-made-in-america and also you will get this machine at best market price in USA.\r\n ",
"\r\n I Would like to Inform you that a lot of corruption is going on in the DC Office Bangalore Urban Dept. I am not paid bribe directly there is lot more agents have to collect the money and some one has do the deel not direct deel with D C Officer. Brib agents collecting the money and send it to direct DC officer house. The Officer have a one more home office in Kumarakrupa road bangalore. the deeling files as going their for officer signature. One agent is doing his job in that office his name called Mahendre Kumar (Shift car No.KA 04 MK 282) Please do the action for this. Govt officers also been included in this deels and they get commission also.\nNames Sadanada Swamy , Basavaraju, G N Shivamurthy. \r\n "))
You could use unlist with tibble
df_tib <- tibble::tibble(col = unlist(bribe.test))
Or data.frame
df1 <- data.frame(col = unlist(bribe.test), stringsAsFactors = FALSE)

Vehicle Km Costs are included while on ferry in Here API

When I ask for toll costs I don't get ferry costs (to be implemented I hope). But in the route cost I see vehicle costs. If I understand correctly only the costs per km are taking into account for a vehicle (so I have to add hour costs to km). To my suprise the costs also takes km while on ferry into account.
I entered 50 cents per km, and I see about 30 euro of vehicle costs between Dover and Calais.
Here is a link
{"faultCode":"s9205992a-ff30-4188-8a82-e721643f247c","responseCode":"401","message":"This is not a valid app_id and app_code pair. Please verify that the values are not swapped between the app_id and app_code and the values provisioned by HERE (either by your customer representative or via http://developer.here.com/myapps) were copied correctly into the request."}
Vehicle costs are calculated irrespective of the vehicle being driven or not in the current routing api. However there are plans of implementing the above ask soon. Watch out for updates in the development page.
Total distance as per your query: 56.743 km
Vehicle km cost defined: 0.5 cents
Total Vehicle cost calculated: 56.743 * 0.5 = 28.37 Euro

Truck Routing and Toll Cost Calculation for Romania

I have the following request :
https://tce.cit.api.here.com/2/calculateroute.json?mode=fastest;truck;traffic:disabled&departure=now&avoidseasonalclosures=true&cost_optimize=1&metricsystem=metric&truckRestrictionPenalty=soft&driver_cost=15&vehicle_cost=0.85&currency=EUR&vehicletype=diesel,24&truckType=tractorTruck&tollVehicleType=3&hybrid=0&emissionType=6&passengersCount=1&commercial=1&trailerType=2&trailersCount=1&vehicleNumberAxles=2&trailerNumberAxles=3&tiresCount=12&height=4.0m&width=2.50m&length=16.5m&heightAbove1stAxle=3.5m&trailerHeight=4.0m&vehicleWeight=12.0t&limitedWeight=40.0t&weightPerAxle=10.0t&maneuverAttributes=none&combineChange=true&routeAttributes=none,no,wp,lg&legAttributes=none,li,sh&linkAttributes=none,fl,le&detail=1&alternatives=1&rollup=none,total,country&jsonattributes=41&waypoint0=geo!stopOver!47.05185,21.93873;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.85142,24.87989;;6,7,2,8,9,10&app_id=APPID&app_code=APPCODE
The resulting route is a bad one.
The restrictions for trucks are not there on the real roads.
The correct route is given by the following request :
https://route.cit.api.here.com/routing/7.2/calculateroute.json?app_id=APPID&app_code=APPCODE&mode=fastest;car;traffic:disabled&departure=now&avoidseasonalclosures=true&metricsystem=metric&truckRestrictionPenalty=soft&trailersCount=1&height=4.0&width=2.50&length=16.5&limitedWeight=40.0&weightPerAxle=10.0&maneuverAttributes=none&combineChange=true&routeattributes=none,no,wp,lg,summary&linkattributes=none,fl,le&legattributes=none,li,sh&detail=1&alternatives=1&jsonattributes=41&waypoint0=geo!stopOver!47.05185,21.93873;;6,7,2,8,9,10&waypoint1=geo!stopOver!44.85142,24.87989;;6,7,2,8,9,10
Also the toll cost returned by both requests are wrong.
The returned value for one day is 11 RON and the amount in target currency is 2.36 EUR.
The correct value for one day is 11 EUR.
The bridge costs are correct.
Where can i report problems regarding the toll cost calculation and the truck restrictions ?
There is a request to get the list of truck restrictions on a route ?
The toll costs values are returned with VAT or without VAT. Can i get both values ? (with and without VAT)
The toll costs currencies are displayed correctly now. Please comment if you still see issues. stackoverflow.com/questions/50911406/toll-cost-vat-here-api

Fuzzy Matching a paragraph within a large text

I need to do a pretty complex matching of phrases.
I have large bodies of text in files which exceed 1000 words each.
The phrases I am searching for (searchphrase) are like this:
Investment does not mean:
i. Claims to money that arise solely from:
1. Commercial contracts for the sale of goods or
services by a national or an enterprise of a party
to an enterprise in the territory of the other party,
or
2. The extension of credit in connection with a
commercial transaction, such as trade financing
other than loans or claims to money previously
covered.
I want to know if the phrase occurs in each of the files I have. However, the files will not have content that are exact replicas of the phrase. Instead the file (textfile) will be a large document with a paragraph like:
But investment does not mean claims to money derived solely from
commercial transactions designed exclusively for the sale of goods or
services by a national or legal person in the territory of one
Contracting Party to a national or legal person in the territory of the
other Contracting Party, credits to finance commercial transactions such
as trade financing, and other credits with a duration of less than three
years, as well as credits granted to the State or to a State enterprise.
As you can see, searchphrase is pretty similar in actual meaning to this paragraph from textfile. There is also considerable overlap in the keywords. Hence, I should get a match.
What sort of algorithm should I try and use to code this? Are pre-coded modules available anywhere that do this job?

Getting Total Miles In Each State Passed

I would like to know if it is possible to get the total miles traveled (via road/interstate) in each state instead of the total miles only.
For example: From Chicago, IL to Atlanta, GA the total miles traveled in each state would be:
IL=16 miles
IN=284 miles
KY=137 miles
TN=152 miles
GA=128 miles
From what I understand this is not possible in google maps api but I wanted to see if it is possible using anything else, Bing, YAhoo, Mapquest ???
Thanks for any help...
You might be able to use the MapQuest Directions Service to come up with very basic/general distances for each state, but I'm not sure if the distances will be exact enough to fit your needs. Basically, the directions service returns driving directions in terms of "maneuvers" and you can make a request to the directions service that tells it to include crossing state boundaries in the maneuvers it returns. You may be able to parse the data that is returned to calculate the route distances between the "crossing into (state name)" maneuvers, but again, it might not be exact enough.
It might be worth a look. I've never done this before, but it's my first thought. The MapQuest Developer Network has forums, so it might be worth it to post the question there, too.
You can keep track of miles driven in each state (Example: Travel from home in New Mexico to (any city)Texas. These programs will do this for you, Trulos.com, IFTA Plus, truckingoffice.com, ifta-calculator.com Some are free others usually give a 30 day free trial. I use programs like this when I'm filing mileage/fuel reports for commercial drivers. These drivers always have to report how many miles they travel in "each" state. All you have to enter is the location of your starting point and your final destination. The program will then calculate your miles traveled for each state and also will give you the "total" miles traveled.

Resources