Documentation ¶
Index ¶
- Constants
- Variables
- type Aoi
- type BusHeuristics
- type BusRouteResult
- type DriveHeuristics
- type Lane
- type MongoPath
- type PublicSubline
- type Road
- type Router
- func (r *Router) Close()
- func (r *Router) GetRoadCost(roadId int32, time *float64) (float64, error)
- func (r *Router) HasAoiID(id int32) bool
- func (r *Router) HasLaneID(id int32) bool
- func (r *Router) HasRoadLaneID(id int32) bool
- func (r *Router) Roads() map[int32]*Road
- func (r *Router) SearchBus(start, end *geov2.Position, time float64) ([]*routingv2.WalkingRouteSegment, float64, []*routingv2.TransferSegment, ...)
- func (r *Router) SearchDriving(start, end *geov2.Position, time float64) (roadIDs []int32, cost float64, err error)
- func (r *Router) SearchWalking(start, end *geov2.Position, time float64) (segments []*routingv2.WalkingRouteSegment, cost float64, err error)
- func (r *Router) SetRoadCost(roadId int32, cost float64, time *float64) error
- type SearchLane
- type StationIdPairs
- type TransportationAnalysisZone
- type TransportationAnalysisZoneInfo
- type WalkHeuristics
Constants ¶
View Source
const ( // 换乘的惩罚时间(单位:秒)拍脑袋定的 STATION_TRANSFER_PENALTY = 1500 SUBWAY_STATION_TRANSFER_RATIO = 1.0 BUS_STATION_TRANSFER_RATIO = 1.3 // 途径车站的停车时间 STATION_PASSBY_TIME = 15 // 去另一个车站换乘的额外用时(单位:秒)拍脑袋定的 WALK_LANE_TRANSFER_PENALTY = 300 // 公交速度 BUS_SPEED = 40 / 3.6 // 地铁速度 SUBWAY_SPEED = 100 / 3.6 // 车站内换乘边的id TRANSFER_SUBLINE_ID = int32(math.MaxInt32) // 在同一个TAZ之内选取的公交站起点数量 SAME_TAZ_STATION_NODES = 10 // 行人乘坐公交车可忍受的最大步行时长(s) MAX_WALKING_TOLERATE_TIME = 60 * 35 // 行人乘坐公共交通可忍受的最大时长(s) MAX_BUS_TOLERATE_TIME = 3600 * 6 // 行人换乘最大距离(m) MAX_TRANSFER_WALKING_DISTANCE = 200 )
View Source
const ( // 路口带来的额外用时(单位:秒)除了左转其他数字都是拍脑袋定的 TURN_STRAIGHT_TIME_PENALTY = 15 TURN_LEFT_TIME_PENALTY = 60 // Stamatiadis, Nikiforos, Kenneth R. Agent, and Apostolos Bizakis. "Guidelines for left-turn phasing treatment." Transportation Research Record 1605.1 (1997): 1-7. 有保护左转相对来说会带来60-70秒的延迟 TURN_RIGHT_TIME_PENALTY = 5 TURN_AROUND_TIME_PENALTY = 1.5 * TURN_LEFT_TIME_PENALTY // road id与junction id的切分点 ROAD_JUNCTION_SPLIT = 3_0000_0000 // 车辆速度 VEHICLE_SPEED = 60 / 3.6 )
View Source
const (
PERSON_SPEED = 1.1
)
Variables ¶
View Source
var (
SAME_TAZ_DISTANCES = [7]float64{
600, 840, 1080, 1320, 1560, 1800,
}
)
Functions ¶
This section is empty.
Types ¶
type Aoi ¶
type Aoi struct { *mapv2.Aoi CenterPoint geometry.Point DriveOutNodeId, DriveInNodeId int WalkOutNodeId, WalkInNodeId int StationOutNodeId, StationInNodeId int StationTazCosts map[algo.TazPair][]algo.TazCost // 乘指定线路到达指定TAZ的cost SublineTazCosts map[int32][]algo.TazCost // 经过此车站的所有线路到达指定TAZ的cost StationTaz algo.TazPair // 车站所在TAZ IsStation bool // 是否是车站 }
type BusHeuristics ¶ added in v1.8.0
type BusHeuristics struct { }
func (BusHeuristics) HeuristicBus ¶ added in v1.8.0
func (h BusHeuristics) HeuristicBus(attrNode algo.BusNodeAttr, fromEdgeAttrs []*algo.BusEdgeAttr, pEnd geometry.Point, time float64) float64
type BusRouteResult ¶ added in v1.8.0
type BusRouteResult struct { StartWalkSegments []*routingv2.WalkingRouteSegment StartWalkCost float64 TransferSegment []*routingv2.TransferSegment TransferCost float64 EndWalkSegments []*routingv2.WalkingRouteSegment EndWalkCost float64 Err error }
func (*BusRouteResult) BusRouteResultCost ¶ added in v1.8.0
func (r *BusRouteResult) BusRouteResultCost() float64
type DriveHeuristics ¶ added in v1.8.0
type DriveHeuristics struct { }
func (DriveHeuristics) HeuristicBus ¶ added in v1.8.0
func (h DriveHeuristics) HeuristicBus(nodeAttr algo.DriveNodeAttr, fromEdgeAttrs []algo.DriveEdgeAttr, pEnd geometry.Point, time float64) float64
type Lane ¶
type PublicSubline ¶ added in v1.8.0
type PublicSubline struct { *mapv2.PublicTransportSubline StationPairs map[StationIdPairs]bool InStationIds map[int32]int SameLineID int32 }
type Road ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) GetRoadCost ¶
func (*Router) SearchBus ¶ added in v1.8.0
func (r *Router) SearchBus( start, end *geov2.Position, time float64, ) ([]*routingv2.WalkingRouteSegment, float64, []*routingv2.TransferSegment, float64, []*routingv2.WalkingRouteSegment, float64, error)
func (*Router) SearchDriving ¶
func (*Router) SearchWalking ¶
type TransportationAnalysisZone ¶ added in v1.8.0
type TransportationAnalysisZone struct {
StationIds []int32
}
type TransportationAnalysisZoneInfo ¶ added in v1.8.0
type TransportationAnalysisZoneInfo struct {
// contains filtered or unexported fields
}
type WalkHeuristics ¶ added in v1.8.0
type WalkHeuristics struct { }
func (WalkHeuristics) HeuristicBus ¶ added in v1.8.0
func (h WalkHeuristics) HeuristicBus(attr algo.WalkNodeAttr, fromEdgeAttrs []*routingv2.WalkingRouteSegment, pEnd geometry.Point, time float64) float64
Source Files ¶
Click to show internal directories.
Click to hide internal directories.