xServer 2 - Swiss toll missing

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.
Andreas Schönebeck
Posts: 15
Joined: Fri Jul 09, 2021 3:11 pm

Re: xServer 2 - Swiss toll missing

Post by Andreas Schönebeck »

Here the exact request produced by our software:

With toll returned:

Code: Select all

{
  "$type":"RouteRequest",
  "waypoints":[
    {
      "$type":"OffRoadWaypoint",
      "location":{
        "$type":"OffRoadRouteLocation",
        "offRoadCoordinate":{
          "x":7.4404602694,
          "y":46.948429118
        }
      },
      "tourStopOptions":{
        "serviceTime":0.0
      },
      "name":"0"
    },
    {
      "$type":"OffRoadWaypoint",
      "location":{
        "$type":"OffRoadRouteLocation",
        "offRoadCoordinate":{
          "x":7.3207202102,
          "y":45.7375107
        }
      },
      "tourStopOptions":{
        "serviceTime":0.0
      },
      "name":"1"
    }
  ],
  "routeOptions":{
    "timeConsideration":{
      "$type":"ExactTimeConsiderationAtStart",
      "referenceTime":"2021-11-30T00:00:00+01:00"
    },
    "geographicRestrictions":{
      "allowedCountries":[
        
      ],
      "prohibitedCountries":[
        
      ]
    },
    "emissionOptions":{
      "valueScenarios":[
        {
          "$type":"EmissionValueScenario_HBEFA_3_2",
          "scenarios":[
            "CURRENT_ROUTE"
          ]
        }
      ]
    },
    "currency":"EUR"
  },
  "resultFields":{
    "waypoints":true,
    "legs":{
      "enabled":true
    },
    "segments":{
      "enabled":true,
      "descriptors":true,
      "roadAttributes":true,
      "id":true
    },
    "eventTypes":[
      "COUNTRY_EVENT",
      "TOLL_EVENT",
      "ROUTE_VIOLATION_EVENT"
    ],
    "polyline":true,
    "toll":{
      "enabled":true,
      "sections":true,
      "systems":true
    },
    "emissions":true,
    "encodedPath":true
  },
  "requestProfile":{
    "vehicleProfile":{
      "engine":{
        "cylinderCapacity":1500,
        "fuelType":"GASOLINE",
        "fuelConsumption":6.0,
        "particleFilterInstalled":false,
        "emissionStandardEU":"EURO_6",
        "lowEmissionZoneTypes":"DE_GREEN"
      },
      "weight":{
        "emptyWeight":1200.0,
        "loadWeight":200.0,
        "totalPermittedWeight":2000.0
      },
      "dimensions":{
        "height":160.0,
        "heightAboveFrontAxle":100.0,
        "length":425.0,
        "width":175.0
      },
      "axle":{
        "axleLoad":11500.0,
        "numberOfAxles":5
      },
      "legalCondition":{
        "isEmergency":false,
        "isDelivery":false
      },
      "load":{
        "loadType":"PASSENGER"
      },
      "speeds":{
        "speedRangesByNetworkClass":{
          "maximumSpeeds":[
            135.0,
            125.0,
            85.0,
            60.0,
            50.0,
            40.0,
            16.0,
            6.0
          ],
          "minimumSpeeds":[
            70.0,
            35.0,
            25.0,
            25.0,
            20.0,
            18.0,
            9.0,
            4.0
          ]
        },
        "maximumSpeed":150.0
      },
      "yearOfManufacture":2019,
      "numberOfPassengers":2,
      "numberOfTrailers":0
    },
    "featureLayerProfile":{
      "themes":[
        {
          "id":"PTV_TruckAttributes",
          "enabled":false
        },
        {
          "id":"PTV_TruckSpeedPatterns",
          "enabled":false
        },
        {
          "id":"PTV_TrafficIncidents",
          "enabled":false
        }
      ]
    },
    "routingProfile":{
      "linking":{
        "maximumDistanceToSegment":10000.0
      },
      "course":{
        "violations":{
          "enabled":true
        },
        "network":{
          
        },
        "toll":{
          
        },
        "specialAreas":{
          
        },
        "combinedTransport":{
          "boatPenalty":0,
          "railPenalty":0
        },
        "distanceTimeWeighting":90.0
      }
    }
  },
  "coordinateFormat":"EPSG:4326"
}
Without toll returned:

Code: Select all

{
  "$type":"RouteRequest",
  "waypoints":[
    {
      "$type":"OffRoadWaypoint",
      "location":{
        "$type":"OffRoadRouteLocation",
        "offRoadCoordinate":{
          "x":7.4404602694,
          "y":46.948429118
        }
      },
      "tourStopOptions":{
        "serviceTime":0.0
      },
      "name":"0"
    },
    {
      "$type":"OffRoadWaypoint",
      "location":{
        "$type":"OffRoadRouteLocation",
        "offRoadCoordinate":{
          "x":7.3207202102,
          "y":45.7375107
        }
      },
      "tourStopOptions":{
        "serviceTime":0.0
      },
      "name":"1"
    }
  ],
  "routeOptions":{
    "timeConsideration":{
      "$type":"ExactTimeConsiderationAtStart",
      "referenceTime":"2021-11-30T00:00:00+01:00"
    },
    "geographicRestrictions":{
      "allowedCountries":[
        
      ],
      "prohibitedCountries":[
        
      ]
    },
    "emissionOptions":{
      "valueScenarios":[
        {
          "$type":"EmissionValueScenario_HBEFA_3_2",
          "scenarios":[
            "CURRENT_ROUTE"
          ]
        }
      ]
    },
    "currency":"EUR"
  },
  "resultFields":{
    "waypoints":true,
    "legs":{
      "enabled":true
    },
    "segments":{
      "enabled":true,
      "descriptors":true,
      "roadAttributes":true,
      "id":true
    },
    "eventTypes":[
      "COUNTRY_EVENT",
      "TOLL_EVENT",
      "ROUTE_VIOLATION_EVENT"
    ],
    "polyline":true,
    "toll":{
      "enabled":true,
      "sections":true,
      "systems":true
    },
    "emissions":true,
    "encodedPath":true
  },
  "requestProfile":{
    "vehicleProfile":{
      "engine":{
        "cylinderCapacity":1500,
        "fuelType":"GASOLINE",
        "fuelConsumption":6.0,
        "particleFilterInstalled":false,
        "emissionStandardEU":"EURO_6",
        "lowEmissionZoneTypes":"DE_GREEN"
      },
      "weight":{
        "emptyWeight":1200.0,
        "loadWeight":200.0,
        "totalPermittedWeight":2000.0
      },
      "dimensions":{
        "height":160.0,
        "heightAboveFrontAxle":100.0,
        "length":425.0,
        "width":175.0
      },
      "axle":{
        "axleLoad":11500.0,
        "numberOfAxles":5
      },
      "legalCondition":{
        "isEmergency":false,
        "isDelivery":false
      },
      "load":{
        "loadType":"PASSENGER"
      },
      "speeds":{
        "speedRangesByNetworkClass":{
          "maximumSpeeds":[
            135.0,
            125.0,
            85.0,
            60.0,
            50.0,
            40.0,
            16.0,
            6.0
          ],
          "minimumSpeeds":[
            70.0,
            35.0,
            25.0,
            25.0,
            20.0,
            18.0,
            9.0,
            4.0
          ]
        },
        "maximumSpeed":150.0
      },
      "yearOfManufacture":2019,
      "numberOfPassengers":2,
      "numberOfTrailers":0
    },
    "featureLayerProfile":{
      "themes":[
        {
          "id":"PTV_TruckAttributes",
          "enabled":true
        },
        {
          "id":"PTV_TruckSpeedPatterns",
          "enabled":false
        },
        {
          "id":"PTV_TrafficIncidents",
          "enabled":false
        }
      ]
    },
    "routingProfile":{
      "linking":{
        "maximumDistanceToSegment":10000.0
      },
      "course":{
        "violations":{
          "enabled":true
        },
        "network":{
          
        },
        "toll":{
          
        },
        "specialAreas":{
          
        },
        "combinedTransport":{
          "boatPenalty":0,
          "railPenalty":0
        },
        "distanceTimeWeighting":90.0
      }
    }
  },
  "coordinateFormat":"EPSG:4326"
}
I checked with a diff tool, that only the one single line "enabled":false / "enabled":true is different between requests. I hope you can help us with this. And thank you very much indeed for your help so far.
Andreas Schönebeck
Posts: 15
Joined: Fri Jul 09, 2021 3:11 pm

Re: xServer 2 - Swiss toll missing

Post by Andreas Schönebeck »

Another remark. If truck attributes are enabled (second request in previous post), the route does not go through St Bernard Tunnel and therefore no toll is calculated:
2021-11-30_17-29-24.png
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: xServer 2 - Swiss toll missing

Post by Joost »

Your axle load is to high. it is set to 11500 and there is a 8000 axle load blocking on the route that goes through the tunnel. Note: although it does not influence this particular route you also have to many axles (5 atm). I would recommend not writing out the entire request profile and just set the storedProfile to "car" in this case.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Andreas Schönebeck
Posts: 15
Joined: Fri Jul 09, 2021 3:11 pm

Re: xServer 2 - Swiss toll missing

Post by Andreas Schönebeck »

Many, many thanks for the great help. The axle load was indeed the problem.
Post Reply