Page 1 of 1

Issue with Listing High Performance Routing Networks using returnOnlyMatchingNetworks and SnapShotTimeConsideration

Posted: Tue Apr 25, 2023 12:57 pm
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"
}

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

Posted: Tue Apr 25, 2023 4:37 pm
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

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

Posted: Tue Apr 25, 2023 9:18 pm
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,

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

Posted: Mon May 22, 2023 8:18 am
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.