FeatureLayer - Blocked Road logic

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
epsilon
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

FeatureLayer - Blocked Road logic

Post by epsilon »

Hello,

I am using the xRoute Feature Layer with traffic incidents and historical speed patterns to compute the time loss on a static route due to traffic. What happens is the following: Although I get a blocked road in the response - featureDescriptions: category=51 - I got a timeloss2 of approximately 21 days. In this case I expected a -1 in the timeloss2 attribute. If I change the starting time to 20181120 then a -1 is returned whereas when the starting time is 20181130 not.

My question: In which cases a -1 is returned and in which cases not? Do I have to check the featureDescription in order to filter out the blocked roads (filter when error class is in 50, 51, 52, 53) or is there a parameter that can be set so that do not have to look over the featureDescription.

Here is one particular example for the above case:

Code: Select all

{
  "waypoints": [
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 9.7223319227,
            "y": 52.446805259
          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 10.273248687,
            "y": 52.313392707
          }
        }
      ]
    }
  ],
  "options": [
    {
      "parameter": "START_TIME",
      "value": "2018-11-30T13:05:28+01:00"
    },
    {
      "parameter": "SPEED_INFOS",
      "value": true
    }
  ],
  "exceptionPaths": null,
  "details": {
  	"binaryPathDesc": false,
    "manoeuvres": false,
    "polygon": true,
    "detailLevel": "STANDARD",
    "dynamicInfo": true,
    "segments": true,
    "speedLimits": true,
    "featureDescriptions": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "OG_GEODECIMAL"
      },
      {
        "key": "ResponseGeometry",
        "value": "WKB"
      },
      {
        "key": "Profile",
        "value": "carfast"
      },
      {
        "key": "ProfileXMLSnippet",
        "value": "<Profile xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation=\"http:///xroute/schema/XRouteProfile.xsd\"><FeatureLayer majorVersion='1' minorVersion='0'><GlobalSettings enableTimeDependency='true' enableVehicleDependency='true'/><Themes><Theme id='PTV_TrafficIncidents' priorityLevel='101' enabled='true'/><Theme id='PTV_SpeedPatterns' priorityLevel='100' enabled='true'/></Themes></FeatureLayer><Routing majorVersion='2' minorVersion='0'><Course><AdditionalDataRules enabled='true'/><DynamicRouting dynamicTimeOnStaticRoute='true' limitDynamicSpeedToStaticSpeed='true'/></Course></Routing></Profile>"
      }
    ]
  }
}
I hope you can help me.

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

Re: FeatureLayer - Blocked Road logic

Post by Bernd Welter »

Hello Martina,

that's indeed weird. Your track is shown as a 22 days trip for about 45 km.
The cause for the behaviour appears at the beginning of your trip.
The third segment in the list is a long term construction I think.
right: static track. Enforced by &quot;dynamicTimeOnStaticRoute&quot;. Running straight into the full block caused by some construction.<br />Left: proper detour ;-)
right: static track. Enforced by "dynamicTimeOnStaticRoute". Running straight into the full block caused by some construction.
Left: proper detour ;-)
About the handling of the codes: I'll forward this to DEV if needed. But is the sample really valid? Or is this pure academic stuff?

Best regards,
Bernd

Code: Select all

"segments": [
      {
        "firstPolyIdx": 0,
        "polyC": 2,
        "firstNodeIdx": 0,
        "nodeC": 2,
        "streetNoIdx": -1,
        "streetNameIdx": 0,
        "dirInfoIdx": -1,
        "accTime": 9,
        "accDist": 83,
        "normSpeed": {
          "normSpeed": 68,
          "normSpeedType": "FREE_FLOW"
        },
        "iuCode": 49,
        "countryCode": "",
        "speedLimits": {
          "speedLimit": [
            {
              "limitVelocity": 50,
              "condition": "50|no weather condition|no driver condition"
            }
          ]
        },
        "featureDescriptions": [
          {
            "themeId": "PTV_SpeedPatterns",
            "description": "freeFlowSpeed=68|driveType=0"
          }
        ],
        "vNorm": 0,
        "nC": "COUNTRY_ROAD",
        "vCalc": 35
      },
      {
        "firstPolyIdx": 1,
        "polyC": 2,
        "firstNodeIdx": 1,
        "nodeC": 2,
        "streetNoIdx": -1,
        "streetNameIdx": 0,
        "dirInfoIdx": -1,
        "accTime": 25,
        "accDist": 234,
        "normSpeed": {
          "normSpeed": 63,
          "normSpeedType": "FREE_FLOW"
        },
        "iuCode": 49,
        "countryCode": "",
        "speedLimits": {
          "speedLimit": [
            {
              "limitVelocity": 50,
              "condition": "50|no weather condition|no driver condition"
            }
          ]
        },
        "featureDescriptions": [
          {
            "themeId": "PTV_SpeedPatterns",
            "description": "freeFlowSpeed=63|driveType=0"
          }
        ],
        "vNorm": 0,
        "nC": "COUNTRY_ROAD",
        "vCalc": 35
      },
      {
        "firstPolyIdx": 2,
        "polyC": 2,
        "firstNodeIdx": 2,
        "nodeC": 2,
        "streetNoIdx": -1,
        "streetNameIdx": 0,
        "dirInfoIdx": -1,
        "accTime": 1850029,
        "accDist": 393,
        "normSpeed": {
          "normSpeed": 59,
          "normSpeedType": "FREE_FLOW"
        },
        "iuCode": 49,
        "countryCode": "",
        "speedLimits": {
          "speedLimit": [
            {
              "limitVelocity": 50,
              "condition": "50|no weather condition|no driver condition"
            }
          ]
        },
        "featureDescriptions": [
          {
            "themeId": "PTV_TrafficIncidents",
            "timeDomain": "[(y2018M10d14h22m0s0){M2d6h23m59}]",
            "description": "absoluteSpeed=0|category=51|language=de|message=K324 Westfalenstraße bei Langenhagen gesperrt|length=280|startX=4386321|startY=5590619|language=|incidentId=TTI-1418b7e3-e1ad-4bbe-a9e1-2fad6b9b5948-TTR118870286502576-1_1"
          },
          {
            "themeId": "PTV_TrafficIncidents",
            "timeDomain": "[(y2018M10d14h22m0s0){M2d6h23m59}]",
            "description": "absoluteSpeed=40|category=110|language=de|message=Westfalenstraße bei Langenhagen Baustelle|length=280|startX=4386321|startY=5590619|language=|incidentId=TTI-1418b7e3-e1ad-4bbe-a9e1-2fad6b9b5948-TTR118870286502576-2_1"
          },
          {
            "themeId": "PTV_SpeedPatterns",
            "description": "freeFlowSpeed=59|driveType=0"
          }
        ],
        "vNorm": 0,
        "nC": "COUNTRY_ROAD",
        "vCalc": 0
      },
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:
epsilon
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

Re: FeatureLayer - Blocked Road logic

Post by epsilon »

Dear Bernd,

thank you for your quick answer! I am sorry but this is not only of academic interest. I would appreciate a timeloss2=-1 because of the category=51 in the featureDescription or do I misunderstand here something? I understand that the static route is passable in reasonable time whereas the dynamic speed can result in a blocked street event and disturbs the driving time extremely. The problem is that I want to keep the feature dynamic speed on static route due to (current) modeling issues.

So, to overcome my problem the only short-term solution is to check the categories in the featureDescription and check if there is a blocked segment?

Kind regards
Martina
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: FeatureLayer - Blocked Road logic (XSERS-1233)

Post by Bernd Welter »

Hello Martina,
I asked DEV to handle this post cause I don't know the proper answer. One first comment of a colleague was this:
There was a threshold value in the feature layer: if the value is exceeded a time dependent blocking is no longer treated as "waiting" but as a "blocking". Is this the case here?
Let's wait for DEV to enlighten us!
Best regards,
Bernd
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