2022 Tianfu Cup National Undergraduate Mathematical Contest in Modeling E-question Operation and planning of subway lines The whole process of problem-solving documents and procedures

2022 Tianfu Cup National Undergraduate Mathematical Contest in Modeling

Operation and Planning of Subway Lines in Question E

Reproduction of the original title:

  The subway is a very green and fast way of transportation, and major cities across the country are also in full swing for the construction and planning of subway lines. But taking the subway sometimes feels particularly crowded, and we call this period the rush hour. How to reasonably arrange lines and operation strategies is a topic of great concern to subway operators and the general public.
  We collected data on three subway lines in Hangzhou City. Among them, Appendix 1 shows the departure time and stations of the first and last trains of the three subway lines in Hangzhou, Appendix 2 shows the distribution of bus stops in Hangzhou, and Appendix 3 shows the traffic flow data of each subway station in Hangzhou within 24 hours on January 21, 2019. Since the traffic data has been desensitized, it cannot directly correspond to the lines and stations, so you need to analyze it yourself. The meanings of the fields are: time is the card swiping time, lineID is the line, stationID is the station, deviceID is the card swiping device, 0 in status is outbound and 1 is inbound, userID is user identity, and payType is the payment method. The current line map of Hangzhou is shown in the figure:
insert image description here
  You need to solve the following problems:
  (1) According to Annex 3, please try to predict the change of the flow of people at each station of Line A within 1 hour
  (2) According to the analysis of the flow of people data, for this For the three subway lines, how should the departure interval be set to avoid crowd congestion caused by morning peak and evening peak?
  (3) If you are a subway operator, considering the location of bus stops in Appendix 2 and the convenience for residents to get off and change their transportation methods, which subway lines would you add? Please explain your reasons.

Overview of the overall solution process (abstract)

  For problem 1, first, preprocess the data in Annex 3 to separate line A from multiple lines, then separate the different stations in line A, and then divide the passengers in each station into inbound and outbound Two types of stations are analyzed. Secondly, a regression prediction model was established for analysis, and the analysis results were obtained. The result of the 9th hour of the 67 site was 730.233, and then the exponential smoothing model was used to predict and compare the flow of people in the next hour through the known data. The site with a flat trend used The first-order smoothing index method, and the site showing a binary curve is predicted by the third-order smoothing index method. Finally, using the time prediction model, it can be concluded that the traffic flow of people one hour after the 67, 68, 69, etc. stations are 237, 8946, 410.6, etc. respectively.
  For question 2, first, process the data in Annex 2 and Annex 3, judge the peak period of the subway from 7:00-8:59 every day through the flow of people in a day, and set the departure time interval to avoid the peak period. congestion. Secondly, based on the flow of people, the particle swarm optimization algorithm is used to optimize the departure time interval. Regardless of special circumstances, the departure time interval is shortened during the peak period. Finally, Matlab is used for data processing to calculate the optimized result. After calculation, In the rush hour, changing the departure time interval to 3 minutes and 40 seconds will avoid congestion.
  To solve the third problem, firstly, analyze the technical and economic characteristics of rail transit and transit buses, compare the advantages of rail transit, and then, consider the factors of rail transit selection, establish a rail station selection model, and analyze the traffic that needs to be transported For rail stations served by public transport, finally, determine the standard of station selection by calculating the passenger flow volume, establish the aggregation effect function model, and determine the reasonable range of transportation at the rail station. If the passenger flow of the subway in the evening peak is 7019, the minimum transfer rate is 85%, the closest transfer distance is 2.5km, and new subway stations can be set according to the bus station.

Model assumptions:

  1. Assume that urban space construction is not considered when designing the route.
  2. Assume that the time interval of vehicle departure remains unchanged, and the parking time at each station along the route is fixed.
  3. Assume that the running speed of the vehicles between the platforms is constant, and no special events occur on the way.
  4. Assume that the three subways will not affect each other during operation.

problem analysis:

  Aiming at problem 1: Firstly, preprocess the data in Annex 3, separate the line A, then separate the different stations in the line A, and then divide the passengers in each station into two categories for analysis: inbound and outbound. Secondly, the regression prediction model and the exponential smoothing method model are respectively established to predict and compare the flow of people in the next hour through the known data, and obtain the analysis results. Finally, the prediction accuracy of the two methods is compared, and the more accurate method can be selected in the actual prediction.
  For problem 2: First, process the data in Annex 2 and Annex 3, judge the peak period of the subway through the flow of people in a day, and set the departure time interval to avoid congestion during the peak period. Secondly, based on the flow of people, the particle swarm optimization algorithm is used to optimize the departure time interval. Regardless of special circumstances, the departure time interval is shortened during the peak period. Finally, Matlab is used for data processing to calculate the optimized result.
  Aiming at problem 3: First, analyze the technical and economic characteristics of rail transit and transit buses, compare the advantages of rail transit, and then, consider the factors of rail transit selection, establish a rail station selection model, and analyze the For rail stations served by public transport, finally, determine the station selection criteria by calculating the passenger flow volume, establish the aggregation effect function model, and determine the reasonable pick-up range of the rail station.

Model establishment and solution Overall paper thumbnail

insert image description here
insert image description here

For all papers, please see below "Only modeling QQ business cards" Click on the QQ business card

Part of the program code: (code and documentation not free)

clear
clc
S=[13
176
773
1116
3994
265
272
166];
figure
hold on
plot(S,'b-*','linewidth',1);
alpha=0.5;
beta=0.5;
gamma=0.3;
fc=3;%预测个数
k=3;%初始取均值数据个数
n=length(S);
a(1)=sum(S(1:k))/k;
b(1)=(sum(S(k+1:2*k))-sum(S(1:k)))/k;
s=S(1)-a(1);
y=a(1)+b(1)+s(1);
for i=1:n+fc-1
if i==length(S)
S(i+1)=a(end)+b(end)+s(end-k+1);
end
a(i+1)=alpha*(S(i)-s(i))+(1-alpha)*(a(i)+b(i));
b(i+1)=beta*(a(i+1)-a(i))+(1-beta)*b(i);%趋势
s(i+1)=gamma*(S(i)-a(i)-b(i))+(1-gamma)*s(i);%周期
y(i+1)=a(i+1)+b(i+1)+s(i+1);
end
plot(n:n+fc,S(end-fc:end),'r-o','linewidth',1);
legend('历史走势','未来走势')
xlim([0,14])
clear all;
close all;
clc;
N=20; %群体粒子个数
D=3; %粒子维数
T=50; %最大迭代次数
c1=1.5; %学习因子 1
c2=1.5; %学习因子 2
w=0.8; %惯性权重
Xmax=4; %位置最大值
Xmin=1; %位置最小值
Vmax=5; %速度最大值
Vmin=-5; %速度最小值
%初始化个体
x=rand(N,D)*(Xmax-Xmin)+Xmin;
v=rand(N,D)*(Vmax-Vmin)+Vmin;
%初始化个体最优位置和最优值
p=x;
pbest=ones(N,1);
for i=1:N
pbest(i)=func1(x(i,:));
end
%初始化全局最优位置和最优值
g=ones(1,D);
gbest=inf;
for i=1:N
if (pbest(i)<gbest)
g=p(i,:);
gbest=pbest(i);
end
end
gb=ones(1,T);
%按照公式依次迭代直到满足精度或者迭代次数
for i=1:T
for j=1:N
if (func1(x(j,:))<pbest(j))
p(j,:)=x(j,:);
pbest(j)=func1(x(j,:));
end
if (pbest(j)<gbest)
g=p(j,:);
gbest=pbest(j);
end
v(j,:)=w*v(j,:)+c1*rand*(p(j,:)-x(j,:))+c2*rand*(g-x(j,:));
x(j,:)=x(j,:)+v(j,:);
%边界条件处理
for ii=1:D
if (v(j,ii)<Vmin)||(v(j,ii)>Vmax)
v(j,ii)=rand*(Vmax-Vmin)+Vmin;
end
if (x(j,ii)<Xmin)|(x(j,ii)>Xmax)
x(j,ii)=rand*(Xmax-Xmin)+Xmin;
end
end
end
%记录全局最优值
gb(i)=gbest;
end
g; %最优个体
gb(end); %最优值
figure
plot(gb)
xlabel('迭代次数')
ylabel('适应度值')
title('适应度进化曲线')
%适应度函数
function result=func1(x)
summ=sum(x.^2);
result=summ;
end

For all papers, please see below "Only modeling QQ business cards" Click on the QQ business card

Guess you like

Origin blog.csdn.net/weixin_43292788/article/details/130969730