Skip to content

Commit

Permalink
fix: update change log and refine names.
Browse files Browse the repository at this point in the history
issue: #349
  • Loading branch information
CodeBear801 committed May 28, 2020
1 parent bd1b43a commit 0578ccb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes from v10.3.0
- CHANGED for integration of pre-generated connectivity data with OASIS service [#339](https://github.com/Telenav/osrm-backend/pull/339)
- CHANGED for internal refactoring, replace `Location` in `spatialindexer` to nav.Location, replace all name of `point` to `place` [#341](https://github.com/Telenav/osrm-backend/pull/341)
- CHANGED for internal refactoring, move package oasis/solution, oasis/osrmhelper and oasis/searchhelper into oasis/internal [#343](https://github.com/Telenav/osrm-backend/pull/343)
- CHANGED for internal refactoring, improve performance for OASIS service, more information please go to [#344](https://github.com/Telenav/osrm-backend/issues/344) [#353](https://github.com/Telenav/osrm-backend/pull/353)
- Bugfix:
- Performance:
- Tools:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (f *fakeChargeStrategy) CreateChargingStates() []State {
return f.stateCandidates
}

var noNeedChargeCost = ChargingCost{
var zeroChargeCost = ChargingCost{
Duration: 0.0,
}

Expand All @@ -69,7 +69,7 @@ func (f *fakeChargeStrategy) EvaluateCost(arrivalEnergy float64, targetState Sta

if arrivalEnergy > targetState.Energy ||
util.Float64Equal(targetState.Energy, 0.0) {
return noNeedChargeCost
return zeroChargeCost
}

totalTime := 0.0
Expand Down Expand Up @@ -117,5 +117,5 @@ func (f *fakeChargeStrategy) EvaluateCost(arrivalEnergy float64, targetState Sta
}
}

return noNeedChargeCost
return zeroChargeCost
}
2 changes: 1 addition & 1 deletion integration/service/oasis/internal/common/place.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/Telenav/osrm-backend/integration/api/nav"
)

// todo codebear801 change to a more variable name
// todo @codebear801 change to a more reasonable name
// PlaceInfo -> PlaceWithLocation
// RankedPlaceInfo -> TransferInfo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func NewQuerierBasedOnWeightBetweenNeighborsChan(c chan stationfindertype.Weight
return querier
}

// NearByStationQuery finds near by stations by given placeID and return them in recorded sequence
// Returns nil if given placeID is not found or no connectivity
func (q *querier) NearByStationQuery(placeID common.PlaceID) []*common.RankedPlaceInfo {
if results, ok := q.id2QueryResults[placeID]; ok {
return results
Expand All @@ -77,6 +79,8 @@ func (q *querier) NearByStationQuery(placeID common.PlaceID) []*common.RankedPla
}
}

// GetLocation returns location of given station id
// Returns nil if given placeID is not found
func (q *querier) GetLocation(placeID common.PlaceID) *nav.Location {
if location, ok := q.id2Location[placeID]; ok {
return location
Expand Down
2 changes: 0 additions & 2 deletions integration/service/oasis/stationgraph/node_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,5 @@ func (g *nodeGraph) buildAdjacentList(id nodeID) []nodeID {
}
}

// to be removed
//glog.Infof("### len(physicalNodes) = %v, len(adjacentNodeIDs) = %v, numOfPhysicalNodesNeeded= %v\n", len(physicalNodes), len(adjacentNodeIDs), numOfPhysicalNodesNeeded*3)
return adjacentNodeIDs
}

0 comments on commit 0578ccb

Please sign in to comment.