2023 Huashu Cup Mathematical Modeling Ideas A Question B Question C Model Code Analysis

Table of contents

1. The latest ideas on mathematical modeling of the 2023 Huashu Cup: update as soon as the competition starts

Update to view the business card at the end of the article

2. Brief introduction and analysis of Huashu Cup competition questions in previous years:


1. The latest ideas on mathematical modeling of the 2023 Huashu Cup: update as soon as the competition starts

Update to view the business card at the end of the article

2. Brief introduction and analysis of Huashu Cup competition questions in previous years:

2022 Huashu Cup Question A ideas: 

Question A is a typical optimization problem, which requires us to solve the problem of the oscillator design structure in the chip. First, we give constraints based on the indicators given in the question. The indicators that need to be considered in this question: speed, area, power, We can consider using a linear programming model to construct the mathematical relationship between variables, set up an objective function, and further optimize the model, and then solve it. After the specific ideas, we will analyze it in detail!

Question 1: The threshold voltage, K value, maximum and minimum values ​​of gate length and gate width are all in Appendix 1. Drain-Source Voltage: The voltage across the drain and source. Gate-Source Voltage: The voltage across the gate and source. Gate (Gate—G, also called gate), source (Source—S), drain (Drain—D), the formula of Id in the title should be noted in Figure 1 of Appendix 1, the first question How to calculate the output frequency is actually to derive the current through the Id formula based on the voltage. To calculate the frequency, it is necessary to calculate the delay time of the single-stage inverter.

2022 Huashu Cup question B ideas:

B is the problem of robot assembly. The planning period of each production plan in the factory is one week. In the case of the minimum total cost, we need to formulate a 7-day production plan. It is easier to solve it as a dynamic programming problem. .

Divide the multi-stage decision-making process into stages, properly select the state variables and decision variables to define the optimal index function, so as to turn the problem into a family of sub-problems of the same type, and then solve them one by one;

When solving, start from the boundary conditions, proceed in reverse order, and recursively seek optimization piece by piece. When solving each sub-problem, the optimal result of the previous sub-problems should be used. The optimal solution of the last sub-problem is the optimal solution of the whole problem;

The dynamic programming method is an optimization method that not only separates the current section from the future sections, but also considers the current benefits and future benefits together. Preferences are generally different;

During the robot assembly process, because the demand changes with time, in order to obtain the best production efficiency, the enterprise must determine the production plan according to the inventory and demand day by day throughout the production process. For this problem, we only need to convert the multi-stage decision-making problem into a series of single-stage optimization problems and solve them one by one.

2022 Huashu Cup Question C ideas:

Question 1: Please study the changes in structural variables and product performance after intercalation, and analyze whether the intercalation rate has an impact on these changes?

Question C is about material performance research. We need to study the changes in structural variables and product properties after intercalation to analyze whether the intercalation rate has an impact on these changes. We first need to clean up the data and descriptively describe the data Statistics, we consider using factor analysis model, you can also use gray relational analysis (using the intercalation rate as the parent sequence, and the rest of the variables as subsequences), or one-way analysis of variance, it should be noted that if you use one-way analysis of variance, It is necessary to convert the intercalation rate into categorical data for discussion (the intercalation rate can be divided into a classification standard).

Question 2: Please study the relationship between process parameters and structural variables. Table 1 gives 8 combinations of process parameters, please fill in the predicted structural variable data in Table 1.

Question 2 is a forecasting problem. We consider using neural network algorithm/time series algorithm to make predictions. In order to improve the accuracy of the model, this part adds more variables to be considered, and at the same time adopts a higher precision, based on genetic algorithm For the neural network model, 80% of the data in the sorted data set is used for model solving to determine the weights and thresholds of variable indicators, and the remaining 20% ​​of the data is used for model accuracy testing through residual calculation. In order to further improve the model accuracy and calculation efficiency, this paper proposes to solve it based on the Levenberg-Marquardt algorithm. Finally, we conduct a simulation, carry out the data in the table, and fill in the simulation results in the table.

Question 3: Please study the relationship between structural variables and product performance, as well as the relationship between structural variables and product performance. Combined with the second question, when the process parameters are studied, the filtration efficiency of the product will reach the highest?

When the process parameter is how much, the filtration efficiency of the product will reach the highest level. Take the filtration efficiency as a dependent variable and other indicators as independent variables to conduct a regression analysis to construct a discriminant function. The machine learning method related to the second problem can also be used. Use linear SVM (Support Vector Machine) etc.

Some reference codes are given below: neural network code, predicting data
 

% I. 清空环境变量
clear all
clc
 
% II. 训练集/测试集产生
% 1. 导入数据集,可以替换为自己的数据集
load spectra_data.mat
 
% 2. 随机产生训练集和测试集
temp = randperm(size(NIR,1));
% 训练集——50个样本,P为输入数据,T为对应输入数据的输出结果
P_train = NIR(temp(1:50),:)';
T_train = octane(temp(1:50),:)';
% 测试集——10个样本
P_test = NIR(temp(51:end),:)';
T_test = octane(temp(51:end),:)';
N = size(P_test,2);
 
% III. 数据归一化
[p_train, ps_input] = mapminmax(P_train,0,1);
p_test = mapminmax('apply',P_test,ps_input);
 
[t_train, ps_output] = mapminmax(T_train,0,1);
 
% IV. BP神经网络创建、训练及仿真测试
% 1. 创建网络,[9,9]意思为网络含有两个隐藏层,每层有9个单元
net = newff(p_train,t_train,[9,9]);
 
% 2. 设置训练参数
net.trainParam.epochs = 1000;%训练批次
net.trainParam.goal = 1e-12;%训练目标,误差小于1e-12即结束训练
net.trainParam.lr = 0.01;%设置学习率
%另外也可以设置其他训练参数,可看newff()函数介绍手册
 
% 3. 训练网络
net = train(net,p_train,t_train);
 
% 4. 仿真测试
t_sim = sim(net,p_test);
 
% 5. 数据反归一化
T_sim = mapminmax('reverse',t_sim,ps_output);
 
% V. 性能评价
% 1. 相对误差error
error = abs(T_sim - T_test)./T_test;
 
% 2. 决定系数R^2
R2 = (N * sum(T_sim .* T_test) - sum(T_sim) * sum(T_test))^2 / ((N * sum((T_sim).^2) - (sum(T_sim))^2) * (N * sum((T_test).^2) - (sum(T_test))^2)); 
 
% 3. 结果对比
result = [T_test' T_sim' error']
% VI. 绘图
figure
plot(1:N,T_test,'b:*',1:N,T_sim,'r-o')
legend('真实值','预测值')
xlabel('预测样本')
ylabel('xxxx')
string = {'xxxxxx预测结果对比';['R^2=' num2str(R2)]};
title(string)

Guess you like

Origin blog.csdn.net/weixin_45499067/article/details/132075020