Project Objectives
Assist in the realization of a subway travel route planning program (GUI or command line)
demand analysis
1. User interaction: the GUI (Graphical Interface) mode or console (command line) mode
2. Design project objectives Core Solution
Solution design ideas
1. on the " route planning " understanding, a good route planning may have the following metrics:
a) the total number of kilometers minimal
b) after the minimum number of points terminus
c) expected to consume the shortest time
Combined with life experience can be found, the total number of kilometers minimal time consumption is not necessarily the shortest route
After a number of sites have a significant impact on the consumption of time, but in order to simplify the problem, consider only the length.
2. The program input and output
a) an input file can consider using CSV file
b) output directly to the screen display, you can also export the results to a file
3. The model building and selection algorithm (design)
Typically, the issues between the subway station and the site can be abstracted into a line chart
Route planning problem has become a problem (broadly) in two paths in FIG shortest seek
Accordingly, the following are two algorithms for this problem:
a) Dijkstra algorithm (Dijkstra)
The algorithm used to find a specified figure and the shortest distance between two points corresponding to the path
b) Floyd algorithm (Floyd algorithm)
The algorithm used to find a minimum path between any two points in FIG.
Obviously, for a given figure, with better Floyd algorithm, can be obtained only once calculated
The shortest path between any two points.
4. Thinking program for optimization of
Apparently, the subway station model is a special graph model, namely:
Most subway station sent only two sides, similar to the partial list of structures
For this area may be able to be part of the optimization.
Solution implementation tools
C/C++
IDE can choose VS
Solutions plans to achieve
1. Data Structure Design
2. The file structure design (based on the data structure)
3. The core algorithm (based on the data structure)
4. Test
4.5 Efficiency Analysis and Optimization
5. summary
to sum up
The difficulty is not high on the overall project, the core algorithm is very classic, relatively easy to achieve, but for data structures and file structure (file read and write) aspects, as well as how to create a better user experience environment, there are many places worthy of scrutiny.