Skip to content

Multi-metric prototype #391

@wangyoucao577

Description

@wangyoucao577

Background

Based on discussion in #372, we might possible to add one more metric in OSRM, which might be used to store EV consumption in the future. Project-OSRM#3116 (comment) describes more idea that it can be used for.
Originally multi-metric means multiple metrics per profile(see Project-OSRM#4007), e.g., support both fastest and shortest queries in a single OSRM instance. But what we want to dicscuss here is more like another dimension of weight, something like duration. When we query a route or a table, it can be outputed along with weight and duration.

Goal

  • Try to add one more end-to-end metric in OSRM(name it energy_consumption maybe), which can be queried via table service interface at the first step.
  • A sample table response may looks like this
{
"code": "Ok",
"sources": [...],
"destinations": [...],
"durations": [...],
"distances": [...],
"energy_consumptions": [...]
}

Implementation ideas

  • duration can be considered as the second metric compare with weight. What we want to add is the third one.
  • The calculation in this prototype could be the same with duration so that we're able to verify correctness.
  • We focus on MLD on this idea, don't want to touch CH for now.
  • To support real energy consumption calculation, we also need some extra attributes(e.g., evalution) and extra data(e.g., speed table). However, this prototype is dedicated to estimate viability and effort in OSRM to have this idea, so we won't touch these extra parts.

Acceptance critiria/measurement

  • same processing with duration that results same value with duration
  • query performance should not be affected
  • processing(osrm-extract, osrm-partition, osrm-customize) performance should not be significantly affected(might be affected a little? )
  • how many files need to be modified?
  • how many size increased on files?
  • how many memory increased of osrm-routed?

Let's mainly discuss this topic here to prepare the prototype implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NewFeatureNew feature or feature improvementPrototypeProof of concept

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions