Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge-based routing without turn-costs #1702

Open
easbar opened this issue Aug 28, 2019 · 1 comment
Open

Edge-based routing without turn-costs #1702

easbar opened this issue Aug 28, 2019 · 1 comment

Comments

@easbar
Copy link
Member

easbar commented Aug 28, 2019

Discussion came up in #1698.

@easbar
Copy link
Member Author

easbar commented Aug 28, 2019

I think ideally we would have:

  • traversal_mode=edge_based/node_based (or edge_based=true/false ?) to determine the traversal mode, default: node. I think I would prefer traversal_mode, because this way we could throw an error if somebody still uses edge_based.
  • turn_costs=true/false to enable/disable turn costs, default: false

Maybe we need to make the defaults for traversal_mode and turn_costs configurable via config.yml ?

case traversal_mode turn_costs expected behavior
1 node_based false node-based routing, no turn costs (and no u-turns)
2 node_based true enable traversal_mode=edge_based automatically
3 edge_based false edge-based routing, no turn costs (u-turns are free) unless CH is enabled in this case this should be an error because there will only be an edge-based CH profile with turn costs !? (see below)
4 edge_based true edge-based routing with turn costs and default u-turn costs (infinity/no u-turns)

So from the user perspective the most common cases would be:

  • specify nothing -> node based, no turn costs, no u-turns
  • set turn_costs=true -> edge based, with turn costs, no u-turns

For expert users:

  • set traversal_mode=edge_based -> edge-based routing, no turn costs, free u-turns

After this selection is made we check (do not use the vehicle or encoding manager to 'derive' the values for edge_based/turn_costs as is done currently):

  • if turn_costs=true: does the selected vehicle/encoder support turn costs (i.e. is there a turn cost extension for this encoder) ? if not throw an error.
  • is there a CH profile for the selected vehicle and the chosen traversal mode ? if not throw an error. however see If only edge based CH is prepared no error should be thrown #1637...
  • if an edge-based CH profile is selected and turn_costs=false throw an error (or should this be possible as well (requires edge-based CH preparation without turn costs and keeping track if CH preparation included turn-costs or not (in CHProfile)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant