2023 "Huawei Cup" Chinese Graduate Mathematical Modeling Competition (Question D) In-depth Analysis | Complete Code of Mathematical Modeling + Full Analysis of the Modeling Process

Question 1: Analysis of the current situation of regional carbon emissions, economy, population, and energy consumption

Idea:

Define the carbon emissions Prediction model:
CO2 = P * (GDP/P) * (E/GDP) * (CO2/E)

Among them: CO2: carbon emissions P: population GDP/P: GDP per capita E/GDP: energy consumption per unit of GDP CO2/E: carbon emissions per unit of energy consumption

2. Collect and compile relevant historical data:

Population P
Total GDP and GDP per capita
Energy consumption of each industrial sector E
Carbon emissions CO2 of each industrial sector


3. Analyze historical data change trends:

GDP growth rate, per capita GDP growth rate,
departmental energy consumption intensity reduction rate,
departmental carbon emission intensity reduction rate
4. Predict future development trends:

Population forecast
GDP growth target
Departmental energy efficiency improvement target
Non-fossil energy substitution target
5. Substitute the forecast data into the carbon emission forecast model to calculate the carbon emissions for each year.

6. Compare the gap between the carbon emission prediction results and the carbon neutrality target, and analyze the difficulties of carbon neutrality.

Code:

# 导入需要的库
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
 
# 读取历史数据
df = pd.read_excel('history_data.xlsx') 
 
# 数据预处理
df = df[['年份','人口','GDP','第一产业能耗','第二产业能耗','第三产业能耗','生活能耗','碳排放量']]
df['能耗总量'] = df[['第一产业能耗','第二产业能耗','第三产业能耗','生活能耗']].sum(axis=1)
df['人均GDP'] = df['GDP'] / df['人口']  
df['能耗强度'] = df['能耗总量'] / df['GDP']
df['碳排放强度'] = df['碳排放量'] / df['能耗总量']
 
# 分析历史趋势
df['GDP增长率'] = df['GDP'].pct_change()
df['人均GDP增长率'] = df['人均GDP'].pct_change() #见完整版

Question 2:
Forecasting model of regional carbon emissions, economy, population, and energy consumption

Population prediction model
Based on historical population data, a simple linear regression model can be established to predict future population numbers. You can also study the S-shaped curve pattern of population growth and establish a logistic regression model. It is necessary to collect birth rate, death rate and other data to comprehensively judge future population change trends.

2. Per capita energy consumption model

The change pattern of per capita energy consumption demand can be analyzed based on the per capita GDP level in each period and combined with the Engel coefficient rule. As living standards improve, per capita energy consumption shows a trend of first increasing and then declining. When establishing a per capita energy consumption prediction model, factors such as income elasticity and the consumption-suppressing effect of technological progress need to be considered.

3. Energy intensity model

This reflects the extent to which economic activity has improved in energy efficiency. Energy consumption intensity benchmarks of similar industries at home and abroad can be collected to determine the energy-saving potential of the region. It is also necessary to consider the impact of factors such as electrification and new material applications on energy intensity. Different industries need to establish independent intensity prediction models.

4. Departmental energy consumption forecast

Based on the total energy consumption forecast, combined with industrial development planning and industrial structure optimization goals, the energy needs of each department can be reasonably predicted. Focus on providing guidance on cleaner production in energy-intensive industries.

5. Scenario comparison

It is recommended to design high energy efficiency improvement scenarios, low energy efficiency improvement scenarios, as well as high non-fossil energy substitution scenarios and low substitution scenarios. Compare carbon emissions and energy consumption indicators under each scenario, and analyze key measures to achieve carbon neutrality.

Combined formula:

Population prediction model
Linear regression model:

Population P = a + b*year

logistic model:

P = P_m / [1 + exp(-k(year-t))]

2. Per capita energy consumption model

Per capita energy consumption E_p = c * GDP_p^d

3. Energy intensity model

Energy intensity I = a * exp(-b*year)

4. Departmental energy consumption prediction model

Energy consumption of the i-th department E_i = E_total * r_i

5. Carbon emissions forecast

CO2 = ∑(E_i * f_i)

Among them: P_m: upper limit of population saturation value k, t: logistic model parameters E_p: energy consumption per capita GDP_p: GDP per capita I: energy consumption intensity E_i: energy consumption of the i-th department E_total: total energy consumption r_i: energy consumption proportion of the i-th department f_i: Carbon emission factor of the i-th department

Code:

# 导入库
import pandas as pd
from scipy.optimize import curve_fit
 
# 人口预测
p_data = df[['年份','人口']]
 
# 线性回归
def linear(x, a, b):
    return a + b*x
 
pars, cov = curve_fit(linear, p_data['年份'], p_data['人口'])
a, b = pars
predict_p = [linear(x, a, b) for x in range(2025,2061)]
 
# Logistic回归
def logistic(x, p_m, k, t):#见完整版

Question 3:
Regional dual carbon (carbon peak and carbon neutrality) goals and path planning methods

Build a multi-scenario framework
and set up multiple development scenarios such as no-intervention scenario and carbon-neutral scenario. Determine parameters such as economic growth, energy efficiency improvement, and the proportion of non-fossil energy in each scenario.

2. Carbon emission prediction model

CO2 = Σ(Ei * fi)

Ei = Etotal * ri

Among them, Ei represents the energy consumption of department i, fi represents the corresponding carbon emission factor, and ri represents the proportion of energy consumption.

3. Determination of departmental energy consumption

Industry: Ei = VAi * (1-η1) * η2

Building: Ei = VAi * (1-η1) * η2

VAi represents the added value of the department, eta1 represents the management energy saving rate, and eta2 represents the technical energy saving rate.

4. Non-fossil energy replacement

Adjust the carbon emission factor fi and set up different alternative scenarios.

5. GDP constraints

∑VAi = GDP

The sum of added value is constrained to be the total GDP.

6. Scenario comparison

Compare the results of carbon emissions, proportion of non-fossil energy, etc. under different scenarios

In detail,

Construct a multi-scenario framework
. You can set up 3-5 scenarios, such as baseline scenario, aggressive scenario, conservative scenario, etc.
Determine the core parameters of each scenario: economic growth rate, energy efficiency improvement goals, and non-fossil energy substitution goals.
Collect relevant domestic and foreign research reports. Reasonable value range of comprehensive judgment parameters
2. Carbon emission prediction model

Emissions are determined by the energy consumption and emission factors of each department.
Departmental energy consumption depends on total allocation and structural optimization.
Emission factors are reduced by increasing non-fossil substitution
. 3. Determination of departmental energy consumption

Consider management of energy conservation and technological progress to promote energy efficiency improvement.
Collect industry case studies to determine energy saving potential
. 4. Non-fossil energy replacement

Different scenarios can set different alternative goals. Alternative
paths can be achieved through power replacement, hydrogen energy application, biomass utilization, etc.
5. GDP constraints

The sum of added value of departments is equal to the total GDP.
It is necessary to balance the development speed of departments to achieve stable economic growth
6. Scenario comparison

Compare differences in carbon emissions and non-fossil energy proportions,
analyze the feasibility and policy implications of different scenarios, and
propose relevant decision-making suggestions.

# 导入库
import pandas as pd
from scipy.optimize import curve_fit
 
# 人口预测
p_data = df[['年份','人口']]
 
# 线性回归
def linear(x, a, b):
    return a + b*x
 
pars, cov = curve_fit(linear, p_data['年份'], p_data['人口'])
a, b = pars
predict_p = [linear(x, a, b) for x in range(2025,2061)]
 
# Logistic回归
def logistic(x, p_m, k, t):#见完整版

See my answer for more complete versions~

(5 private messages/2 messages) How to evaluate the 2023 Mathematical Modeling Research Competition? - Zhihu(zhihu.com)

Guess you like

Origin blog.csdn.net/qq_25834913/article/details/133156776