From 7310a500c61e13be12f05040ac5922014de6de7f Mon Sep 17 00:00:00 2001 From: Arndt Date: Fri, 3 Apr 2015 13:54:19 +0200 Subject: [PATCH] explicit initial classifier --- misc/profiles2/trekking.brf | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/misc/profiles2/trekking.brf b/misc/profiles2/trekking.brf index 02d9f56..e6c3dc0 100644 --- a/misc/profiles2/trekking.brf +++ b/misc/profiles2/trekking.brf @@ -24,6 +24,12 @@ assign downhillcutoff = 1.5 assign uphillcost = 0 assign uphillcutoff = 1.5 + +# classifier constants + +assign classifier_none = 1 +assign classifier_ferry = 2 + ---context:way # following code refers to way-tags # @@ -59,12 +65,22 @@ assign probablyGood = or ispaved and isbike not isunpaved # assign turncost = if is_ldcr then 0 else 90 + +# +# for any change in initialclassifier, initialcost is added once +# +assign initialclassifier = + if route=ferry then classifier_ferry + else classifier_none + # # calculate the initial cost # this is added to the total cost each time the costfactor # changed # -assign initialcost = if route=ferry then 10000 else 0 +assign initialcost = + if ( equal initialclassifier classifier_ferry ) then 10000 + else 0 # # implicit access here just from the motorroad tag