In-depth analysis of the 2023 Tianfu Cup National College Student Mathematical Modeling Competition and "Room Temperature Superconductivity Special Contest"

Problem restatement

Insert image description here

In recent years, research on room temperature superconducting materials has brought important breakthroughs in the field of energy transmission and storage. Research on LK66 claims that its material can achieve zero-resistance transmission of current at room temperature. At the same time, the use of renewable energy continues to grow, but transmission and storage remain challenging due to its intermittency and instability. This competition aims to explore how to apply room temperature superconducting materials to renewable energy transmission to achieve efficient and stable energy transmission and storage. Players need to design mathematical models and optimization plans based on given scenarios to solve the following problems:

Q1) How to reasonably divide the transmission paths of room temperature superconducting materials to minimize the total energy loss?

Q2) On the premise of ensuring stable operation of the power grid, how to adjust the transmission plan of renewable energy to maximize transmission efficiency?

Q3) How to develop a comprehensive optimization strategy to balance economic and environmental benefits while considering the production cost of room temperature superconducting materials and the cost of renewable energy power generation?

Question 1: How to reasonably divide the transmission paths of room temperature superconducting materials to minimize the total energy loss? Mathematical model to rationally divide the transmission paths of room temperature superconducting materials to minimize the total energy loss:

Symbol Description:

i , j i, j i,j : Index of power generation site
ttt : Index of time period
dij d_{ij}dij: Power generation site iii to sitejjThe transmission distance of j
is E it E_{it}Eit: time period ttPower generation sitewithin tiiEnergy generated by i
P ijt P_{ijt}Pij t: time period ttfrom siteii within ti transfer to sitejjThe energy of j
E ijt E_{ijt}Eij t: time period ttfrom siteii within ti transfer to sitejjThe total energy of j (considering transmission loss)
η \etaη : Transmission efficiency of room temperature superconducting material
P max P_{\text{max}}Pmax: Maximum transmission power of room temperature superconducting material
C prod C_{\text{prod}}Cprod: Production cost of room temperature superconducting materials
C renew C_{\text{renew}}Crenew: Renewable energy generation cost
C trans C_{\text{trans}}Ctrans
: The constraints and quantification of power grid transmission cost include:
Objective function:
Minimize ∑ i , j , t ( E it − E ijt ) + C trans \text{Minimize } \sum_{i,j,t} (E_{it} - E_{ijt}) + C_{\text{trans}}Minimize i,j,t(EitEij t)+Ctrans

The energy generated by each power generation site is equal to the total energy transmitted to other sites∑
j P ijt = E it , ∀ i , t \sum_j P_{ijt} = E_{it}, \quad \forall i, tjPij t=Eit,i,t

The energy transmitted by each power generation site cannot exceed the energy it generates in that time period
P ijt ≤ E it , ∀ i , j , t P_{ijt} \leq E_{it}, \quad \forall i, j, tPij tEit,i,j,t

The energy of each transmission path cannot exceed the maximum transmission power of the room temperature superconducting material
∑ t P ijt ≤ P max , ∀ i , j \sum_t P_{ijt} \leq P_{\text{max}}, \quad \forall i ,jtPij tPmax,i,j

The total transmission energy cannot exceed the maximum transmission power ∑ i , j , t P ijt ≤ P max \sum_{i,j,t} P_{ijt} \leq P_{\text{max}} under the limitation of room temperature superconducting materials
i,j,tPij tPmax

Considering the transmission efficiency of room temperature superconducting materials, calculate from site iii to sitejjjEquivalent E ijt = ( 1 − η ) dij ⋅ P ijt , ∀ i , j , t E_{ijt} = (1 - \eta)^{d_{ij}} \cdot P_{ijt}, \quad
\forall i, j, tEij t=(1h )dijPij t,i,j,t

The energy of each transmission path must be a non-negative number
P ijt ≥ 0 , ∀ i , j , t P_{ijt} \geq 0, \quad \forall i, j, tPij t0,i,j,t

We can use the perspective of comprehensive analysis to solve the problem using linear programming and cost flow.

Linear programming is a mathematical optimization method suitable for solving problems with linear objective functions and linear constraints. In this case, most of the objective function and constraints are linear, but due to the presence of integer variables (such as transmission power) we need to use mixed integer linear programming.

The following are the general steps for using mixed integer linear programming to find the optimal transmission path solution:

Establish the objective function: Express the objective function as the sum of energy loss and transmission cost that needs to be minimized.
Establish constraints: Convert energy balance, transmission power limits and other constraints into linear constraints based on the constraints in the problem description.
Define variables: Define variables that need to be optimized, such as transmission power.
Choose an optimization algorithm: Choose an appropriate mixed integer linear programming solver, such as Gurobi, CPLEX, etc.
Solve: Enter the objective function, constraints, and variables into the solver and run the solver to find the optimal transmission path scheme that minimizes the total energy loss and transmission cost.
The min-cost max-flow algorithm can be used to solve problems in flow networks, where the traffic flowing in the network needs to reach a maximum value with a minimum total cost. In the corresponding scenario, the power generation site is regarded as a node in the network, the transmission path is regarded as an edge, the flow rate represents energy transmission, and the cost represents the transmission cost.

Specifically, the corresponding brief steps are:

Build a flow network: Create a directed graph where each power generation site is a node and the transmission paths are directed edges. The capacity of each edge is the maximum transmission power of the room temperature superconducting material, and the cost is the transmission cost.
Define sources and sinks: Connect a virtual source point to all renewable energy generation sites, and connect all power generation sites to a virtual sink point. This way, you can transform the problem into finding the minimum-cost maximal flow from a source to a sink in a flow network.
Establish the objective function: The objective is to maximize the flow from the source to the sink while minimizing the total cost.
Solve the minimum cost maximum flow: Use the minimum cost maximum flow algorithm, such as Dijkstra algorithm, Bellman-Ford algorithm, etc., to find the minimum cost maximum flow from the source point to the sink point.
Decoding result: Decode the minimum-cost maximum flow to obtain the transmission path and corresponding energy transmission.
We conduct comprehensive analysis based on linear programming and cost flow to select and process allocation planning.

import networkx as nx
import pulp

# Given data 
num_generators = 4
num_time_periods = 3
P_max = 50 # Maximum transmission power
eta = 0.95 # Transmission efficiency
E = [
  [10, 15, 20],
  [25, 20, 15],
  [15, 10, 5],
  [20, 25, 15]
]
d = [
  [0, 20, 25, 0],
  [20, 0, 15, 30],
  [25, 15, 0, 25],
  [0, 30, 25, 0]
]

# Create a directed graph
G = nx.DiGraph()

P = {}  # Dictionary to hold variables
for i in range(num_generators):
    for j in range(num_generators):
        for t in range(num_time_periods):
            P[(i, j, t)] = pulp.LpVariable(f"P_{i}_{j}_{t}", lowBound=0, upBound=P_max, cat=pulp.LpContinuous)

# Define objective function
objective = pulp.lpSum((E[i][t] - (1 - eta) ** d[i][j] * P[(i, j, t)]) for i in range(num_gene## rators) for j in range(num_generators) for t in range(num_time_periods))
model += objective

# Add constraints
for i in range(num_generators):
    for t in range(num_time_periods):
        model += pulp.lpSum(P[(i, j, t)] for j in range(num_generators)) == E[i][t]

# Add transmission power limits
for i in range(num_generators):
    for j in range(num_generators):
        model += pulp.lpSum(P[(i, j, t)] for t in range(num_time_periods)) <= P_max

# Solve the problem
model.solve()

#完整详细请进入内容里观看


# Add nodes for generators and sink/source
for i in range(num_generators):
  G.add_node(f"generator_{i}")
G.add_node("source")
G.add_node("sink")

# Add edges with capacities and costs
for i in range(num_generators):
  G.add_edge("source", f"generator_{i}", capacity=E[i][0], weight=0) # Replace with appropriate time period
  G.add_edge(f"generato r ## _{i}", "sink", capacity=E[i][0], weight=0)  # Replace with appropriate time period
  for j in range(num_generators):
    if i != j:
      for t in range(num_time_periods):
        cost = (1 - eta) ** d[i][j] * E[i][t] * C_trans # Calculate cost based on transmission efficiency
        G.add_edge(f"generator_{i}", f"generator_{j}", capacity=P_max, weight=cost) # Add edge with capacity and cost

# Find minimum cost maximum flow
flowCost, flowDict = nx.netwo## rk_simplex(G)

# Print results
print("Total cost:", flowCost)
for edge, flow in flowDict.items():
  print(edge, flow)

#完整详细请进入内容里观看 进行了部分打码处理w

Details can be found at:

Complete ideas + articles: In-depth analysis of the 2023 Tianfu Cup National College Student Mathematical Modeling Competition and "Room Temperature Superconducting Special Contest" - CSDN Blog

Guess you like

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