Page 1 of 1

Routing options to use motorways and ferries

Posted: Wed Dec 08, 2021 1:35 pm
by Uwe Schuster
We are migrating from Mapserver to xServer 2 and routing with details like profiles, toll and emission does work. There are some remaining questions and one of them is regarding some routing profile options.
Our option (bool)Mapserver xServer 2
[x] Use motorway IRouteOptions2::put_RouteWithoutAutoroute(section, [true|false])

Mapserver SDK documentation:
"For the VARIANT_TRUE value the use of motorways is not permitted."
Use penaltiesByNetworkClass? NC0? Which penalty?
[x] Use residential roadsIDrivingOptions_5_4_0_0::put_ResidentsOnlyFactor(section, factor)

Mapserver SDK documentation:
"factor Modifier for streets that are restricted to residents"
"The values range from -99 (strong preference) to 0 (normal rating) to 2500 (strong avoidance). 2501 can be used to block streets that are restricted to residents completely. "


We do use the default value (0) when the option is checked and 2500 when the option is not checked.
Use penaltiesByNetworkClass? Which NC?
[x] Use ferriesIDrivingOptions_5_4_0_0::put_FerryFactor(section, factor)

Mapserver SDK documentation:
"Modifier for ferries."
"The values range from -99 (strong preference) to 0 (normal rating) to 2500 (strong avoidance). 2501 can be used to block ferries completely."


We do use 0 when the option is checked and 2500 when the option is not checked.
Use boatPenalty?
[x] Use motorway

Code: Select all

{
	"routingProfile": {
		"course": {
			"network": {
				"penaltiesByNetworkClass": {
					"penalties": [
						THIS_VALUE_HERE_QUESTIONMARK,
						10,
						15,
						35,
						40,
						90,
						100,
						100
					]
				}
			}
		}
	}
}
Is this correct to use routingProfile::course::network::penaltiesByNetworkClass::penalties?
"[x] Use motorway" = 0 for the first network class
"[ ] Use motorway" = 2500 for the first network class

[x] Use residential roads
Is this correct to use routingProfile::course::network::penaltiesByNetworkClass::penalties as well? What is the network class for this case?

[x] Use ferries

Code: Select all

{
	"routingProfile": {
		"course": {
			"combinedTransport": {
				"boatPenalty": "THIS_VALUE_HERE_QUESTIONMARK"
			}
		}
	}
}
Is this correct to use routingProfile::course::combinedTransport::boatPenalty?
"[x] Use ferries" = 0
"[ ] Use ferries" = 2500

Re: Routing options to use motorways and ferries

Posted: Wed Dec 08, 2021 3:08 pm
by Bernd Welter
Hi Mr Schuster,

afaik Avoid_Highways refers to NC0 AND NC1.
Residentials is NC5.

I'll cross check this with DEV!

But I think you are on a proper path,

Bernd

Re: Routing options to use motorways and ferries

Posted: Wed Dec 08, 2021 3:37 pm
by Joost
About "IDrivingOptions_5_4_0_0::put_ResidentsOnlyFactor"

That is found at:
Routing / Course / BasicDataRules / SpecialAreas / @residentialMalus (xServer 1 profile)
RequestBase.requestProfile.routingProfile.crourse.apecialAreas.residentsOnlyPenalty (xServer 2 request)

It is not connected to a specific road type (== network class) but to a segment attribute. The attributes indicates that access to the road is only allowed for people who are resident.

Re: Routing options to use motorways and ferries

Posted: Thu Dec 09, 2021 11:20 am
by Uwe Schuster
Thanks Bernd and Joost!

For me "course::specialAreas::residentsOnlyPenalty" sounds more reasonable as equivalent for "IDrivingOptions_5_4_0_0::put_ResidentsOnlyFactor". I will try that (as soon as I remember a test case for that).