Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

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
igorb
Posts: 6
Joined: Thu Apr 13, 2023 7:17 pm

Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

Post by igorb »

I've encountered an issue when listing high performance routing networks with the returnOnlyMatchingNetworks option. It seems that it does not return the high performance routing network if SnapShotTimeConsideration is used.

Below are the request snippets I've used:

Create High Performance Routing Network with TimeSpanConsideration

Code: Select all

{
    "label": "t1",
    "scope": "samplerequest",
    "storedProfile": "trailertruck",
    "requestProfile": {
        "featureLayerProfile": {
            "themes": [
                {
                    "id": "PTV_TruckAttributes",
                    "enabled": true
                }
            ]
        },
        "vehicleProfile": {
            "dimensions": {
                "height": "500"
            }
        }
    },
    "highPerformanceRoutingNetworkOptions": {
        "timeConsideration": {
            "$type": "TimeSpanConsideration",
            "referenceTime": "2023-03-29T15:00:00.000Z",
            "timeSpan": 7200
        },
        "geographicRestrictions": {
            "searchSpaceBounds": {
                "restrictionMode": "CUSTOM",
                "customBounds": {
                    "minX": -3.95000004,
                    "maxX": -3.4499999651,
                    "minY": 40.229999991,
                    "maxY": 40.549999991
                }
            }
        }
    }
}
Create High Performance Routing Network with SnapShotTimeConsideration

Code: Select all

{
    "label": "t5",
    "scope": "ttttt",
    "storedProfile": "trailertruck",
    "requestProfile": {
        "featureLayerProfile": {
            "themes": [
                {
                    "id": "PTV_TruckAttributes",
                    "enabled": true
                }
            ]
        },
        "vehicleProfile": {
            "dimensions": {
                "height": "500"
            }
        }
    },
    "highPerformanceRoutingNetworkOptions": {
        "timeConsideration": {
            "$type": "SnapshotTimeConsideration",
            "referenceTime": "2023-03-29T15:00:00.000Z"
        },
        "geographicRestrictions": {
            "searchSpaceBounds": {
                "restrictionMode": "CUSTOM",
                "customBounds": {
                    "minX": -3.95000004,
                    "maxX": -3.4499999651,
                    "minY": 40.229999991,
                    "maxY": 40.549999991
                }
            }
        }
    }
}
When calling ListHighPerformanceNetworks with options for TimeSpanConsideration, the created High Performance Routing Network (HPRN) is returned:
Request

Code: Select all

{
  "scope": "allscopes",
  "resultFields": {
    "highPerformanceRoutingNetworkOptions": false,
    "profiles": false
  },
  "returnOnlyMatchingNetworks": true,
  "highPerformanceRoutingNetworkOptions": {
    "timeConsideration": {
              "$type": "TimeSpanConsideration",
              "referenceTime": "2023-03-29T15:00:00.000Z",
              "timeSpan": 7200
            },
    "geographicRestrictions": {
              "searchSpaceBounds": {
                "restrictionMode": "CUSTOM",
                "customBounds": {
                  "minX": -3.95000004,
                  "maxX": -3.4499999651,
                  "minY": 40.229999991,
                  "maxY": 40.549999991
                }
              }
            }
  }
}
Response

Code: Select all

{
  "$type": "HighPerformanceRoutingNetworksListResponse",
  "highPerformanceRoutingNetworkInformation": [
    {
      "highPerformanceRoutingNetworkDescription": {
        "id": "f31381ed-0f08-485c-80e2-d8bdf32120e9",
        "label": "car_2023-03-29T14:00:00+00:00",
        "tenant": "globaltenant",
        "scope": "globalscope",
        "lastUsedAt": "2023-03-29T06:01:08.000Z",
        "size": 20763201
      }
    }
  ]
}
But if we use hprn network options with SnapShotTimeConsideration, it does not return any HPRN.
Request

Code: Select all

{
  "scope": "allscopes",
  "resultFields": {
    "highPerformanceRoutingNetworkOptions": false,
    "profiles": false
  },
  "returnOnlyMatchingNetworks": true,
  "highPerformanceRoutingNetworkOptions": {
    "timeConsideration": {
              "$type": "SnapshotTimeConsideration",
              "referenceTime": "2023-03-29T15:00:00.000Z"
            },
    "geographicRestrictions": {
              "searchSpaceBounds": {
                "restrictionMode": "CUSTOM",
                "customBounds": {
                  "minX": -3.95000004,
                  "maxX": -3.4499999651,
                  "minY": 40.229999991,
                  "maxY": 40.549999991
                }
              }
            }
  }
}
Response

Code: Select all

{
  "$type": "HighPerformanceRoutingNetworksListResponse"
}
Maximilian Vogel
Posts: 20
Joined: Fri Dec 29, 2017 9:00 am

Re: Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

Post by Maximilian Vogel »

I was not able to reproduce your issues, but I also noticed some inconsistencies in your requests and responses.

The first create request uses as label "t1" and as scope "samplerequest". But the returned network in the supposedly successful response has a completely different label and a different scope with globalscope. So that doesn't really match.

And there is more: When you use the option "returnOnlyMatchingNetworks" also the profile has to match with regards to the parameters tagged relevant for high performance routing. So you would have to specify the stored profile "trailertruck" and your request profile where you have specified feature layers and vehicle properties. Then it should work - at least it does for me.

Best regards,
Max
Maximilian Vogel
Developer
PTV Logistics
igorb
Posts: 6
Joined: Thu Apr 13, 2023 7:17 pm

Re: Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

Post by igorb »

Thank you for your prompt response :)
It turns out we didn't supply the request profile earlier. I appreciate your help.

Best regards,
User avatar
Bernd Welter
Site Admin
Posts: 2860
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

Post by Bernd Welter »

As I have been asked by some other party about the "more or less same issue" let me try to sum up the background:

If you want to list a unique search graph with ListHighPerformanceRoutingNetworksRequest having returnOnlyMatchingNetworks set to true you need to ensure that the following criteria in your request match the wanted graphs properties:
  • scope
  • HighPerformanceRoutingNetworkOptions (including TimeConsideration, GeographicRestrictions, ContentSnapshotID)
  • The routing relevant properties from the assembled "effective profile".
As we compare ALL these properties for the search it is sufficient to miss a single property to no longer find the required graph.
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