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

Add duration record for station connectivity graph #331

Merged
merged 12 commits into from
May 8, 2020

Conversation

CodeBear801
Copy link

@CodeBear801 CodeBear801 commented May 7, 2020

Issue

  • Targeting issue: the issue will be CLOSED once the PR merged. If there is no issue that addresses the problem, please open a corresponding issue and link it here. Uses the Closes keyword to close them automatically.
    Closes # 326

Description

Target:
Adjust spatialindexer/interface.go, record duration into pre-processed data. Originally, I thought only Distance is needed, which is right when ranking stations, but while building graph of charge stations, we need both Duration and Distance

// RankedPointInfo used to record ranking result to center point
// Distance record distance from center point to current point
// Duration records duration from center point to current point
type RankedPointInfo struct {
	PointInfo
	Distance float64
         // todo
        Duration float64
}

Modifications

  • Record Duration during ranker's calculation
    • If use OSRM, record Duration from table response
    • If use great circle distance, use length/default speed for Duration
  • Record Duration in pre-processing
    • When connectivity_map build data for charge station connectivity, record Duration with Distance
  • Provide Duration in RankedPointInfo interface during the implementation of StationConnectivityQuerier

Tasklist

@CodeBear801 CodeBear801 added Prototype Proof of concept Refactor Rewrite existing code in order to improve its readability, reusability or structure labels May 7, 2020
@CodeBear801 CodeBear801 self-assigned this May 7, 2020
@CodeBear801 CodeBear801 added the NewFeature New feature or feature improvement label May 7, 2020
@CodeBear801 CodeBear801 merged commit d02936c into master May 8, 2020
@CodeBear801 CodeBear801 deleted the feature/add-duration2 branch May 8, 2020 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NewFeature New feature or feature improvement Prototype Proof of concept Refactor Rewrite existing code in order to improve its readability, reusability or structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants