Skip to content

Account for cost per km#1009

Merged
jcoupey merged 8 commits intomasterfrom
feature/cost-per-km
Oct 16, 2023
Merged

Account for cost per km#1009
jcoupey merged 8 commits intomasterfrom
feature/cost-per-km

Conversation

@jcoupey
Copy link
Copy Markdown
Collaborator

@jcoupey jcoupey commented Oct 9, 2023

Issue

Fixes #908

Tasks

  • Parse costs.per_km in input
  • Store relevant additional values in CostWrapper
  • Add distance component in cost computing
  • Adjust various scaling factors to keep things in the integer world
  • Benchmark
  • Update docs/API.md
  • Update CHANGELOG.md
  • review

@jcoupey jcoupey added this to the v1.14.0 milestone Oct 9, 2023
@jcoupey
Copy link
Copy Markdown
Collaborator Author

jcoupey commented Oct 16, 2023

The overhead introduced here is non-zero but quite manageable (consistent computing time increase of ~2% for CVRP instances). There is no way around paying the price of using a new metric inside the cost computation anyway if we want this feature. This overhead will probably be swiped away in #1008 anyway.

A longer-term refactoring we could try to improve data locality when computing costs is to store matrices of Eval (embedding travel times and distances for all edges), instead of having separates matrices for travel times and distances whose values are fetched to compute gains at runtime.

@jcoupey jcoupey merged commit 73313fc into master Oct 16, 2023
@jcoupey jcoupey deleted the feature/cost-per-km branch October 16, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vehicle cost per kilometer

1 participant