Skip to content

FlagEncoder can make FastestWeighting#getMinWeight inconsistent #1849

Open

Description

@michaz

At least for MotorcycleFlagEncoder, calcWeight sometimes returns less than getMinWeight, which causes A* heuristics to fail.

To see, go to this PR branch:

#1749

Open RandomizedRoutingTest and switch to MotorcycleFlagEncoder. (Switch commented out line.) Will fail.
Then open FastestWeighting and switch commented-out lines. Will succeed.

Activity

  1. michaz commented on Jan 10, 2020

    @michaz
    MemberAuthor

    Ah, I forgot: It may be because the test sets some speeds higher than 120, which is hardcoded in MotorcycleFlagEncoder.

    ...which we could still improve upon, because the speedEncodedValue lives in the MotorcycleFlagEncoder, so it could actually know its highest speed.

    But that's perhaps a luxury issue. ,-)

  2. changed the title [-]FastestWeighting#calcWeight and #getMinWeight inconsistent[/-] [+]FlagEncoder can make FastestWeighting#getMinWeight inconsistent[/+] on Jan 10, 2020
  3. easbar commented on Jan 10, 2020

    @easbar
    Member

    But that's perhaps a luxury issue. ,-)

    In case there is no time for luxury we could also make this adjustable in randomGraph or even simply reduce the speed from 120+-10 to 110+-10

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions