Routing for trucks with restrictions is not respected - api

we started testing the Routing API in our system and there were some questions:
our goal is to calculate a route for a large truck, to determine whether it will be able to get to the delivery point, taking into account its dimensions and weight. We have formed a request according to the instructions. The request deliberately indicated the delivery point to which the truck would not be able to reach. We expected the route calculation to fail, but it did. We made other attempts with different addresses and got the same result - the route is calculated for the streets that are not passable. We did not find any information describing this behavior in the documentation. Tell me how we can achieve the desired result so that the route is not calculated if the street is not passable for a truck on the last mile?
An example of the request we tested:
router.hereapi.com/v8/routes?transportMode=truck&truck[grossWeight]=20000&truck[height]=300&truck[width]=245&truck[length]=1300&origin=44.65842,10.77567&destination=38.550680,15.938761&return=summary&apiKey=
Thanks in advance for your help

Related

On-Demand Flight Status | Gate Information not working

using the Java SDK, trying to use the On-Demand Flight Status API will result in following error, if a Gate is specified:
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $[0].flightPoints[0].departure.gate
From the documentation I assume that gate should be a JSONObject with the mainGate attribute, but apparently it has been encoded as a JSONArray in the SDK.
I would be grateful about some feedback on this. Maybe I am doing something wrong?
Thanks!
P.S.
If I may add some suggestions:
Would it be possible to make segments.partnership return the flight number of the operating carrier, if the search is done with a codeshare flight? Currently it seems to just return 0, if a codeshare flight number is entered. (e.g. searching for A37136 will return OA0, instead of OA136). Also, it would be great if segments.partnership was to return all codeshare flight numbers for particular flight, and not only one.
The possibility to access fare rules from Flight Offers would be great as well. I understand that displaying fares between two cities is a feature of the Enterprise API (which I probably am not eligible to use), but it would be great to be able to see data, such as Travel and Sales restrictions like these:
VALID FOR TRAVEL COMMENCING ON/AFTER 20SEP 21 AND ON/BEFORE 10MAR 22.
TICKETS MUST BE ISSUED ON/BEFORE 29SEP 21.
As always, thank you for your work!
Below you can find the answers on the topics mentioned in your questions:
Java SDK - gate info not working
Thanks for the report, we've opened the issue on GitHub where you can track its status.
Flight Fare rules
The fare rules can be found for each flight with the Flight Offers Price API where you would have to add the query parameter include=detailed-fare-rules your URL, such as:
https://test.api.amadeus.com/v1/shopping/flight-offers/pricing?include=detailed-fare-rules
Operating carrier in codeshare flight
Indeed with the specific flight doesn't return properly the operating carrier flight number, however, we tested it with other codeshare flights and it worked fine. It seems that the issue is coming directly from the providers and the data they share.
Return all codeshare flight numbers
This is not possible from the legal point of view, as it means it would expose the partnerships and private business between the airlines.

Seat map visibility

When I query seat maps for certain flights, I find that much of the seatmap comes back with "blocked" status. I can confirm with various other sources (airline webpage, ExpertFlyer, etc.) that many of the seats showing up as blocked in the Amadeus API are actually open.
One example is the following query for EWR-LHR flights on UA. I run this as a GET query on the flight-offers API and then pass the results to the seat map API.
https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=JFK&destinationLocationCode=LHR&departureDate=2020-12-18&adults=1&nonStop=true&max=250
This comes back with rows 30-35 or so all "BLOCKED" status. Many of these seats are in reality open, but United may charge an extra fee to book them.
Is there a way to show actual seat availability or include the information on seats for purchase? Alternatively, can I specify the booking class in the query somehow? E.g. I wonder if I asked for a higher class of fare (e.g. full-fare Y) maybe no seat charge would be required (not completely familiar with UA's rules on this). Overall my goal is to see all actual available seats.
The SeatMap Display API builds the aircraft seatmap based on specific flight offer. That’s why the information you get for the seat availability depends on the traveler class information. In the Flight Offers Search API you can define with the parameter travelClass the travel class; economy, premium economy, business or first class. Also, in the test environment it's normal to have discrepancies with other sources as the test environment doesn't contain the full and live data.

Multiple Depot Vehicle Routing Problem Optaplanner

I am trying to customize Optaplanner for my particular use-case. I have been successful so far but now I am struck at the point where I need to have multiple depot and multiple location. Their main use-case seems to be under the assumption that all the vehicle will start from a particular location called depot/warehouse.
In my use-case the conditions are slightly different, The vehicle can start from their own respective locations, meaning there will be multiple depot and multiple customer locations to visit. {MDVRP problem}
for e.g ->
If I have 5 agent and 10 customer location to provide any service, this algorithm assumes
that all these agent will start from same starting location i.e warehouse/depot.
Thus the algorithm will optimize routes based on this assumption and all routes will
start from warehouse
My use case is somewhat like this
If I have 5 agent and 10 customer location to provide any service. Then the algorithm should
start optimizing the route from their own respective location to all the customer location.
So far I have tried custom input to their algorithm. But it doesn't work in an expected manner. Have anyone tried this tool with multiple depot. Any kind of help is appreciated.
The optaplanner-examples implementation supports multi-depot's and it has datasets with multidepots in its data directory. The OptaWeb implementation is based on that model, so the solver should be able to handle it already, but the UI doesn't support this feature yet.

Amadeus Web Services - Fair Quote API

I am trying to find the equivalent of FQP/FQD/FQN queries in the Amadeus SOAP service (Flight) API, but couldn't find one. I checked the API documents as well with no luck. There is command cryptic API to call the GDS commands, but the response is raw data as in the terminal, not a structured one. I need structured data response to precess data in the system.
Is there any SOAP APIs available to get the fare details and the rules?
Thanks
This is a question best sent to Amadeus directly! It's hard to know exactly what you are after without more information. Also Amadeus offer a wide variety of doing basically the same thing and your business can be better off using one or the other - its really impossible to tell without background information.
Check out these webservice calls:
Fare_PricePNRWithBookingClass
The function Fare_PricePNRWithBookingClass is used to price itineraries.
It can return one or several fare recommendations for the passenger(s) and for the itinerary of the active PNR. Only booking classes present in the flight segment of the PNR are considered.
After calling Fare_PricePNRWithBookingClass function, the system keeps the recommendations stored internally for three minutes in a dedicated context. This context can be used to create a TST by using Ticket_CreateTSTFromPricing.
Fare_PricePNRWithLowerFares
The function Fare_PricePNRWithLowerFares is used to display the lowest available fare for a given itinerary.
"Lowest available" means that this fare is applicable in a booking class where there are still enough seats available for the passengers of the PNR. This class might not be the one currently present in the flight segment of the PNR. In this case, rebooking might be necessary.
It can return one or several fare recommendations for the passenger(s) and for the itinerary of the active PNR.
After calling Fare_PricePNRWithLowerFares function, the system keeps the recommendations stored internally for three minutes in a dedicated context. This context can be used to create a TST by using Ticket_CreateTSTFromPricing. Please not that in case rebooking is required, it must be done (for example, using Air_RebookAirSegment) before TST creation.
Fare_InformativeBestPricingWithoutPNR
The InformativeBestPricingWithoutPNR function provided in the Fare interface is used to price informatively an itinerary without any PNR. If a PNR exists, it is neither taken into account nor updated. No pricing record (TST) is created to store the results.
Fare_QuoteItinerary
The QuoteItinary transaction (FQP) quotes fares for passenger types without existing reservations (PNR). Pricing is executed according to the principles of IATA resolutions as well as according to specific user requirements, if industry conform or individual.
Most likely there are more options available (that I don't know about).
Documentation available at https://webservices.amadeus.com/ - login required.

Google Map Directions API Optimize Waypoint and Force Waypoint Order

I am having difficulty in overcoming the situation I am facing. I have a route as follow:
StartPoint
WayPoint A-1 <--- Pickup
WayPoint A-2 <--- Dropoff
WayPoint B-1 <--- Pickup
WayPoint B-2 <--- Dropoff
WayPoint C-1 <--- Pickup
WayPoint C-2 <--- Dropoff
EndPoint
A bus is starting to drive from Start Point and it is supposed to pick 3 passengers up (A, B, C) and drop them off in different locations. The locations are not static and it changes based on passenger.
If I pass all these to google map directions api and set the OptimizeWaypoint option to true the issue that occurs is sometimes the dropoff waypoint occurs before pickup waypoint for a passenger due to route optimization.
Does anyone know a solution to force google map api route optimization to always have pickup before the dropoff for each passenger please?
I appreciate all your help in advance guys.
I have found a solution to my problem after 3 days of research. The solution is not through Google Map API and it's using a third party API called RouteXL. They are providing an API which does such this thing I am looking for. Here is the link to documentation although their documentation is not clearly documented but it has helped me to work it out.
https://www.routexl.nl/blog/api/?lang=en#post-tour
The function which I needed was the Tour Post and that does what I exactly needed.
If anyone needs any help on this I am happy to help.
I hope this helps everyone else.
Thank you all for the help.
The waypoint optimization feature in Google Maps is limited to basic travelling salesmen scenarios in which all the waypoints are re-ordered to find the optimal route. What you are looking to do falls under the category of Vehicle Routing problem, more precisely the Vehicle Routing Problem with pickup and delivery. Google doesn't provide a service for this. However, there are some open source algorithm available for this. Here are a few:
https://github.com/pgRouting/pgrouting/wiki/VRP%20Pickup%20Delivery%20Problem
https://github.com/graphhopper/jsprit
https://github.com/mck-/Open-VRP
Most of these use straight line distances to generate a distance matrix between your locations which are then used within the algorithm. For better accuracy you may want to use a distance matrix service that based on travel time. For even more accuracy you may want to take a look at the Bing Maps distance matrix service which also provides the option to generate a distance matrix over a period of time intervals for a day which would fluctuate based on predictive traffic conditions.