# How to calculate fares dynamically using the subway start and end points? Ideas

Source: Internet
Author: User
How to calculate fares dynamically using the subway start and end points? Ideas
Doubt: 1.A Station to station B can have n transfer plan, how to determine the best route?
2.A Station to station B there are N transfer stations, how to determine the distance?

How to calculate fares dynamically using the subway start and end points? Ideas
Doubt: 1.A Station to station B can have n transfer plan, how to determine the best route?
2.A Station to station B there are N transfer stations, how to determine the distance?

Each station is a unique point, marking, the distance between every two points is the weight value. Use Digetsla algorithm what, multi-point path algorithm quite a lot of, you can Baidu Baidu.
First, three-dimensional problems are processed into two-dimensional mathematical problems, most of them have predecessors of the "wheel" can be used

Station is the point, the route is the edge, distance is the distance, together is a figure, billing generally directly take the shortest distance (ignoring the number of transfers) of the route, then is the basic shortest path problem, the algorithm a search has

If you want to give the result of a different strategy such as the shortest time/minimum transfer like the map app, think again.

• Related Keywords:
Related Article

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.