Map&Guide Internet road blocks in xServer1

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.
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hi Bernd,

Quick question about MGI & xServer1 comparsion.

One of our client is missing the possibilities in our solution for considering road blocks when routing.

In MGI there are 3 settings for this one, shown in the attached picture:
- Include all traffic disruptions
- Include all blocks
- Only include permanent roadblocks...

Could you describe the difference between these 3 settings, and also tell us which parameters have to be setted in the routing profile to get the same results as in MGI?
It must be somehow with the PTV_SpeedPatterns, and PTV_TrafficIncidents layers, but we're a bit confused, how to pair them with the MGI settings.

Thank you in advance!
Peter
Attachments
MGI.png
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Map&Guide Internet road blocks in xServer1

Post by Bernd Welter »

Hello Peter,

that's a huge challenge - and we need to talk about some very old xServer1 technology called traffic info loader / geodata source.
The following code is based on a so-called GEODATASOURCE LAYER (Routing Option) with a base value of "traffic.ptv-traffic.default".
This works OUTSIDE the snippets. YOu may also look for TRAFFIC INFO LOADER to get further details about this.

By applying this layer / routing option you tell the service to consider an alternative data source that contains the traffic incidents data. (This is NOT the same as FL PTV_TrafficIncidents !)

Each "traffic event" has properties such as
  • validity period
  • category (full blocking, lane reduction, ...)
  • coordinates from / to
Now the mechanism offers to reduce the 100% events by a SQL statement which is added to the selection. Based on the selected mode in MGI we manipulate the filter.

Below is the code that shows the manipulation.

Does this help?
But honestly I recommend to set up a session with me...

Bernd

Code: Select all

#region TrafficInformation
             options.ConsiderTrafficInformation = false;

             if (!vehicleData.SystemProfile)
            {
                options.TrafficInformationLayerName = TRAFFIC_INFO_LAYER_NAME + ";" + "c_category > 0";

                 //consider traffic information
                switch (sunriseRequest.ViRequest)
                {
                    case SRTrafficInfoRoutingRequest.NoConsideration:
                        options.ConsiderTrafficInformation = false;
                        break;
                    case SRTrafficInfoRoutingRequest.ConsiderAll:
                        options.ConsiderTrafficInformation = true;
                        break;
                    case SRTrafficInfoRoutingRequest.Blocks:
                        options.ConsiderTrafficInformation = true;
                        options.TrafficInformationLayerName += " AND c_category BETWEEN 50 AND 59";
                        break;
                    case SRTrafficInfoRoutingRequest.LongTimeRoadWorks:
                        options.ConsiderTrafficInformation = true;
                        options.TrafficInformationLayerName += " AND (c_category BETWEEN 50 AND 59 OR c_category BETWEEN 110 AND 119) AND computed_duration > 1";
                        break;
                }
                //Igrore Truck-Blockings (Category=53) for CARs and VANs
                if (vehicleData.TransportClass != TransportClassification.TRL && vehicleData.TransportClass != TransportClassification.TRU)
                {
                    options.TrafficInformationLayerName += " AND c_category <> 53";
                }
                //Not meaningful if most of the blockings are valid for less than 15mins
                //options.TrafficInformationLayerName += " AND " + GetTILValidityQuery(options.Time.AddMinutes(options.UTCOffset));
            }
            #endregion
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:
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Re: Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hi Bernd,

Sorry, I've missed this feedback.

As we plan to switch to Developer in the future: is it easier to implement this one in Developer?

Thank you,
Peter
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Map&Guide Internet road blocks in xServer1

Post by Bernd Welter »

Hello Peter.

About the comparison with PTV Developer:
I need to talk to DEV/PM first. I'll trigger them and ask for a statement...

Bernd

PS:
to avoid missing info you can subscribe to a topic (or a whole category).
subscribe.png
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:
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Re: Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hello Bernd,

I've discussed with our dealer partner, and this one is quite urgent.

Is there any other way to somehow include the permanent road block in xServer1 routing?

The PTV Developer answer is also important, as that could be a solution later this year.

Thank you,
Peter
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Re: Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hi Bernd,

I've came with an example. Maybe this could bring us closer to the solution.

DE 09 Chemnitz
->
DE 09569 Oederan.

1. Map&Guide Internet:
As you can see, there is an ongoing road work, between Flöha and Falkenau.
MGI knows this one, so it skips that segment and gives a longer, but possible route.
MGI.png
2. xServer1:
On the raffice map layer, we also visualize this roadblock, however in xServer1 this roadblock is bypassed.
xServer1.png
I also attached the xServer1 request.

Thank you,
Peter
Attachments
xserver1.log
(9.46 KiB) Downloaded 219 times
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Map&Guide Internet road blocks in xServer1

Post by Bernd Welter »

HI Peter,

here's some footage... processed through xroute-eu-h-test / Raw Request Runner:
screenshot that viusualizes all traffic data based on the GEODATA SOURCE LAYER &quot;traffic.ptv-traffic.default&quot; - so displays ALL categories
screenshot that viusualizes all traffic data based on the GEODATA SOURCE LAYER "traffic.ptv-traffic.default" - so displays ALL categories
Here's a routing request with the option set to consider that layer

Code: Select all

{
  "options": [
    {
      "parameter": "GEODATASOURCE_LAYER",
      "value": "traffic.ptv-traffic.default"
    }
  ],
  "waypoints": [
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 12.92087,
            "y": 50.8367
          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 13.16793,
            "y": 50.86223
          }
        }
      ]
    }
  ],
  "exceptionPaths": null,
  "details": {
    "manoeuvres": true,
    "polygon": true,
    "detailLevel": "STANDARD",
    "segments": true,
    "featureDescriptions": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "OG_GEODECIMAL"
      },
      {
        "key": "ResponseGeometry",
        "value": "WKB"
      },
      {
        "key": "Profile",
        "value": "carfast"
      }
    ]
  }
}
The routing request's result - including the detour
The routing request's result - including the detour
Is this what you've been looking for?

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:
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Re: Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hi Dear Bernd,

We've started testing the solution you've suggested, and it passed the first tests!

We've decided to integrate this feature, as disabled by default.

I don't want to take more of your precious time right now. If we experience some malfunctions in the live tests, I'll get back to you!

If you have any information on the Developer version, please post in the forum!

Thank you again for your help!

Peter
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Map&Guide Internet road blocks in xServer1

Post by Bernd Welter »

Hi Peter,
just some screenshots from DEVELOPER:
Developer ROuting.API<br />Northern route: REALISTIC - considers live traffic and historical infos<br />Southern route: AVERAGE - considers historical infos
Developer ROuting.API
Northern route: REALISTIC - considers live traffic and historical infos
Southern route: AVERAGE - considers historical infos
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:
innomedio
Posts: 24
Joined: Thu Sep 03, 2020 2:26 pm

Re: Map&Guide Internet road blocks in xServer1

Post by innomedio »

Hi Bernd,

That looks great! It's the same problem, and so it also work in Developer.
https://developer.myptv.com/en/document ... ulateRoute

As I can see, It's much easier in Developer then, only need to switch the trafficMode option to Realistic from Average.

Another plus point for switching to Developer.

Thank you,
Peter
Post Reply