From d3bffac2d0acb14b4f01c035a81e25c7779cb31e Mon Sep 17 00:00:00 2001 From: codebear801 Date: Tue, 12 May 2020 19:01:15 -0700 Subject: [PATCH] doc: update comments of package slectionstrategy issue: https://github.com/Telenav/osrm-backend/issues/242 --- integration/service/oasis/selectionstrategy/doc.go | 7 +++++++ .../service/oasis/selectionstrategy/resource_manager.go | 3 +++ 2 files changed, 10 insertions(+) diff --git a/integration/service/oasis/selectionstrategy/doc.go b/integration/service/oasis/selectionstrategy/doc.go index 3a9e447065f..8676cbc077c 100644 --- a/integration/service/oasis/selectionstrategy/doc.go +++ b/integration/service/oasis/selectionstrategy/doc.go @@ -1,4 +1,11 @@ /* Package selectionstrategy contains logic related with charge station selection related logic. +It contains logic of: +- detect wether destination is reachable or not +- detect whether charge is needed or not +- if charge for one time could reach destination, find best solution +- best solution for multiple charge + + SearchAlongRoute(comment temporarily) + + ChargeStationBasedStrategy */ package selectionstrategy diff --git a/integration/service/oasis/selectionstrategy/resource_manager.go b/integration/service/oasis/selectionstrategy/resource_manager.go index c74158adbbe..e97c104c4de 100644 --- a/integration/service/oasis/selectionstrategy/resource_manager.go +++ b/integration/service/oasis/selectionstrategy/resource_manager.go @@ -11,10 +11,13 @@ import ( "github.com/golang/glog" ) +// StaionSelectionStrategy defines enum of how to select optimal charge stations type StaionSelectionStrategy int const ( + // FindChargeStaionsAlongRoute means first calculate a route, then try to find charge stations along the route when energy is low FindChargeStaionsAlongRoute = StaionSelectionStrategy(iota) + 1 + // ChargeStaionBasedRouting builds a graph of charge stations and apply shortest-path-algorithm on to it ChargeStaionBasedRouting )