Ferry-Costs

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.

Ferry-Costs

Postby Max Beermann » Fri Jan 04, 2019 1:23 pm

Hello and happy new year,

maybe you can help me:

I have a routing with the use of a ferry - but I do not receive the costs for that ferry.
Where is my mistake (xroute / calculateAdvancedTour)?


Code: Select all
{
  "waypoints": [
    {
      "$type": "TourPointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "servicePeriod": 100,
      "useServicePeriodForRecreation": false,
      "completeServiceInIntervals": true,
      "openingIntervals": [],
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 788716.73418,
            "y": 6704772.0515
          }
        }
      ]
    },
    {
      "$type": "TourPointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "servicePeriod": 300,
      "useServicePeriodForRecreation": false,
      "completeServiceInIntervals": true,
      "openingIntervals": [],
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": -83922.146986,
            "y": 6800409.1771
          }
        }
      ]
    }
  ],
  "tourOptions": {
    "restrictToSingleOperatingInterval": false
  },
  "routingOptions": [
    {
      "parameter": "EXCLUDE_COUNTRIES",
      "value": "41"
    },
    {
      "parameter": "OPTIMIZATION",
      "value": "80"
    },
    {
      "parameter": "AVOID_FERRIES",
      "value": "-66"
    },
    {
      "parameter": "SPEED_PROFILE",
      "value": "90,50,70,40,60,40,40,20,30,10,20,5,6,6,1,1"
    }
  ],
  "exceptionPaths": [
    {
      "extSegments": "",
      "street": "[Mülheimer Brücke]/[Leverkusener Brücke]/[Zoobrücke]/[Deutzer Brücke]",
      "binaryPathDesc": "",
      "relMalus": 2501,
      "absTimeMalus": 0
    }
  ],
  "details": {
    "manoeuvres": false,
    "texts": false,
    "nodes": false,
    "binaryPathDesc": false,
    "polygon": true,
    "detailLevel": "STANDARD",
    "dynamicInfo": false,
    "segments": false,
    "segmentAttributes": false,
    "manoeuvreAttributes": false,
    "brunnelManoeuvres": false,
    "urbanManoeuvres": false,
    "manoeuvreGroups": false,
    "manoeuvreGroupRatio": 1,
    "tollManoeuvres": false,
    "boundingRectanglesC": 5,
    "boundingRectanglesOffset": 300,
    "totalRectangle": false
  },
  "countryInfoOptions": {
    "$type": "CountryInfoVehicleOptions",
    "detailedTollCosts": false,
    "allEuro": true,
    "tollDate": "2019-01-11T16:00:00+02:00",
    "calculatePartTollCosts": false,
    "options": [
      {
        "parameter": "TYPE",
        "value": "TRL"
      },
      {
        "parameter": "TOTAL_WEIGHT",
        "value": "35000"
      },
      {
        "parameter": "NUMBER_OF_AXLES",
        "value": "5"
      },
      {
        "parameter": "EMISSION_CLASS",
        "value": "EURO_6"
      }
    ]
  },
  "callerContext": {
    "properties": [
      {
        "key": "ResponseGeometry",
        "value": "PLAIN"
      },
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      },
      {
        "key": "Profile",
        "value": "truckfast"
      }
    ]
  }
}


Thanks in advance!
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Bernd Welter » Fri Jan 04, 2019 1:55 pm

Hello Max,

that's right: we do not return a fiscal value for the ferry. We also do not maintain timetables.
In the standard routing engine the ferry is just some kind of a teleporting segment that links two regions.

If you are interested in an engine that might open this portal you could have a look at xIntermodal.

Best regards,
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1275
Joined: Mon Apr 14, 2014 10:28 am

Re: Ferry-Costs

Postby Max Beermann » Fri Jan 04, 2019 2:50 pm

Hello Bernd,

thanks for your fast reply.

Ah > good to know!:)

_ _ _ _ _ _ _ _ _

Now I am a little bit confused.
This routing has a ferry-price (SPECIALCHARGEFERRY) .
So do you know why there is a ferry price?

Code: Select all
{
  "waypoints": [
    {
      "$type": "TourPointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "servicePeriod": 100,
      "useServicePeriodForRecreation": false,
      "completeServiceInIntervals": true,
      "openingIntervals": [],
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 497984.25508,
            "y": 6778588.7387
          }
        }
      ]
    },
    {
      "$type": "TourPointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "servicePeriod": 300,
      "useServicePeriodForRecreation": false,
      "completeServiceInIntervals": true,
      "openingIntervals": [],
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": -38457.877329,
            "y": 7113703.567
          }
        }
      ]
    }
  ],
  "tourOptions": {
    "restrictToSingleOperatingInterval": false
  },
  "routingOptions": [
    {
      "parameter": "EXCLUDE_COUNTRIES",
      "value": "41"
    },
    {
      "parameter": "OPTIMIZATION",
      "value": "80"
    },
    {
      "parameter": "AVOID_FERRIES",
      "value": "2500"
    },
    {
      "parameter": "SPEED_PROFILE",
      "value": "90,50,70,40,60,40,40,20,30,10,20,5,6,6,1,1"
    }
  ],
  "exceptionPaths": [
    {
      "extSegments": "",
      "street": "[Mülheimer Brücke]/[Leverkusener Brücke]/[Zoobrücke]/[Deutzer Brücke]",
      "binaryPathDesc": "",
      "relMalus": 2501,
      "absTimeMalus": 0
    }
  ],
  "details": {
    "manoeuvres": true,
    "texts": true,
    "nodes": true,
    "binaryPathDesc": false,
    "polygon": true,
    "detailLevel": "STANDARD",
    "dynamicInfo": false,
    "segments": true,
    "segmentAttributes": true,
    "manoeuvreAttributes": true,
    "brunnelManoeuvres": true,
    "urbanManoeuvres": true,
    "manoeuvreGroups": true,
    "manoeuvreGroupRatio": 1,
    "tollManoeuvres": false,
    "boundingRectanglesC": 5,
    "boundingRectanglesOffset": 300,
    "totalRectangle": false
  },
  "countryInfoOptions": {
    "$type": "CountryInfoVehicleOptions",
    "detailedTollCosts": true,
    "allEuro": true,
    "tollDate": "2019-01-11T16:00:00+02:00",
    "calculatePartTollCosts": true,
    "options": [
      {
        "parameter": "TYPE",
        "value": "TRL"
      },
      {
        "parameter": "TOTAL_WEIGHT",
        "value": "35000"
      },
      {
        "parameter": "NUMBER_OF_AXLES",
        "value": "5"
      },
      {
        "parameter": "EMISSION_CLASS",
        "value": "EURO_6"
      }
    ]
  },
  "callerContext": {
    "properties": [
      {
        "key": "ResponseGeometry",
        "value": "PLAIN"
      },
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      },
      {
        "key": "Profile",
        "value": "truckfast"
      }
    ]
  }
}


PS: Are there more categories, that should not be considered for price-calculations (Vignette, Intferry, etc.)?

Best regards and thanks in advance
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Bernd Welter » Fri Jan 04, 2019 3:29 pm

Of course you are right, I've overseen that - it is part of the toll output.

Honestly spoken I don't know how we determine the price and therefore I'll forward the topic to some data junkies inside PTV to get a proper description.

Best regards,
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1275
Joined: Mon Apr 14, 2014 10:28 am

Re: Ferry-Costs

Postby Max Beermann » Fri Jan 04, 2019 3:56 pm

Hello Bernd,

thanks for your kind help!
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Max Beermann » Wed Jan 09, 2019 7:24 am

Goord morning Bernd,

one more question concerning the ferries:

Example: F-Calais > GB-Dover.
RoutingOption / parameter="AVOID_FERRIES" / value="-99"

Is it possible to seperate the ferry-time from the road-time?

Code: Select all
  <ns3:CountryInfo iuCode="33" currency="EUR" countryCode="" additionalInfo="" scenarioId="3">
            <ns3:partRouteInfo distance="5733" time="937" cost="0" />
            <ns3:wrappedPerNCRouteInfo>
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="2223" time="160" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="1990" time="290" cost="0" />
              <ns3:RouteInfo distance="1364" time="407" cost="0" />
              <ns3:RouteInfo distance="156" time="80" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />

          <ns3:CountryInfo iuCode="44" currency="EUR" countryCode="" additionalInfo="" scenarioId="2">
            <ns3:partRouteInfo distance="2352" time="7229" cost="0" />
            <ns3:wrappedPerNCRouteInfo>
              <ns3:RouteInfo distance="0" time="7020" cost="0" />
              <ns3:RouteInfo distance="2263" time="196" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="89" time="13" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />
              <ns3:RouteInfo distance="0" time="0" cost="0" />


Thanks again in advance!

Best regards
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Bernd Welter » Wed Jan 09, 2019 7:47 am

Hello Max,

you can retrieve the time from the ferry segment:
ferry-segments.PNG
List of segments. A ferry segment does not provide a segment length but period. This example is DOVER->CALAIS which is about 2 hours.


Best regards,
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1275
Joined: Mon Apr 14, 2014 10:28 am

Re: Ferry-Costs

Postby Max Beermann » Wed Jan 09, 2019 8:41 am

Good morning Bernd,

that was really quick > THANKS!
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Max Beermann » Wed Jan 09, 2019 1:38 pm

Hi Bernd,

(maybe) one (little) thing:

Where can I get segTime?
- Currently I only get accTime.


Or is "your" segTime = accTime (y) - acctime (x)?

Thanks in advance
Max
User avatar
Max Beermann
 
Posts: 36
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Postby Bernd Welter » Wed Jan 09, 2019 1:49 pm

correct: it is derived by some other properties:

csharp code
if (SegmentIndex==0)
segTime = segment[0].accTime;
else
segTime = segment[segmentIndex].accTime - segment[segmentIndex-1].accTime;
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1275
Joined: Mon Apr 14, 2014 10:28 am

Next

Return to PTV xRouteServer

cron