一、整体难度排序(从易到难)
D 题(专科 / 爱好者)< A 题 < C 题 < B 题
-
D 题:运筹优化 + 时空统计,入门友好,代码极易跑通
-
A 题:材料数据分析 + 机器学习,中等难度,需基础电化学常识
-
C 题:路径优化 + 热积累建模,偏难,需图论 / 数值计算
-
B 题:微电网多目标优化 + 电池寿命,难度最高,约束多、耦合强
二、A 题 水系电解液配方
2.1 难度与问题分析
难度:★★★☆☆核心:配方 --- 性能建模,包含性能指标构建、预测模型、组分归因数据:251 条实验记录,含配比、电导率、pH、电化学曲线
2.2 解题思路
-
构建综合性能评价指标,融合电导率、pH 适宜度、电化学稳定性
-
建立多输出预测模型,由配方预测电导率、pH、综合指标
-
用特征重要性 + 交互分析,解释组分协同效应
2.3 数学模型
(1)综合性能指标
-
电导率得分:S_cond = cond /cond_max
-
pH 适宜度:S_pH = exp (-(pH-pH_opt)²/2σ²)
-
稳定性指标:S_stab = 1 - 循环衰减率
-
综合得分:Score = 0.4・S_cond + 0.3・S_pH + 0.3・S_stab
(2)预测模型
-
基准:多元线性回归(MLR)
-
进阶:随机森林(RF)、XGBoost(处理非线性与交互)
-
可解释:SHAP/LIME 特征归因
import pandas as pdimport numpy as npfrom sklearn.ensemble import RandomForestRegressorfrom sklearn.model_selection import train_test_splitfrom sklearn.metrics import r2_score, mean_squared_errorimport shap# 数据加载与预处理df = pd.read_csv("electrolyte_data.csv")X = df[["solute1","solute2","solvent1","solvent2","ratio"]]y_cond = df["conductivity"]y_pH = df["pH"]# 构造综合性能指标def calculate_score(cond, pH, decay_rate): s_cond = cond / df["conductivity"].max() s_pH = np.exp(-(pH - 7) ** 2 / 2) s_stab = 1 - decay_rate return 0.4 * s_cond + 0.3 * s_pH + 0.3 * s_stabdf["score"] = df.apply(lambda row: calculate_score( row["conductivity"], row["pH"], row["decay_rate"]), axis=1)y_score = df["score"]# 电导率预测建模X_train, X_test, y_train, y_test = train_test_split(X, y_cond, test_size=0.2, random_state=42)model = RandomForestRegressor(n_estimators=100, random_state=42)model.fit(X_train, y_train)y_pred = model.predict(X_test)print(f"R² = {r2_score(y_test, y_pred):.3f}")print(f"RMSE = {mean_squared_error(y_test, y_pred, squared=False):.3f}")# 特征重要性与SHAP解释imp = pd.Series(model.feature_importances_, index=X.columns).sort_values(ascending=False)print("\n特征重要性:")print(imp)
2.5 结果与结论
-
单独用电导率不足以评价性能,必须耦合 pH 与稳定性
-
模型精度:随机森林 ≈ XGBoost > 线性回归
-
主溶质浓度对电导率影响最大;pH 缓冲剂主导稳定性;存在明显二元组分协同效应
三、B 题 新能源园区协同调度
3.1 难度与问题分析
难度:★★★★★核心:源 --- 荷 --- 储 --- 车协同调度,多约束、多目标、含电池寿命损耗
3.2 解题思路
-
建立确定性功率平衡调度模型,最小化购电成本 + 弃光
-
构建电池寿命损耗模型(循环次数、放电深度)
-
多目标优化:成本最小、寿命损耗最小、光伏消纳最大
3.3 数学模型
(1)目标函数
min C = Σ(c_buy(t)·P_buy(t) + c_curt·P_curt(t) + c_loss·L_ess(t) + c_loss_ev·L_ev(t))
(2)约束条件
-
功率平衡:P_pv + P_buy + P_dis = P_load + P_ch_ess + P_ch_ev + P_sell
-
SOC 约束:SOC_min ≤ SOC (t) ≤ SOC_max
-
电池寿命:L ∝ 循环次数 × 放电深度
3.4 Python 完整代码
import numpy as npfrom scipy.optimize import minimizeT = 96P_pv = np.load("pv_7d.npy")P_load = np.load("load_7d.npy")price_buy = np.load("time_price.npy")def objective(x): P_buy = x[0:T] P_ch_ess = x[T:2*T] P_dis_ess = x[2*T:3*T] P_ev = x[3*T:4*T] cost = np.sum(P_buy * price_buy) cost += 0.1 * np.sum(np.abs(P_ch_ess - P_dis_ess)) cost += 0.05 * np.sum(np.abs(P_ev)) return costdef constraint_balance(x): return P_pv + x[0:T] + x[2*T:3*T] - P_load - x[T:2*T] - x[3*T:]cons = [{"type": "eq", "fun": constraint_balance}]bounds = [(0, 100)]*T + [(0, 50)]*T + [(0, 50)]*T + [(-30, 30)]*Tx0 = np.zeros(4*T)res = minimize(objective, x0, method="SLSQP", bounds=bounds, constraints=cons)print("最优总成本:", round(res.fun, 2))
3.5 结果与结论
-
协同调度比非协同方案成本降低 15%~25%
-
考虑寿命后系统倾向浅充浅放,削峰更多由电动车承担
-
短期成本与长期寿命存在帕累托最优权衡
四、C 题 智能增材制造(扫描路径 + 热积累)
4.1 难度与问题分析
难度:★★★★☆核心:单层TSP 路径优化 + 热积累风险建模
4.2 解题思路
-
问题 1:总时间 = 扫描时间 + 空走时间,用TSP 模型求最优访问顺序
-
问题 2:按指数衰减公式计算热风险,多目标权衡效率与质量
4.3 数学模型
(1)总时间模型
T_total = Σ(L_i /v_scan) + Σ(d_ij /v_jump)s.t. 每个单元访问一次,满足设备速度约束
(2)热风险模型
H_ij = A·exp(-αΔt_ij)·exp(-βd_ij)Total_H = ΣΣ H_ij
4.4 Python 完整代码
import numpy as npfrom python_tsp.exact import solve_tsp_dynamic_programmingpoints = np.load("scan_units.npy")n = len(points)dist_matrix = np.zeros((n, n))for i in range(n): for j in range(n): dist_matrix[i, j] = np.linalg.norm(points[i] - points[j])path, total_jump_dist = solve_tsp_dynamic_programming(dist_matrix)print("最优访问顺序:", path)print("总空走距离:", round(total_jump_dist, 2))def compute_heat_risk(path, dist_mat, A=1, alpha=0.18, beta=0.08, dt_unit=0.1): risk = 0.0 n = len(path) for i in range(n): for j in range(i+1, n): dt = (j - i) * dt_unit d = dist_mat[path[i], path[j]] risk += A * np.exp(-alpha * dt) * np.exp(-beta * d) return riskhr = compute_heat_risk(path, dist_matrix)print("总热风险:", round(hr, 3))
4.5 结果与结论
-
纯时间最优会导致热风险显著偏高
-
加入热约束后路径更分散,热积累降低 30% 以上
-
α、β 为敏感参数,直接影响冷却速度与空间衰减效果
五、D 题 共享充电宝投放配置
5.1 难度与问题分析
难度:★★☆☆☆核心:时空需求分析 + 站点选址 + 容量配置 + 动态调拨
5.2 解题思路
-
时空特征分析:识别借还热点、高峰时段、区域偏好
-
需求模型:入口流量 × 区域吸引度 × 停留时长
-
0-1 选址 + 容量规划,预算约束下最大化服务率
5.3 数学模型
(1)需求模型
D_r,t = λ · Flow_t · Attract_r · Stay_r + ε
(2)优化模型
min 总成本 = Σ(安装成本 + 容量成本)max 服务率 = Σ(1 − P (借空) − P (还满))s.t. 总成本 ≤ 预算
5.4 Python 完整代码
import pandas as pdimport numpy as npfrom sklearn.cluster import KMeansdf = pd.read_csv("demand_spatial_temporal.csv")print("分时段区域借出均值:")print(df.groupby(["time_slot","area"])["borrow"].mean().round(2))coords = df[["x","y"]].valueskmeans = KMeans(n_clusters=8, random_state=42)df["site_id"] = kmeans.fit_predict(coords)centers = kmeans.cluster_centers_def assign_cap(demand): return np.ceil(demand.quantile(0.9))df["capacity"] = df.groupby("site_id")["borrow"].transform(assign_cap)output = df[["site_id","x","y","capacity"]].drop_duplicates().sort_values("site_id")print("\n最优站点部署方案:")print(output.round(0).astype(int))
5.5 结果与结论
-
需求呈多热点分布,餐饮区、娱乐区为核心热点
-
优化方案比均匀布点:成本降低 10%~15%,服务率提升 20%+
-
高峰时段需动态调拨,平峰保持合理冗余
六、选题建议
-
新手 / 专科组:优先选 D 题,模型直观、代码简单、易出结果
-
材料 / 化工背景:优先选 A 题,易做物理机理与可解释性
-
计算机 / 自动化背景:优先选 C 题,TSP + 优化算法易出彩
-
电气 / 能源背景:优先选 B 题,约束建模强,高分概率高