// skBicycleParamsQuiet25.txt

/*
Configuration file for the parameters of a routing profile.

Comments start with “/*” and end on a line containing "* /" (with no space between ‘*’ and ‘/‘)
One line comments start with “//“
Any other line, which can not be parsed, will be ignored or trigger an error, depending on implementation.

Contents:
 - barrier penalty time - bike routing
 - surface penalty - bike routing
 - width penalty - bike routing
 - slopes - used in all profiles when slope-routing is on
 - general constants: used in virtually every routing profile. Be careful when modifying something. The implementation is very sensitive to some of the parameters.

Any input that appear here and is not use by the current profile, does not hurt.
I.e.: the bike parameters can have values in the car-fast profile, for example: no problem.

Each set of parameters is in CSV format, with a different number of columns and a different column separator. Historical reasons.
Details before each category.
A category is identified by the first character in a line. Details below.
The order of the lines/parameters is irrelevant and their order could be changed, even among categories.
*/

/*BARRIERS:
  - lines must start with “B:”
  - column separator is ‘,’
  - 5 columns: barrier-type id, barrier-name, barrier-mode, barrier-default penalty, barrier penalty when the mode is to be avoided
*/
B:1,lift_gate,ride,0,300
B:2,stile,carry,0,600
B:3,cycle_barrier,walk,0,200
B:4,toll_booth,ride,0,200
B:5,kissing_gate,walk,0,600
B:6,cattle_grid,ride,0,100
B:7,turnstile,carry,0,600
B:8,chain,carry,0,200
B:9,bollard,ride,0,200
B:10,block,carry,0,600
B:11,gate,walk,0,400

/*SURFACE TYPE: penalization factors used in routing depending on the surface type.
  - lines must start with “F:”
  - column separator is ‘,’
  - columns:
    1.The surface type index. Must start from 0. DO NOT CHANGE VALUES HERE!
    2.The name of the surface-type. Can be changed, but should not contain the separator
       Values:
        - no info available;
        - paved:
        - cobbles:
        - unpaved:
        - slow:
    3.The routing penalization factor 
    4.The ETA penalization factor
        - They must be positive and normally equal or greater than 1.
        - A value of 1 means no penalization
        - If below equal or below zero —> error
*/
F:0,no info available,1.0,1.0
F:1,paved,1.0,1.0
F:2,cobbles,1.2,1.2
F:3,unpaved,1.4,1.4
F:4,slow,1.6,3.0

/*ROAD WIDTH: defines penalization factors depending on road width. Used in bicycle routing.
  - lines must start with “W:”
  - column separator is ‘,’
  - 3 columns:
   	1. the surface type index. Must start from 0. DO NOT CHANGE VALUES HERE!
   	2. the name of the surface-type. 
	Values:
	   - no info available
	   - narrow: <= 1.0 meters
	   - normal: 1.0 meters < width <= 2.5 meters
	   - wide:   >2.5 meters
	3.The penalization factor:
	   - Must be positive and normally equal or greater than 1.
	   - A value of 1 means no penalization
	   - If equal or below zero —> error
*/
W:0,no info available,1.0
W:1,narrow,1.0
W:2,normal,1.0
W:3,wide,1.0

/*BICYCLE LANE: defines penalization factors depending on lane type. Used in bicycle routing.
  - lines must start with “L:”
  - column separator is ‘,’
  - 3 columns:
   	1.The lane type index. Must start from 0. DO NOT CHANGE VALUES HERE!
   	2.The type of the bike lane: no info, shared, lane, bus-lane, track
	3.The penalization factor:
	   - Must be positive and normally equal or greater than 1.
	   - A value of 1 means no penalization
	   - If equal or below zero —> error
*/
L:0,no info available,1.0
L:1,shared,1.0
L:2,lane,1.0
L:3,bus lane,1.0
L:4,track,1.0

/* ROAD SLOPES: penalization factors depending on road slope.
  - lines must start with “S:”
  - column separator is ‘,’
  - 2 columns:
	First column:
	   - represents the slope in % : the height difference divided by the distance travelled
	   - all values below -15 are considered as -15
	   - all values above  15 are considered as  15
	Second column: it can have more meanings, depending on the used algorithm:
Suppose the following entry:
     S, X
Read and use algorithms: indicated by a line starting with “SA:”
1. Raw factor:
   - a segment that have slope S, will have its cost multiplied with: X
   - so the new cost is: newCost = oldCost * X
   - X must be equal or greater than 1, where 1 means no penalization
Use: SA:raw-factor

2. Percentage: this is the DEFAULT
   - X is the penalization factor in %
   - a segment that have slope S, will have its cost multiplied with: 1 + (X/100)
   - so the new cost is: newCost = oldCost * (1 + X/100)
   - X must be equal or greater than , where 0 means no penalization 
Use: SA:percentage

3. Cost per length-unit (e.g. energy):
   - X is a cost per length-unit
   - a segment that have slope S, will have its cost added with the resulting cost.
This is eventually a multiplication, not an addition. Those factors will be scaled after reading… Details will be put later here.
   - X must be equal or greater than 0

Use: SA:cost-per-unit
or   SA:energy

Remark:
Other remarks:
   - slopes smaller / greater that -15 / 15 are ignored
   - slopes in between -15 … 15 that are missing (or commented) are considered to have no penalization
   - penalizations have to have valid values, as indicated in each situation -> ERROR otherwise

For Eco: mWh/horizontal meter
energyConsumption[31]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.7395504,4.4476889,5.4306439,6.722719,8.2830299,10.0275093,11.8820908,13.799201,15.751434,17.7231534,19.7051378,21.6916725,23.679014,25.6645696,27.6464437,29.6231796,31.5936073};//

*/
//Impose the use of slope routing, i.e. overwrittes the correponding entry from the routing input
kImposeTheUseOfSlopeRouting,1
SA:energy
S:-15,0
S:-14,0
S:-13,0
S:-12,0
S:-11,0
S:-10,0
S:-9,0
S:-8,0
S:-7,0
S:-6,0
S:-5,0
S:-4,0
S:-3,0
S:-2,0
S:-1,3.7395504
S:0,4.4476889
S:1,5.4306439
S:2,6.722719
S:3,8.2830299
S:4,10.0275093
S:5,11.8820908
S:6,13.799201
S:7,15.751434
S:8,17.7231534
S:9,19.7051378
S:10,21.6916725
S:11,23.679014
S:12,25.6645696
S:13,27.6464437
S:14,29.6231796
S:15,31.5936073


/* The speed profile: those speeds are used for two purposes:
1. Define the preference to route over some segment-types (high speed in table), rather than of other segment-types (low speed in table).
For example, when the bicycles are specifically allowed, we use greater speeds.

2. Estimate the ETA. For this in fact another table, in a separate time-configuration-file, would be needed,
 in order to be able to play more freely with the speeds as in point 1 in this table, without breaking ETA.
That time-configuration-file should be common for more profiles (i.e. same route, same ETA, no matter of the profile).

Legend:
ro - means Read Only : do not modify, must be teh same in all the route-profile files

type-name       - the type name: read only
type-number     - the type associated index:read only
bns             - Bicycle speed on segments with Nothing Specified in map about bicycle access - used in route calculation
bsa             - Bicycle speed on segments on which bicycle routing is Specifically Allowed - used in route calculation
eta             - Speed used for ETA calculation
The route calculation speeds can be used to favor, or penalize, certain segment types.
-----------------------------------------
*/
//type-name (ro)	     type number(ro)    bns     bsa     eta
H:bridleway                   		1	20	20	20
H:construction                		2	20	20	20
H:crossing                    		3	20	20	20
H:cycleway                    		4	20	20	20
H:ferry                       		5	20	20	20
H:footway                     		6	20	20	20
H:ford                        		7	20	20	20
H:living_street               		8	20	20	20
H:motorway                    		9	20	20	20
H:motorway_link               		10	20	20	20
H:path                        		11	20	20	20
H:pedestrian                  		12	20	20	20
H:primary                     		13	20	20	20
H:primary_link                		14	20	20	20
H:residential                 		15	20	20	20
H:road                        		16	20	20	20
H:secondary                   		17	20	20	20
H:secondary_link              		18	20	20	20
H:service                     		19	20	20	20
H:steps                       		20	0.4	0.4	0.4
H:tertiary                    		21	20	20	20
H:tertiary_link               		22	20	20	20
H:track                       		23	20	20	20
H:trunk                       		24	20	20	20
H:trunk_link                  		25	20	20	20
H:unclassified                		26	20	20	20
H:ferryPed                    		310	20	20	20
H:residential_limited         		311	20	20	20
H:unpavedTrack                		377	20	20	20
H:permissive                		378	20	20	20
H:destination                		379	20	20	20
H:pier                        		380	20	20	10
H:train_ferry               		391	20	20	100

//The bicicyle reference speed in Km/h. It should be the maximum of the speeds above.
//It is a "balancing" parameter used to convert the above speeds in penalization factors.
//So it does not influence directly ETA, or any route output parameter.
//Changing it affects the way the algorithm runs in terms of explored segments, how many and in what way. So indirectly it influences running time, memory consumption, route quality.
//Again: best value: the maximum speed above.
kBICYCLE_SCALING_SPEED,20.0

/*GENERAL CONSTANTS: these are used to configure the routing algorithm
  - some of them are above this line
  - lines must start with “k”. That k is part of the constant name, i.e. part of the first column
  - column separator: two tabs between the constant name and the value
  - 2 columns: 
	- the name of the constant (a text that MUST REMAIN UNCHANGED)
        - the value which should be a number. For booleans use 0 for false and 1 for true.
Do not change a value unless knowing precisely what it does.
Each parameter has a small explanation in front of it.
*/

//Avoid ferry lines penalty factor: applied to ferry lines when “avoid ferry lines” option  in on
kAvoidFerriesPenaltyFactor,4



// Surfaces --> the F: entries

// Slopes --> the S: entries

// Cycling modes (ride, walk, carry, forbidden)
kBicycleModeWalk_speed,1
kBicycleModeCarry_speed,1
kBicycleModeWalk_factor,1
kBicycleModeCarry_factor,1
kBicycleModeForbidden_factor,100

// Widths (for paths and lanes) --> the W: entries

// Bike Features of road - none, shared, lane, bus_lane, track is order of increasing preference: the L: entries

// Quietness factors
// Note that some quietness factors like greenspace and industrial are not implemented, and will rely
// on interpreting the area that the path crosses
kBicycleQuietMajorRoad_factor,1.0
kBicycleQuietMediumRoad_factor,1.0
kBicycleQuietPath_factor,1.0
kBicycleGreenspace_factor,1.0
kBicycleIndustrial_Factor,1.0

//Carry bicycle over steps:
kBicycleDelayPerStep,0.0
