The three-day national mathematical modeling competition was over. After three days of hard work, we finally handed in a satisfactory answer.
But in these three days, I have a lot of feelings. How to apply the knowledge.
Let's take a look at the question I selected this time.
BQuestion: take a bus to watch the Olympics
The 29th Olympic Games, predicted by the Chinese people, will be held in Beijing in next August, when a large number of spectators will attend the Olympic Games. Most of them will take public transport (public transport for short, including public vehicles and subways. Over the years, the city's public transit system has been greatly developed, and there have been more than 800 bus lines in Beijing, making public travel more smooth and convenient, but it also faces the problem of selecting multiple lines. In response to market demands, a company is preparing to develop an autonomous query computer system to solve the problem of bus route selection.
In order to design such a system, the core of the Model and Algorithm for line selection should be taken into consideration from the actual situation to meet different needs of the queryer. Please solve the following problems:
1. Only public steam lines are considered. A general Mathematical Model and Algorithm for line selection between any two public steam stations are provided. Based on the data in the appendix, use your models and algorithms to find the best route between the starting station and the end-to-end station (with clear comments ).
(1) s3359 → s1828 (2), s1557 → s0481 (3), s0971 → s0133
(4), s0008 → s0073 (5), s0148 → s0133 (6), s0087 → s3676
2. solve the above problems by taking into account the public steam and subway lines.
3. If you know the walking time between all sites, please provide a mathematical model of the line selection problem between any two sites.
[Appendix 1] basic parameter settings
Average driving time of adjacent bus stations (including stop time): 3 minutes
Average travel time of adjacent subway stations (including stop time): 2.5 minutes
Average time consumed for public steam transfer: 5 minutes (2 minutes walk)
Average time used for Subway transfer: 4 minutes (2 minutes walk)
Average time used for Subway transfer to public steam: 7 minutes (4 minutes walk)
Average time consumed by public steam transfer to the subway: 6 minutes (4 minutes walk)
Public steam fare: There are two types of prices: single fare and segmented pricing, marked after the line. The prices of segmented pricing are: 0 ~ 20 sites: 1 RMB; 21 ~ 40 sites: 2 RMB; 40 sites and more: 3 RMB
Subway fare: 3 RMB (no matter whether there is a transfer between subway lines)
Note: The above parameters are assumptions for simplifying the problem and may not be exactly consistent with the actual data.
Appendix 2: bus routes and related information (see data file b2007data.rar)
The question is very clear, that is, a lot of nodes are provided, and then you can search according to the user's requirements.
In my initial analysis, I wanted to create a graph model and use some basic graph search algorithms and shortest path algorithms to calculate the number of public transit sites. Oh, I don't know. I was shocked. I didn't think the transportation system in Beijing was so huge !!!
This algorithm has no possibility of Division results.
Then, I changed the model to connect each site and line. The final computation speed and results are both very good. For more information, see Attachment/files/gpcuster/2007mcm.rar.
The problem is solved, but it leaves me a lot of thinking.
The importance of algorithms to programming. Although the modular design and the application of OO technology greatly reduce the complexity of the program during the whole program implementation process, there is no algorithm, and everything is empty talk, these technologies serve to better implement algorithms.
Document importance. I felt that I had done a good job in other aspects, but at last I had a lot of problems in writing my thesis. In many cases, you can only figure out what you want, but cannot present it in your thesis.
Requirements for yourself:
1. Learn more algorithms and improve your logical thinking.
2. Practice the writing of technical documents and improve your text expression skills.