Skip to content

Zero accumulated distance for last break #475

@jcoupey

Description

@jcoupey

I spotted a situation where having a final break in an open-ended optimization (i.e. without a vehicle end) can result in a zero duration reported for the break step:

$vroom -g -i final_break_without_end.json | jq '.routes[].steps[] | [.type, .duration, .distance]' 
[
  "start",
  0,
  0
]
[
  "job",
  4401,
  79134
]
[
  "job",
  5107,
  96317
]
[
  "break",
  5107,
  0
]
[
  "end",
  5107,
  96317
]

This is related to the fact that we try to compute added distance pro-rata temporis and accumulated travel times do not increase.

Not directly related to #463 but touches the exact same part of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions