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.
Post Reply
User avatar
Max Beermann
Posts: 68
Joined: Tue Oct 30, 2018 7:36 am

Ferry-Costs

Post by Max Beermann »

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
Max Beermann
Development Manager
WHEELS Logistics
User avatar
Bernd Welter
Site Admin
Posts: 3100
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Ferry-Costs

Post by Bernd Welter »

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
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:
Image
User avatar
Max Beermann
Posts: 68
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Post by Max Beermann »

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
Max Beermann
Development Manager
WHEELS Logistics
User avatar
Bernd Welter
Site Admin
Posts: 3100
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Ferry-Costs

Post by Bernd Welter »

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
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:
Image
User avatar
Max Beermann
Posts: 68
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Post by Max Beermann »

Hello Bernd,

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

Re: Ferry-Costs

Post by Max Beermann »

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
Max Beermann
Development Manager
WHEELS Logistics
User avatar
Bernd Welter
Site Admin
Posts: 3100
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Ferry-Costs

Post by Bernd Welter »

Hello Max,

you can retrieve the time from the ferry segment:
List of segments. A ferry segment does not provide a segment length but period. This example is DOVER-&gt;CALAIS which is about 2 hours.
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
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:
Image
User avatar
Max Beermann
Posts: 68
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Post by Max Beermann »

Good morning Bernd,

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

Re: Ferry-Costs

Post by Max Beermann »

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
Max Beermann
Development Manager
WHEELS Logistics
User avatar
Bernd Welter
Site Admin
Posts: 3100
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Ferry-Costs

Post by Bernd Welter »

correct: it is derived by some other properties:

Code: Select all

if (SegmentIndex==0)
 segTime = segment[0].accTime;
else
 segTime = segment[segmentIndex].accTime - segment[segmentIndex-1].accTime;
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:
Image
User avatar
Max Beermann
Posts: 68
Joined: Tue Oct 30, 2018 7:36 am

Re: Ferry-Costs

Post by Max Beermann »

Hey Bernd,

thanks for your feedback!

Have a nice day
Max
Max Beermann
Development Manager
WHEELS Logistics
User avatar
Bernd Welter
Site Admin
Posts: 3100
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Ferry-Costs

Post by Bernd Welter »

Hello Max,

my colleages from the data department commented on the ferry tarifs:
We are in the middle of an update regarding the special charge. This will also have an impact on toll data.
There won't be updates for piggyback transport (trains). These piggyback relations aren't part of our toll data.
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:
Image
Post Reply