Optional transit line penalties when no explicit line was given (#19)
* Enable transit line penalties also when no explicit line was given Currently, if no transit line is given, all edges get penalty factor 0 regardless of whether there are transit lines following the edge or not. The change introduced in this commit will give penalty factor 0 if there is at least one transit line following the edge and penalty factor 1 if there are no tranist lines at all following the edge. Behavior in the case when a transit line is given is untouched. This should improve routing results by preferring edges with associated transit lines. This used to be the behaviour before some refactoring. Maybe it was broken unintentionally.
This commit is contained in:
parent
e06c15656b
commit
08b0685ad1
5 changed files with 52 additions and 9 deletions
|
|
@ -331,6 +331,12 @@ void MotConfigReader::parse(const std::vector<std::string>& paths) {
|
|||
p.getDouble(secStr, "routing_line_unmatched_punish_fac");
|
||||
}
|
||||
|
||||
if (p.hasKey(secStr, "routing_no_lines_punish_fac")) {
|
||||
procedKeys.insert("routing_no_lines_punish_fac");
|
||||
curCfg.routingOpts.noLinesPunishFact =
|
||||
p.getDouble(secStr, "routing_no_lines_punish_fac");
|
||||
}
|
||||
|
||||
if (p.hasKey(secStr, "routing_platform_unmatched_punish")) {
|
||||
procedKeys.insert("routing_platform_unmatched_punish");
|
||||
curCfg.routingOpts.platformUnmatchedPen =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue