Impact of RoutingOptions / RequestProfile to HPR calculation

Data which is used in a more general manner can be requested by xData service. Therefore this data is not provided by one of the other functional services, but concentrated in an own independent service.
Attention: this is not the platform for the data itself. If you have questions about missing data or the handling of binary maps please look at Data and Content.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2860
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Impact of RoutingOptions / RequestProfile to HPR calculation

Post by Bernd Welter »

Hi there,

you never stop learning. And yesterday I learned about the impact of some parameters on the calculation of HighPermformanceRoutingNetworks in terms of
  • Memory consumption during the creation and application of an HPR
  • Filesizes
  • Performance (calculation time of creation method)
Though I basically knew that com.ptvgroup.xserver.routing.GeographicRestrictions reduce the efforts one has to spend on these three factors I also had to understand, that some non-standard settings come along with very demanding consequences. This specific case triggered me to write a short article - hopefully you can benefit from it:
  • What happened so far: player started a HPR creation and faced an error after 45% - result was

    Code: Select all

    {
      "id": "b727a49a-bfc8-4eeb-aff3-165d7564119a",
      "status": "FAILED",
      "progress": {
        "$type": "HighPerformanceRoutingNetworkProgress",
        "status": "GENERATING_NETWORK",
        "progress": 45
      },
      "elapsedTime": 3734774
    }
    

    Code: Select all

    fetchHighPerformanceRoutingNetworkResponse liefert:
    {
      "faultInfo": {
        "$type": "InternalErrorFault"
      },
      "message": "Error communicating with backend module m0001."
    }
    
  • After analysis : create request treid to apply special com.ptvgroup.xserver.routingprofile.TurnStrategy which was commented by Development:
    using the turn strategy leads to bigger HPR networks as can be seen in the following screenshot for Luxembourg:
    hpr lux.png
    The increase is by a factor of about 3.3. Why is this the case?
    In the routing without a custom turn strategy turns at intersection are not treated at all. Of course, banned turns are treated correctly, but besides that it doesn’t matter for the route calculation if it’s a left turn, a right turn or just straight ahead. That changes as soon as a custom turn strategy is used. To prefer passenger side turns, it is now important for the route calculation to distinguish between a left turn and a right turn.
    Hence, the underlying data structures become bigger. Not only does the final HPR network become bigger, but also the required hardware resources to generate the HPR network increases. It takes longer to generate, and I observed that the memory consumption for the module that runs the requests went up to as much as 112 GB and took more than 3 hours to complete for the request. The resulting network has a size of about 18 GB, which is somewhat expected as HPR networks for Europe usually have about 5 GB of size.
So in this case I recommend to look into some strategies based on "counter parameters which do have a positive impact on the "consqeuences" and at the same time do not destroy the meaningfulness of the output:
ParameterConsequence
com.ptvgroup.xserver.routingprofile.TurnStrategy.PREFER_PASSENGER_SIDE_TURNSrequires more hardware (both memory and filespace), slows down calculation time
com.ptvgroup.xserver.routing.GeographicRestrictionsUsed to reduce the total volume of relevant segments on a sigificant level, e.g. from "wholw rorld map to Europe" or "from Whole world map to ["DE","CH","AT"]. Very positive impact on performance and memory consumption. Only meaningful if business allows the functional apect (routes are never leaving the described area) match.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply