A Post-Disaster Coordinated Recovery Method and System for Coupled Power-Transportation Systems via Vehicle-Grid Interaction
By constructing a spatiotemporal energy-transport equilibrium model and a power distribution network operation model, and combining Markov decision processes and offline reinforcement learning, the problem of coordinating the movement, charging, and discharging behavior of electric vehicles after disasters was solved, improving the recovery and adaptability under multiple disaster scenarios and achieving rapid recovery.
Patent Information
- Application Number
- CN202610937765.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-11-10
AI Technical Summary
Existing methods are insufficient to effectively coordinate the movement, charging, and discharging behavior of electric vehicles under post-disaster conditions, and their generalization ability is insufficient in multi-disaster scenarios, failing to meet the requirements for rapid recovery.
A collaborative recovery method for vehicle-grid interaction in a coupled power-transportation system after a disaster is constructed. By building a spatiotemporal energy-transportation equilibrium model and a distribution network operation model, and combining Markov decision processes and offline reinforcement learning, the method uniformly describes the departure time, route selection, and charging and discharging behavior of electric vehicles. It utilizes offline data to complete cross-disaster mission migration and supports distribution network recovery through vehicle-grid interaction.
It enables unified modeling of electric vehicle mobile energy resources under post-disaster conditions, improves the adaptability of recovery strategies to unseen disaster scenarios, and can simultaneously reflect the impact of traffic accessibility and power constraints on mobile energy resources, supporting rapid recovery.
Smart Images

Figure CN123070516A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of power system resilience recovery, vehicle-grid interaction control and intelligent optimization technology, and specifically relates to a post-disaster coupled power-transportation system vehicle-grid interaction collaborative recovery method. Background Technology
[0002] Extreme natural disasters can simultaneously damage power and transportation systems, causing line faults, reduced transformer capacity, decreased road capacity, unavailability of charging facilities, and widespread power outages. With the increasing number of electric vehicles (EVs), they can participate in disaster recovery as mobile energy storage resources through vehicle-to-grid (V2G) interaction. Therefore, coordinating the movement, charging, and discharging of EVs under the coupled conditions of damaged power grids and transportation networks has become a key issue in disaster resilience recovery.
[0003] Existing research on coupled power-transportation recovery has considered electric vehicle route planning, wireless vehicle-to-grid (V2G) interaction, distribution network reconfiguration, and mobile energy storage support. Some studies also jointly model transportation networks and distribution networks to analyze the spatiotemporal availability of V2G resources under disaster conditions. Reinforcement learning methods have also been used for grid recovery, frequency regulation, and post-disaster control to address complex sequential decision-making problems.
[0004] However, existing methods still suffer from two prominent problems. First, traditional traffic assignment models primarily focus on spatial path allocation, typically describing travel demand and charging behavior in a static or temporal manner. This makes it difficult to describe the interconnected adjustments made by electric vehicle users to departure times, congestion avoidance, charging queues, and charging / discharging behaviors under post-disaster conditions. Second, existing reinforcement learning methods are mostly trained in single scenarios or fixed environments, making them prone to overfitting to specific damage patterns and lacking generalization ability in new disaster scenarios. Furthermore, post-disaster environments are not suitable for large-scale online exploration, thus failing to directly meet the rapid recovery requirements under multi-disaster scenarios.
[0005] Therefore, there is a need for a post-disaster collaborative recovery method that can uniformly describe the spatiotemporal movement and energy interaction of electric vehicles, and can utilize offline data to complete cross-disaster mission migration. Summary of the Invention
[0006] The technical problem to be solved by this invention is: how to perform integrated transportation-electricity modeling of electric vehicle mobile energy resources in the post-disaster coordinated recovery of coupled power and transportation systems, so as to complete the post-disaster coordinated recovery of power and transportation.
[0007] To address the aforementioned technical problems, this invention provides a post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery method, comprising:
[0008] S1: Construct disaster tasks, and describe each disaster scenario as task parameters. The task parameters include the extended origin-end demand set, the conditions of damage to the transportation network, the conditions of damage to the power distribution network, and the time-varying renewable energy output.
[0009] S2: Construct a spatiotemporal energy-traffic equilibrium model. Under the condition of traffic network damage, model the traffic network as a directed graph, and use the extended origin-destination demand as input. Solve the extended path flow, actual departure demand and aggregate charging and discharging power of each charging station through the main problem and path sub-problems.
[0010] S3: Construct a distribution network operation model. Under the conditions of distribution network damage and time-varying renewable energy output constraints, solve the optimal power flow based on the distribution power flow model, and input the aggregated charging and discharging power of the charging station as the time-varying node power into the distribution network operation model.
[0011] S4: Construct a task-conditional Markov decision process, using fast charging and slow charging prices as action inputs, and couple the spatiotemporal energy and transportation equilibrium model with the power distribution network operation model to form a state transition and reward feedback.
[0012] S51: Based on offline transfer data, learn low-dimensional vector representations that characterize the features of different disaster tasks, and use a transfer-level encoder and a task-level aggregation module to encode the transfer sequence of each disaster task to obtain the task embedding;
[0013] S6. The task is embedded and input into the policy network and the value network respectively. Task-conditional offline reinforcement learning is performed on the policy network and the value network. The policy network outputs the electricity price action and the value network evaluates the value of the input electricity price action.
[0014] S7. In the online state, the task embedding is inferred from the context transfer data for the current task. Then, the trained policy network outputs the fast charging and slow charging price control signals for each time period and each station under the task embedding condition, as well as the decision schemes that affect the departure, route and charging and discharging of electric vehicles, and completes the power distribution network restoration through vehicle-to-grid interaction.
[0015] The aforementioned post-disaster coupled power-transportation system vehicle-grid interactive collaborative recovery method further includes, after step S5:
[0016] S52. Construct reward perturbation negative samples and perform contrastive representation learning on the transfer encoder to ensure that the transfer representations in the same task remain consistent in the representation space, and to separate the transfer representations corresponding to the reward perturbation negative samples from the original task representations in the representation space; the contrastive representation learning refers to constructing positive and negative samples to enable the model to learn to distinguish the representation features of the same task from those of different tasks.
[0017] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interactive collaborative recovery method, step S1 abstracts the disaster scenario into unified task parameters. , is represented as:
[0018] (1)
[0019] in, For the set of all extended origin-end pairs; To expand the origin and destination demand set, each component For the beginning and end Total travel demand within the recovery timeframe, expressed in vehicles; It is a set of parameters for traffic network damage, used to characterize the reduced traffic capacity and outage status of damaged roads; This is a set of parameters representing damage to the distribution network, used to characterize the increased impedance of damaged branches and the degradation of transformer capacity. For the set of distribution network nodes, Let be a set of discrete time periods, with a time period length of . ; For nodes During the period Renewable energy output; mission parameters It serves as the input for the subsequent main traffic assignment problem, path sub-problem, and distribution network operation model.
[0020] In the aforementioned post-disaster coupled power-transportation system vehicle-network interaction and collaborative recovery method, step S2 involves modeling the transportation network as a directed graph. ,node Indicates position During discrete time periods The state is represented by a road arc, which indicates the movement of a vehicle on the road, and a time arc, which indicates the vehicle's presence, waiting, charging, or discharging. Extended origin-destination demand is represented as... ; For extended path traffic Path-induced traffic The main problem includes the following constraints:
[0021] (2)
[0022] (3)
[0023] (4)
[0024] In equations (2)-(4): For a set of nodes in a spacetime directed graph, Let be a set of arcs, containing road travel arcs and dwell time arcs, both of which are sets; extend the origin and destination vectors. middle For the starting node, For the expected departure time, for scalar, For the endpoint node, This is the initial state of charge; To expand the entire set of origin and destination pairs; For the beginning and end The set of feasible expansion paths, each expansion path corresponding to a combination of departure time, spatial path, and charging / discharging scheme. For the beginning and end A set of spatial paths; A set of discrete time periods; For extended paths Traffic on the internet; For time period In spatial path Induced traffic on the platform; For the beginning and end Total travel demand; This is a binary indicator parameter used to indicate the extended path. Is it during the time period? Corresponding spatial path The queuing time at fast charging stations and the travel time on the road respectively meet the following requirements:
[0025] (5)
[0026] (6)
[0027] In equations (5)-(6): For fast charging station nodes, For the set of road arcs; For fast charging stations During the period Queuing time For roads During the period Travel time; For fast charging stations Free queuing time, For roads Free-flow travel time; For time period Entering the fast charging station The number of vehicles, For time period the way Traffic flow on the road; For fast charging stations service capabilities For roads Traffic capacity; The M / M / 1 queuing coefficient; 0.15 and 4 in equation (6) are the standard BPR function constants;
[0028] Extended Path The generalized cost of travel is expressed as:
[0029] (7)
[0030] (8)
[0031] In equations (7)-(8): For extended paths The generalized cost of travel For extended paths The energy exchange and time zone costs; This is a set of slow charging station nodes; This is a binary access indicator parameter, representing the extended path. Is it during the time period? Visiting a charging station ; This is a binary access indication parameter, representing the extended path. Is it during the time period? Passing the road ; It is a time value factor used to convert travel time and queuing time into monetary costs; and Fast charging station and slow charging station During the period Electricity price; and Fast charging and slow charging stations respectively During the period The aggregated exchange energy, with negative values for slow charging representing vehicle-to-grid interaction discharge, is related to the aggregated power in the state vector. ,satisfy ; To account for the penalty for departure time deviation, the user equilibrium condition is:
[0032] (9)
[0033] The total system travel cost under user equilibrium is:
[0034] (10)
[0035] In equations (9)-(10): For the beginning and end The equilibrium generalized travel cost is equivalent to the minimum generalized travel cost of the origin-destination pair under the equilibrium solution; Equation (9) indicates that only the minimum cost extended path can carry non-zero traffic.
[0036] In the path subproblem, the minimum cost spatiotemporal energy expansion path is obtained by minimizing the generalized travel cost, where the decision variables are... Choose a binary variable for the arc:
[0037] (11)
[0038] And it satisfies the state of charge balance and charging constraints:
[0039] (12)
[0040] (13)
[0041] (14)
[0042] (15)
[0043] (16)
[0044] For the beginning and end Generalized travel costs corresponding to path subproblems; For the beginning and end In the arc Head node arrival time The corresponding state of charge; For the beginning and end In the arc Tail node departure time The corresponding state of charge; For the beginning and end At the node Time period The state of charge; Represents a node During the period Slow charging exchanges energy; For nodes In the arc Departure time Corresponding fast charging energy exchange;
[0045] In equations (12)-(16): For the set of arcs in a spatiotemporal network, For arc elements, there are road travel arcs or dwell-charge-discharge arcs, with the endpoints being the tail node and head node of the arc, respectively; Choose a binary variable for the arc. Indicates the beginning and end points Extended path selection arc ; A binary indicator parameter, representing the arc During the period Does it pass through roads? ; Use indicator variables for fast charging and associate them with fast charging energy exchange via equation (15); It serves as an auxiliary relaxation variable for the equilibrium of the charged state; and The outer layer has fixed road traffic and fast charging traffic. This refers to the actual departure time, where the specific times at both ends of the travel arc are recorded as the departure times at the arc tails. Arrival time of the arc head , The desired departure time; For the beginning and end At the node Time period The state of charge, and These are the initial charged state variables and the initial charged state parameters, respectively. This is the upper limit of battery capacity. The minimum safe state of charge ratio; For arc The physical distance between the two endpoints. Energy consumption coefficient per unit distance; and They are nodes During the period Fast charging and slow charging exchange energy; a negative value for slow charging indicates vehicle-to-grid (V2G) interaction and discharge. For nodes The maximum fast charging power. and They are nodes During the period The lower and upper limits of slow charging power; a negative lower limit indicates that discharge is allowed. The length of a single time period; It is a positive number.
[0046] The aforementioned post-disaster coupled power-transportation system vehicle-network interactive collaborative recovery method, in step S3, characterizes the post-disaster radial distribution network operation based on the DistFlow optimal power flow model. Radial means that the distribution network operates in a tree-like or radial topology, representing consideration of branch power flow constraints, voltage amplitude constraints, load reduction decisions, and electric vehicle power reduction decisions. Line faults are equivalently disconnected by increasing the impedance of the corresponding branch, and transformer damage is characterized by reducing the capacity limit. The aggregated charging and discharging power of each charging station output by the spatiotemporal energy traffic balance model on the traffic side in step S2 is used as the time-varying node injection quantity and input into the distribution network operation model, thereby coupling the balance solution results on the traffic side to the power side.
[0047] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interactive collaborative recovery method, in step S4, for each disaster task... The recovery process is described as a task-conditional Markov decision process:
[0048] (17)
[0049] in, For the task The corresponding Markov decision process; For state space, For the action space, As a state transition kernel, For the reward function, mapped as , It is the set of real numbers. Discount factor;
[0050] The state is defined as:
[0051] (18)
[0052] The actual departure requirements are determined by the following formula:
[0053] (19)
[0054] Action is defined as:
[0055] (20)
[0056] And satisfy:
[0057] (twenty one)
[0058] The state transition satisfies:
[0059] (twenty two)
[0060] The instant reward is:
[0061] (twenty three)
[0062] The costs of the transportation network and the distribution network are as follows:
[0063] (twenty four)
[0064] (25)
[0065] In equations (18)-(25): For time period The state vector, , Index the sum of the demand dimension, charging / discharging power dimension, and the power flow-voltage dimension of the distribution network in the current time period for three adjacent time periods. Offset of the status window; For time period The action vector, The components are assembled in the order of fast charging first, then slow charging. , , and The normalized price control component has a value range of [value range missing]. ; For time period Start and End Pairs Actual starting point needs; and Fast charging and slow charging stations respectively During the period Aggregation power, and energy exchange satisfy ; branch road During the period The meritorious trend, For nodes During the period The voltage amplitude; and The actual electricity price for fast charging and slow charging after denormalization; This aggregates all charging stations. and These are the base numbers for the fast charging and slow charging station sets, respectively. For indicator functions, For extended paths The corresponding actual departure time; For the task The state transition conditional probability under the given condition is implicitly given by solving the simultaneous solution of traffic equilibrium and power flow of the distribution network. For time period The instant reward, normalized sum of negative costs; and These are the normalized benchmark values for the costs of the power distribution network and the transportation network, respectively, used to align the two cost magnitudes. For time period The cost of the transportation network This is the total travel cost for that period of time; For time period Distribution network costs For the set of distribution network nodes, This is a set of load classifications for non-electric vehicles. and These are the load reduction penalty weight and the electric vehicle power reduction penalty weight, respectively. For the first Level of load importance coefficient; For nodes No. The amount of load reduction at the level, For the site During the period The power reduction of electric vehicles, the task condition Markov decision process takes price control as the action input, and solves the state transition and reward feedback by combining traffic equilibrium and power distribution network operation.
[0066] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interaction and collaborative recovery method, in step S51, during the task representation learning process using offline data, for the task... The offline dataset is represented as:
[0067] (26)
[0068] Wherein, a single transfer is denoted as The transfer-level encoder and the task-level aggregation module are respectively represented as: and The transfer-level encoder satisfies:
[0069] (27)
[0070] Task embedding satisfies:
[0071] (28)
[0072] Task-level aggregation using attention pooling is represented as follows:
[0073] (29)
[0074] In equations (26)-(29): For the task Offline transfer dataset, For a single transferred sample; For transfer level encoders, This is a task-level aggregation module; For the task No. The transition-level embedding of each transition, dimension The encoder outputs the dimension. For the task Task-level embedding; For the context length, and the global time period set in equation (4) distinguish; This is the attention weight matrix. For attention query vectors, For attention hidden layer dimensions; For the task The Middle The attention weights of each transition in the task embedding, and .
[0075] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interaction and collaborative recovery method, step S52 involves constructing reward perturbation negative samples and performing comparative representation learning for the original transfer... Inconsistent task transitions are constructed by adding Gaussian noise to the reward dimension:
[0076] (30)
[0077] (31)
[0078] The original transfer and the reward perturbation transfer are processed by the shared transfer-level encoder to obtain:
[0079] (32)
[0080] Define the normalization term as:
[0081] (33)
[0082] In equations (30)-(33): For original instant rewards, As a reward after the disturbance; For independent and identically distributed Gaussian perturbations, the variance is... This is the perturbation variance hyperparameter; To reward the inconsistent task transfer constructed after the perturbation; This represents a positive sample representation of another original transfer within the same task. To reward the transfer of disturbances One negative sample is represented; Cosine similarity, taking values... ); To compare and learn the temperature coefficient; This is the normalized denominator term for the InfoNCE loss;
[0083] The InfoNCE loss of the transfer-level encoder is defined as follows:
[0084] (34)
[0085] in, To compare learning loss.
[0086] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interactive collaborative recovery method, step S6 involves offline reinforcement learning based on task conditions; the union of all offline task data is then set as... Embed the task Input policy network and value network:
[0087] (35)
[0088] The objective of offline reinforcement learning is defined as:
[0089] (36)
[0090] The action value network minimizes the Bellman training error, as follows:
[0091] (37)
[0092] The conservative Q-learning regularization term is represented as:
[0093] (38)
[0094] The symbols in equations (35) to (38) are defined as follows: Represents the union of all offline datasets for all tasks; Indicates the network parameters of the policy The task-conditional policy network is used to represent the conditions in a given state. and task embedding Time output action The conditional probability density; Indicated by value network parameters The task-conditional action-value network represents the value of the task, and its output is an estimate of the cumulative reward. This represents the total loss in offline reinforcement learning. This indicates a loss for soft actors and critics. This indicates a conservative Q-learning regularization term. Represents the Bellman error loss of the value network; Learn the regularization coefficients for conservative Q; Indicates offline samples The corresponding target value is the sum of the immediate reward and the discounted future value estimated by the target network; Represents offline datasets In state Distribution of induced behavioral strategies based on empirical conditions; It represents a finite set of actions consisting of actions sampled under the current policy and actions sampled uniformly in the action space.
[0095] In the aforementioned post-disaster coupled power-transportation system vehicle-grid interaction collaborative recovery method, in step S7, for the current disaster task, the task embedding is first inferred from the context transfer data via the transfer-level encoder and the task-level aggregation module. Then, by the task condition policy network Output fast charging and slow charging price control signals for each time period and each station; the price control signals adjust the spatiotemporal energy expansion traffic allocation user equilibrium solution results by controlling the departure time, route selection and charging and discharging decisions of electric vehicle users, and inject the aggregated charging and discharging power into the power distribution network operation model, thereby supporting the recovery of the power distribution network through vehicle-grid interaction.
[0096] A computer system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0097] The beneficial effects achieved by this invention are as follows: The method of this invention incorporates the departure time selection, route selection and charging and discharging behavior of electric vehicles into the post-disaster coupled recovery process through a spatiotemporal energy extended traffic allocation user equilibrium model, which can simultaneously reflect the impact of traffic accessibility and power constraints on the availability of mobile energy resources; by modeling disaster scenarios as related but differently distributed tasks, and using two-layer task encoding and reward perturbation comparative learning to extract task embeddings, the adaptability of the recovery strategy to unseen disaster scenarios can be improved. Attached Figure Description
[0098] Figure 1 This is a flowchart of a post-disaster coupled power-transportation system vehicle-network interactive collaborative recovery method according to Embodiment 1 of the present invention;
[0099] Figure 2 This is a schematic diagram of the overall architecture of the post-disaster coupled power-transportation system vehicle-network interactive collaborative recovery method in Embodiment 1 of the present invention;
[0100] Figure 3 This is a schematic diagram of the contrastive offline meta-reinforcement learning framework in Embodiment 1 of the present invention. Detailed Implementation
[0101] The present invention will be further described below with reference to the accompanying drawings and embodiments. It should be noted that this section is used to describe the implementation process, parameter settings, and verification results of the present invention in a specific testing system, and the model structure, constraint relationships, training objectives, and symbol definitions in the foregoing technical solutions will not be repeated here.
[0102] Example 1
[0103] like Figure 1-2 As shown, this embodiment provides a post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery method, including:
[0104] Step S1: Construct disaster tasks, and describe each disaster scenario as task parameters. The task parameters include extended origin-destination demand set, transportation network damage conditions, power distribution network damage conditions, and time-varying renewable energy output. The extended origin-destination demand includes travel demand with spatiotemporal energy attributes such as origin, destination, travel demand, departure time, arrival time limit, battery state of charge, charging and discharging demand, or vehicle type.
[0105] The disaster task data provides traffic network damage conditions and extended origin-destination demand data for step S2, distribution network damage conditions and time-varying renewable energy output data for step S3, and disaster task parameters and scenario condition data for task modeling, task embedding learning and online control for steps S4 to S7.
[0106] Step S2: Construct a spatiotemporal energy-traffic equilibrium model. Under the condition of traffic network damage, the traffic network is modeled as a directed graph. In the directed graph, nodes represent location and time period, road arcs represent movement, and time arcs represent dwelling and charging / discharging. Using the extended origin-destination demand as input, the extended path flow, actual departure demand, and aggregated charging / discharging power of each charging station are solved through the main problem and path sub-problems. The road arc refers to the arc connecting nodes at different locations, used to represent the vehicle's driving process on the road and its driving time, traffic capacity, and energy consumption. The time arc refers to the arc connecting adjacent time period nodes at the same location, used to represent the vehicle's waiting, dwelling, and charging / discharging process at a certain location.
[0107] Step S3: Construct a distribution network operation model. Under the conditions of distribution network damage and time-varying renewable energy output constraints, solve the optimal power flow based on the distribution flow (DistFlow) model to describe the operation of the radial distribution network after the disaster. The damage to lines and transformers is characterized by impedance adjustment and capacity degradation, respectively. The aggregated charging and discharging power of the charging station is used as the time-varying node power input to the distribution network operation model.
[0108] Step S4: Construct a task-conditional Markov decision process, using fast charging and slow charging prices as action inputs, and couple the spatiotemporal energy traffic equilibrium model and the distribution network operation model to form a state transition and reward feedback; the coupled solution means that under the same electricity price action, the aggregated charging and discharging power of the charging station output by the spatiotemporal energy traffic equilibrium model on the traffic side is transmitted to the distribution network operation model on the power side, and the state transition and reward feedback are jointly formed based on the operation results of the traffic side and the power side.
[0109] In step S4, the coupled solution process of the spatiotemporal energy traffic equilibrium model of the traffic side in step S2 and the distribution network operation model in step S3 is abstracted into a reinforcement learning environment. In this environment, electricity price actions affect the departure, route, and charging / discharging choices of vehicles on the traffic side, and further affect the operation status of the distribution network. The generated states, actions, rewards, and next states constitute offline transfer data, which is used for task representation learning in step S51, contrastive representation learning in step S52, and offline reinforcement learning in step S6, and provides decision-making schemes for online control in step S7.
[0110] Step S51: Based on the offline transfer data, learn low-dimensional vector representations that characterize the features of different disaster tasks. These representations are used to distinguish differences in traffic demand, network damage, and power operation under different disaster scenarios. A transfer-level encoder and a task-level aggregation module are used to encode the transfer sequence of each disaster task, resulting in a task embedding that is insensitive to the sampling order. The transfer sequence refers to a data sequence consisting of several states, actions, rewards, and the next state; the insensitive task embedding means that the aggregated task embedding remains consistent even when the order of transfer samples in the same task changes.
[0111] Step S51 uses the offline transfer data formed in step S4 to learn disaster task features, embeds the obtained task as the representation object for contrastive learning in step S52, and uses it as the conditional input for the policy network and value network in step S6, and finally uses it for online identification of the current disaster task in step S7.
[0112] Step S6: Input the task embeddings obtained in steps S51 and S52 as conditions into the policy network and value network respectively, and perform task-conditional offline reinforcement learning on the policy network and value network. The policy network takes the state and task embedding as input and outputs the electricity price action; the value network takes the state, action, and task embedding as input and is used to evaluate the value of the input electricity price action, which includes fast charging and slow charging price actions. The policy network and value network are trained jointly by a soft actor critic objective and a conservative Q-learning regularization term to limit or reduce the overestimation of value in the process of evaluating the value of actions due to out-of-distribution actions. The out-of-distribution actions refer to electricity price actions that have not appeared sufficiently in the offline data or deviate from the historical sample distribution.
[0113] Step S7: Online execution of recovery control. The task embedding is inferred from the context transfer data for the current task. Then, the trained policy network outputs the fast charging and slow charging price control signals for each time period and each station under the task embedding condition, as well as the decision schemes affecting the departure, route and charging / discharging of electric vehicles. The power distribution network is restored through vehicle-to-grid interaction.
[0114] In step S1, the disaster scenario is uniformly abstracted into task parameters. , is represented as:
[0115] (1)
[0116] in, For the set of all extended origin-end pairs; To expand the origin and destination demand set, each component For the beginning and end Total travel demand within the recovery timeframe, expressed in vehicles; It is a set of parameters for traffic network damage, used to characterize the reduced traffic capacity and outage status of damaged roads; This is a set of parameters representing damage to the distribution network, used to characterize the increased impedance of damaged branches and the degradation of transformer capacity. For the set of distribution network nodes, Let be a set of discrete time periods, with a time period length of . ; For nodes During the period Renewable energy output; mission parameters It serves as the input for the subsequent main traffic assignment problem, path sub-problem, and distribution network operation model.
[0117] In step S2, the traffic network is modeled as a directed graph. ,node Indicates position During discrete time periods The state is represented by a road arc, which indicates the movement of a vehicle on the road, and a time arc, which indicates the vehicle's presence, waiting, charging, or discharging. Extended origin-destination demand is represented as... ; For extended path traffic Path-induced traffic The main problem includes the following constraints:
[0118] (2)
[0119] (3)
[0120] (4)
[0121] In equations (2)-(4): For a set of nodes in a spacetime directed graph, Let be a set of arcs, containing road travel arcs and dwell time arcs, both of which are sets; extend the origin and destination vectors. middle For the starting node, For the expected departure time, for scalar, For the endpoint node, The initial charged state is represented by a scalar value [0,1]. To expand the entire set of origin and destination pairs; For the beginning and end The set of feasible expansion paths, each expansion path corresponding to a combination of departure time, spatial path, and charging / discharging scheme. For the beginning and end A set of spatial paths; A set of discrete time periods; For extended paths Traffic volume, in units of vehicles; For time period In spatial path The induced traffic volume is measured in vehicles. For the beginning and end Total travel demand, in vehicles; This is a binary indicator parameter used to indicate the extended path. Is it during the time period? Corresponding spatial path The queuing time at fast charging stations and the travel time on the road respectively meet the following requirements:
[0122] (5)
[0123] (6)
[0124] In equations (5)-(6): For fast charging station nodes, For the set of road arcs; For fast charging stations During the period Queuing time For roads During the period Travel time; For fast charging stations Free queuing time, For roads Free-flow travel time; For time period Entering the fast charging station The number of vehicles, For time period the way Traffic flow on the road; For fast charging stations Service capacity, in units of vehicles / time period. For roads Traffic capacity, in units of vehicles per time period; The M / M / 1 queuing coefficient is taken as an empirical value of 0.5; 0.15 and 4 in equation (6) are standard BPR function constants.
[0125] Extended Path The generalized cost of travel is expressed as:
[0126] (7)
[0127] (8)
[0128] In equations (7)-(8): For extended paths The generalized cost of travel For extended paths The energy exchange and time zone costs; This is a set of slow charging station nodes; This is a binary access indicator parameter, representing the extended path. Is it during the time period? Visiting a charging station ; This is a binary access indication parameter, representing the extended path. Is it during the time period? Passing the road ; It is a time value factor used to convert travel time and queuing time into monetary costs; and Fast charging station and slow charging station During the period Electricity price; and Fast charging and slow charging stations respectively During the period The aggregated exchange energy, in MWh, with negative values for slow charging representing vehicle-to-grid interaction discharge, is related to the aggregated power in the state vector. Unit: MW, meets ; To account for the penalty for departure time deviation, the user equilibrium condition is:
[0129] (9)
[0130] The total system travel cost under user equilibrium is:
[0131] (10)
[0132] In equations (9)-(10): For the beginning and end The equilibrium generalized travel cost, i.e. the complementary relaxed dual variable, is equivalent to the minimum generalized travel cost of the origin-destination pair under the equilibrium solution; Equation (9) indicates that only the minimum cost extended path can carry non-zero traffic.
[0133] In the path subproblem, the minimum cost spatiotemporal energy expansion path is obtained by minimizing the generalized travel cost, where the decision variables are... Choose a binary variable for the arc:
[0134] (11)
[0135] And it satisfies the state of charge balance and charging constraints:
[0136] (12)
[0137] (13)
[0138] (14)
[0139] (15)
[0140] (16)
[0141] For the beginning and end Generalized travel costs corresponding to path subproblems; For the beginning and end In the arc Head node arrival time The corresponding state of charge; For the beginning and end In the arc Tail node departure time The corresponding state of charge; For the beginning and end At the node Time period The state of charge; Represents a node During the period Slow charging exchanges energy; For nodes In the arc Departure time The corresponding fast charging exchanges energy.
[0142] In equations (12)-(16): For the set of arcs in a spatiotemporal network, For arc elements, there are road travel arcs or dwell-charge-discharge arcs. The hyphen (-) indicates a conjunction used to represent the integrated process of dwelling and charging / discharging. The endpoints are the tail node and head node of the arc, respectively. Choose a binary variable for the arc. Indicates the beginning and end points Extended path selection arc ; A binary indicator parameter, representing the arc During the period Does it pass through roads? ; Use indicator variables for fast charging and associate them with fast charging energy exchange via equation (15); Auxiliary relaxation variables for state-of-charge balance, in MWh; and The road traffic flow and fast charging traffic flow are fixed in the outer iteration, and are scalars. This refers to the actual departure time, where the specific times at both ends of the travel arc are recorded as the departure times at the arc tails. Arrival time of the arc head , The desired departure time is expressed in hours (h). For the beginning and end At the node Time period State of charge, in MWh and These are the initial state-of-charge variables and initial state-of-charge parameters, respectively, in MWh. This represents the upper limit of battery capacity, in MWh. The minimum safe state of charge ratio; For arc The physical distance between the two endpoints, in km. Energy consumption coefficient per unit distance, in MWh / km; and They are nodes During the period The energy exchanged between fast charging and slow charging is measured in MWh. A negative value for slow charging indicates vehicle-to-grid (V2G) interaction discharge. For nodes Fast charging power limit, in MW. and They are nodes During the period The lower and upper limits of slow charging power, in MW. A negative lower limit indicates that discharge is allowed. The length of a single time period, in hours (h). A sufficiently large positive number is the big-M linearization coefficient. Appearing in equations (15) and (16), they are used to construct the big-M linearized expression of the conditional constraints, relaxing the relevant constraints when the corresponding arc is not selected. By solving the main problem and the path subproblem, the balanced traffic flow, actual departure demand, and aggregated charging and discharging power of each charging station are obtained.
[0143] In step S3, the operation of the radial distribution network after the disaster is characterized based on the DistFlow optimal power flow model. Radial means that the distribution network operates in a tree-like or radial topology, which means considering branch power flow constraints, voltage amplitude constraints, load reduction decisions, and electric vehicle power reduction decisions. Line faults are equivalently disconnected by increasing the impedance of the corresponding branch, and transformer damage is characterized by reducing the capacity limit. The aggregated charging and discharging power of each charging station output by the spatiotemporal energy traffic balance model of the traffic side in step S2 is used as the time-varying node injection quantity and input into the distribution network operation model, thereby coupling the balance solution results of the traffic side to the power side.
[0144] In step S4, for each disaster task The recovery process is described as a task-conditional Markov decision process:
[0145] (17)
[0146] in, For the task The corresponding Markov decision process is a quintuple; Let be the state space, and be the set. For action space, for set, Let be the state transition kernel, and be the conditional probability distribution. Let be the reward function, be a scalar, and map to . , It is the set of real numbers. This is the discount factor.
[0147] The state is defined as:
[0148] (18)
[0149] The actual departure requirements are determined by the following formula:
[0150] (19)
[0151] Action is defined as:
[0152] (20)
[0153] And satisfy:
[0154] (twenty one)
[0155] The state transition satisfies:
[0156] (twenty two)
[0157] The instant reward is:
[0158] (twenty three)
[0159] The costs of the transportation network and the distribution network are as follows:
[0160] (twenty four)
[0161] (25)
[0162] In equations (18)-(25): For time period The state vector, , Index the sum of the demand dimension, charging / discharging power dimension, and the power flow-voltage dimension of the distribution network in the current time period for three adjacent time periods. The offset of the state window is a dimensionless integer. For time period The action vector, The components are assembled in the order of fast charging first, then slow charging. , , and The normalized price control component has a value range of [value range missing]. ; For time period Start and End Pairs The actual departure demand is expressed in vehicles. and Fast charging and slow charging stations respectively During the period Aggregation power, and energy exchange satisfy ; branch road During the period Contributing current, unit MW, For nodes During the period Voltage amplitude, in pu; and The actual electricity price for fast charging and slow charging after denormalization; This aggregates all charging stations. and These are the base numbers for the fast charging and slow charging station sets, respectively. For indicator functions, For extended paths The corresponding actual departure time; For the task The state transition conditional probability under the given condition is implicitly given by solving the simultaneous solution of traffic equilibrium and power flow of the distribution network. For time period The instant reward, normalized sum of negative costs; and These are the normalized benchmark values for the costs of the power distribution network and the transportation network, respectively, used to align the two cost magnitudes. For time period The cost of the transportation network This is the total travel cost for that period of time; For time period Distribution network costs For the set of distribution network nodes, It is a classification set of non-electric vehicle loads, including four categories: industrial, commercial, residential, and critical loads; and These are the load reduction penalty weight and the electric vehicle power reduction penalty weight, respectively. For the first Level of load importance coefficient; For nodes No. The amount of load reduction at the level, For the site During the period The power reduction of electric vehicles, in MW. The task condition Markov decision process uses price control as the action input, and solves the state transition and reward feedback by simultaneously solving traffic equilibrium and power distribution network operation.
[0163] In step S51, a task representation is learned using offline data. For the task... The offline dataset is represented as:
[0164] (26)
[0165] A single transfer is denoted as The transfer-level encoder and the task-level aggregation module are respectively represented as follows: and The transfer-level encoder satisfies:
[0166] (27)
[0167] Task embedding satisfies:
[0168] (28)
[0169] Task-level aggregation using attention pooling is represented as follows:
[0170] (29)
[0171] In equations (26)-(29): For the task Offline transfer dataset, For a single transferred sample, it is a quadruple; For the transfer level encoder, for parameters , For task-level aggregation modules, for parameters ; For the task No. The transition-level embedding of each transition, dimension The encoder outputs the dimension. For the task Task-level embedding; For the context length, and the global time period set in equation (4) distinguish; This is the attention weight matrix. For attention query vectors, For attention hidden layer dimensions; For the task The Middle The attention weights of each transition in the task embedding, and This generates task embeddings that are insensitive to the transfer sampling order.
[0172] In step S52, reward perturbation negative samples are constructed and contrastive representation learning is performed; for the original transfer Inconsistent task transitions are constructed by adding Gaussian noise to the reward dimension:
[0173] (30)
[0174] (31)
[0175] The original transfer and the reward perturbation transfer are processed by the shared transfer-level encoder to obtain:
[0176] (32)
[0177] Define the normalization term as:
[0178] (33)
[0179] In equations (30)-(33): For original instant rewards, As a reward after the disturbance; For independent and identically distributed Gaussian perturbations, the variance is... This is the perturbation variance hyperparameter; The reward for the inconsistent task transition constructed after the perturbation is a quadruple; This represents a positive sample representation of another original transfer within the same task. To reward the transfer of disturbances One negative sample is represented; Cosine similarity, taking values... ); To compare and learn the temperature coefficient; This is the normalized denominator term for the InfoNCE loss.
[0180] The InfoNCE loss of the transfer-level encoder is defined as follows:
[0181] (34)
[0182] in, The contrastive learning loss is used to minimize the transition representations within the same task, bringing them closer together and distancing them from inconsistent task representations generated by reward perturbations, thereby improving the task embedding's ability to discriminate reward semantics.
[0183] In step S6, offline reinforcement learning is performed under task conditions; let the union of all offline task data be... Embed the task Input policy network and value network:
[0184] (35)
[0185] The objective of offline reinforcement learning is defined as:
[0186] (36)
[0187] The action value network minimizes the Bellman training error, as follows:
[0188] (37)
[0189] The conservative Q-learning regularization term is represented as:
[0190] (38)
[0191] The symbols in equations (35) to (38) are defined as follows: Represents the union of all offline datasets for all tasks; Indicates the network parameters of the policy The task-conditional policy network is used to represent the conditions in a given state. and task embedding Time output action The conditional probability density; Indicated by value network parameters The task-conditional action-value network represents the value of the task, and its output is an estimate of the cumulative reward. This represents the total loss in offline reinforcement learning. This indicates a loss for soft actors and critics. This indicates a conservative Q-learning regularization term. Represents the Bellman error loss of the value network; Learn the regularization coefficients for conservative Q; Indicates offline samples The corresponding target value is the sum of the immediate reward and the discounted future value estimated by the target network; Represents offline datasets In state Distribution of induced behavioral strategies based on empirical conditions; This represents a finite set of actions comprised of actions sampled under the current policy and actions sampled uniformly in the action space. During training, the transfer encoder remains fixed, and only the task-level aggregation module, policy network, and value network are updated, thereby reducing the risk of overestimation of value caused by out-of-distribution actions.
[0192] In step S7, recovery control is performed online; for the current disaster task, the task embedding is first inferred from the context transfer data via the transfer-level encoder and the task-level aggregation module. Then, by the task condition policy network Output fast charging and slow charging price control signals for each time period and each station; the price control signals adjust the spatiotemporal energy expansion traffic allocation user equilibrium solution results by controlling the departure time, route selection and charging and discharging decisions of electric vehicle users, and inject the aggregated charging and discharging power into the power distribution network operation model, thereby supporting the recovery of the power distribution network through vehicle-grid interaction.
[0193] The following is a set of specific operational data. In step S1, the power side adopts an improved IEEE 33-node 220 kV distribution network, the transportation side adopts a 12-node transportation network, and ten charging stations are connected to the selected distribution network nodes. The recovery time domain is set to 8:00 to 19:00 and discretized by hour; the initial state of charge of electric vehicles is approximately 33%; non-electric vehicle loads are divided into four categories: industrial, commercial, residential, and critical loads, with corresponding load value loss weights of 2, 3, 4, and 5, respectively.
[0194] Twenty composite disaster tasks were constructed, each determined by the post-disaster travel demand level, damaged transportation network configuration, damaged power distribution network topology, and photovoltaic power output curve. Specifically, travel demand was set at five levels, damaged transportation network configurations at four levels, damaged power distribution network topologies at four levels, and photovoltaic power output curves at ten levels, covering different daytime power output patterns from clear skies to cloudy / rainy weather. Of the twenty tasks, fifteen served as in-distribution training tasks, and five served as out-of-distribution reserved testing tasks.
[0195] A traffic-power distribution coupled recovery simulation was conducted. Under each disaster task, a spatiotemporal energy-extended traffic network was first constructed on the traffic side. Network nodes represent combinations of physical locations and discrete time periods, road arcs represent vehicle travel, and dwell time arcs represent waiting, queuing, charging, or discharging. Each electric vehicle travel entity is determined by its origin, expected departure time, destination, and initial state of charge. When the duration of a single trip exceeds a one-hour window, the trip is split into multiple extended origin-destination demands connected by virtual nodes to maintain the consistency of spatiotemporal evolution.
[0196] During traffic allocation, electric vehicle users form a generalized travel cost based on road congestion time, fast charging queuing time, charging and discharging costs, and departure time deviation penalties. User equilibrium is achieved within the set of feasible paths, and the equilibrium results yield the actual departure demand, path flow, and aggregated charging and discharging power at each charging station for each time period. Subsequently, the aggregated charging and discharging power is used as a time-varying injection quantity for distribution network nodes, and the DistFlow method is employed to calculate the branch power flow, voltage amplitude, load shedding, and electric vehicle power shedding of the damaged distribution network. Line faults are effectively disconnected by increasing the impedance of the faulty branch, and transformer damage is characterized by reducing the upper limit of capacity. When network constraints cannot be met, feasibility is maintained through load shedding and electric vehicle power shedding, and the corresponding costs are incorporated into the recovery evaluation.
[0197] At the recovery control layer, actual departure demand, charging and discharging power, branch power flow, and node voltage are used as state information, while fast and slow charging price control signals from each charging station are used as action information. Actions are first output in a normalized form, then denormalized to the actual electricity price and fed back to the underlying traffic equilibrium model. Thus, price control can influence electric vehicle users' departure times, route choices, and charging / discharging decisions, further altering distribution network node injection and load recovery results, forming a rolling coupled recovery process between the traffic and power sides.
[0198] In the process of offline meta-reinforcement learning training and online execution, such as Figure 2 As shown, multi-task offline data is first collected for twenty disaster tasks. For each task, offline trajectories are generated using the coupled simulation environment of steps S2 and S3, and then divided into transition samples consisting of state, action, reward, and next state according to time steps. After uniform normalization and dimension alignment, the offline data of all tasks are input into the transition-level encoder to obtain the transition-level representation.
[0199] To make the task representation more sensitive to disaster structures, this embodiment employs reward perturbation to construct inconsistent task samples. While keeping the state, action, and next state unchanged, an additive perturbation is applied to the reward component, resulting in negative samples that are inconsistent with the original task reward semantics; other transition samples within the same task are treated as positive samples. Through InfoNCE contrastive learning, transition representations within the same disaster task are brought closer together, while samples with perturbed reward semantics are moved away from the original task representation. This improves the task embedding's ability to identify differences such as road damage, site unavailability, line faults, and capacity degradation.
[0200] In the task-level aggregation stage, this embodiment employs an attention pooling module to weighted aggregate multiple transition-level representations for the same task, resulting in task embeddings. Attention weights are used to highlight transitions that contribute more to task discrimination while remaining insensitive to the order of transition sampling. After obtaining the task embeddings, they are used as conditional inputs to the policy network and value network, and trained using an offline reinforcement learning objective that includes a soft actor-critic term and a conservative Q-learning regularization term. During training, the transition-level encoder is fixed, and the task-level aggregation module, policy network, and value network are jointly updated to suppress overestimation of out-of-distribution action values in offline reinforcement learning.
[0201] During online execution, a small amount of context transition data is collected for the current disaster task. The task embedding is inferred through the transition-level encoder and the task-level aggregation module. Subsequently, the current state and task embedding are jointly input into the task condition policy network, which outputs price control signals for each charging station at each time period. These price signals are fed back to the traffic allocation and power grid operation model, thereby guiding the charging and discharging of electric vehicles and vehicle-to-grid interaction to support post-disaster recovery.
[0202] To verify the effectiveness of the above implementation method, this embodiment conducts a comparative experiment on a twenty-task composite disaster benchmark. The comparison baselines include a trajectory-level comparison baseline, a non-meta-learning baseline, and a single-task dedicated training soft actor-critic method with the same computational budget as this invention. The average reward and single-round reward given in the experiment are the cumulative values of time-by-time rewards in the recovery time domain; the closer the absolute value is to 0, the better the recovery effect.
[0203] On five out-of-distribution disaster tasks that were not included in the training, this embodiment achieved an average return of -8.7, which is better than the average returns of -13.0 and -16.1 of the trajectory-level comparison baseline and the non-meta-learning baseline, respectively, indicating that this embodiment has good generalization recovery ability in unseen disaster scenarios. On fifteen in-distribution training tasks, this embodiment achieved an average return of -24.1, which is also better than the above-mentioned control method, indicating that the method has relatively stable recovery control performance in both seen and unseen tasks.
[0204] For representative high-load scenarios, this embodiment further isolates and verifies the role of the spatiotemporal energy extended traffic modeling layer. While maintaining the upper-layer strategy unchanged, after replacing the traditional traffic allocation user equilibrium model at the bottom layer with the spatiotemporal energy extended traffic allocation user equilibrium model described in this embodiment, the cumulative load reduction decreased from 86.84 MWh to 31.86 MWh, a reduction of 63.3%; the cumulative vehicle-to-grid (V2G) interactive discharge increased from 205.78 MWh to 345.31 MWh, approximately 1.68 times the original, and was redistributed to the high-pressure evening period from 16:00 to 19:00; the single-round return increased from -208.4 to -2.8. Simultaneously, the slow-charging layer transformed from the original rigid 124.5 MWh morning V2G interactive discharge module into a dispatchable total flux of 338.9 MWh, including 188.5 MWh of midday charging aligned with photovoltaic output and 150.4 MWh of evening V2G interactive discharge. The fast-charging layer formed an instantaneous discharge peak of approximately 103 MW at 18:00. The cumulative travel revenue for electric vehicle users increased from -66kUSD to +579kUSD, indicating that this embodiment can improve the recovery capability of the power distribution network while ensuring users' travel revenue.
[0205] The above results demonstrate that the spatiotemporal energy extension traffic allocation user equilibrium modeling layer and the contrastive two-layer task representation offline reinforcement learning layer of the present invention can work together to provide a generalizable vehicle-to-grid interaction recovery strategy under different disaster scenarios.
[0206] Example 2
[0207] Based on Example 1, after step S51, the following is also included:
[0208] Step S52: Construct reward perturbation negative samples and perform contrastive representation learning on the transfer encoder to ensure that the transfer representations in the same task remain consistent in the representation space, and to separate the transfer representations corresponding to the reward perturbation negative samples from the original task representations in the representation space. The contrastive representation learning refers to constructing positive and negative samples so that the model can learn to distinguish the representation features of the same task from those of different tasks, thereby improving the discriminativeness and robustness of task embedding.
[0209] Example 3
[0210] A computer system includes a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to perform the steps of the methods as described in Examples 1-2.
[0211] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0212] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0213] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0214] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for post-disaster coupled power-transportation system vehicle-grid interactive and collaborative recovery, characterized in that, include: S1: Construct disaster tasks, and describe each disaster scenario as task parameters. The task parameters include the extended origin-end demand set, the conditions of damage to the transportation network, the conditions of damage to the power distribution network, and the time-varying renewable energy output. S2: Construct a spatiotemporal energy-traffic equilibrium model. Under the condition of traffic network damage, model the traffic network as a directed graph, and use the extended origin-destination demand as input. Solve the extended path flow, actual departure demand and aggregate charging and discharging power of each charging station through the main problem and path sub-problems. S3: Construct a distribution network operation model. Under the conditions of distribution network damage and time-varying renewable energy output constraints, solve the optimal power flow based on the distribution power flow model, and input the aggregated charging and discharging power of the charging station as the time-varying node power into the distribution network operation model. S4: Construct a task-conditional Markov decision process, using fast charging and slow charging prices as action inputs, and couple the spatiotemporal energy and transportation equilibrium model with the power distribution network operation model to form a state transition and reward feedback. S51: Based on offline transfer data, learn low-dimensional vector representations that characterize the features of different disaster tasks, and use a transfer-level encoder and a task-level aggregation module to encode the transfer sequence of each disaster task to obtain the task embedding; S6. The task is embedded and input into the policy network and the value network respectively. Task-conditional offline reinforcement learning is performed on the policy network and the value network. The policy network outputs the electricity price action and the value network evaluates the value of the input electricity price action. S7. In the online state, the task embedding is inferred from the context transfer data for the current task. Then, the trained policy network outputs the fast charging and slow charging price control signals for each time period and each station under the task embedding condition, as well as the decision schemes that affect the departure, route and charging and discharging of electric vehicles, and completes the power distribution network restoration through vehicle-to-grid interaction.
2. The method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 1, characterized in that, The process after step S5 also includes: S52. Construct reward perturbation negative samples and perform contrastive representation learning on the transfer encoder to ensure that the transfer representations in the same task remain consistent in the representation space, and to separate the transfer representations corresponding to the reward perturbation negative samples from the original task representations in the representation space; the contrastive representation learning refers to constructing positive and negative samples to enable the model to learn to distinguish the representation features of the same task from those of different tasks.
3. The method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 1, characterized in that, In step S1, the disaster scenario is uniformly abstracted into task parameters. , is represented as: (1) in, For the set of all extended origin-end pairs; To expand the origin and destination demand set, each component For the beginning and end Total travel demand within the recovery timeframe, expressed in vehicles; It is a set of parameters for traffic network damage, used to characterize the reduced traffic capacity and outage status of damaged roads; This is a set of parameters representing damage to the distribution network, used to characterize the increased impedance of damaged branches and the degradation of transformer capacity. For the set of distribution network nodes, Let be a set of discrete time periods, with a time period length of . ; For nodes During the period Renewable energy output; mission parameters It serves as the input for the subsequent main traffic assignment problem, path sub-problem, and distribution network operation model.
4. The method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 1, characterized in that, In step S2, the traffic network is modeled as a directed graph. ,node Indicates position During discrete time periods The state is represented by a road arc, which indicates the movement of a vehicle on the road, and a time arc, which indicates the vehicle's presence, waiting, charging, or discharging. Extended origin-destination demand is represented as... ; For extended path traffic Path-induced traffic The main problem includes the following constraints: (2) (3) (4) In equations (2)-(4): For a set of nodes in a spacetime directed graph, Let be a set of arcs, containing road travel arcs and dwell time arcs, both of which are sets; extend the origin and destination vectors. middle For the starting node, For the expected departure time, for scalar, For the endpoint node, This is the initial state of charge; To expand the entire set of origin and destination pairs; For the beginning and end The set of feasible expansion paths, each expansion path corresponding to a combination of departure time, spatial path, and charging / discharging scheme. For the beginning and end A set of spatial paths; A set of discrete time periods; For extended paths Traffic on the internet; For time period In spatial path Induced traffic on the platform; For the beginning and end Total travel demand; This is a binary indicator parameter used to indicate the extended path. Is it during the time period? Corresponding spatial path The queuing time at fast charging stations and the travel time on the road respectively meet the following requirements: (5) (6) In equations (5)-(6): For fast charging station nodes, For the set of road arcs; For fast charging stations During the period Queuing time For roads During the period Travel time; For fast charging stations Free queuing time, For roads Free-flow travel time; For time period Entering the fast charging station The number of vehicles, For time period the way Traffic flow on the road; For fast charging stations service capabilities For roads Traffic capacity; The M / M / 1 queuing coefficient; 0.15 and 4 in equation (6) are the standard BPR function constants; Extended Path The generalized cost of travel is expressed as: (7) (8) In equations (7)-(8): For extended paths The generalized cost of travel For extended paths The energy exchange and time zone costs; This is a set of slow charging station nodes; This is a binary access indicator parameter, representing the extended path. Is it during the time period? Visiting a charging station ; This is a binary access indication parameter, representing the extended path. Is it during the time period? Passing the road ; It is a time value factor used to convert travel time and queuing time into monetary costs; and Fast charging station and slow charging station During the period Electricity price; and Fast charging and slow charging stations respectively During the period The aggregated exchange energy, with negative values for slow charging representing vehicle-to-grid interaction discharge, is related to the aggregated power in the state vector. ,satisfy ; To account for the penalty for departure time deviation, the user equilibrium condition is: (9) The total system travel cost under user equilibrium is: (10) In equations (9)-(10): For the beginning and end The equilibrium generalized travel cost is equivalent to the minimum generalized travel cost of the origin-destination pair under the equilibrium solution; Equation (9) indicates that only the minimum cost extended path can carry non-zero traffic. In the path subproblem, the minimum cost spatiotemporal energy expansion path is obtained by minimizing the generalized travel cost, where the decision variables are... Choose a binary variable for the arc: (11) And it satisfies the state of charge balance and charging constraints: (12) (13) (14) (15) (16) For the beginning and end Generalized travel costs corresponding to path subproblems; For the beginning and end In the arc Head node arrival time The corresponding state of charge; For the beginning and end In the arc Tail node departure time The corresponding state of charge; For the beginning and end At the node Time period The state of charge; Represents a node During the period Slow charging exchanges energy; For nodes In the arc Departure time Corresponding fast charging energy exchange; In equations (12)-(16): For the set of arcs in a spatiotemporal network, For arc elements, there are road travel arcs or dwell-charge-discharge arcs, with the endpoints being the tail node and head node of the arc, respectively; Choose a binary variable for the arc. Indicates the beginning and end points Extended path selection arc ; A binary indicator parameter, representing the arc During the period Does it pass through roads? ; Use indicator variables for fast charging and associate them with fast charging energy exchange via equation (15); It serves as an auxiliary relaxation variable for the equilibrium of the charged state; and The outer layer has fixed road traffic and fast charging traffic. This refers to the actual departure time, where the specific times at both ends of the travel arc are recorded as the departure times at the arc tails. Arrival time of the arc head , The desired departure time; For the beginning and end At the node Time period The state of charge, and These are the initial charged state variables and the initial charged state parameters, respectively. This is the upper limit of battery capacity. The minimum safe state of charge ratio; For arc The physical distance between the two endpoints. Energy consumption coefficient per unit distance; and They are nodes During the period Fast charging and slow charging exchange energy; a negative value for slow charging indicates vehicle-to-grid (V2G) interaction and discharge. For nodes The maximum fast charging power. and They are nodes During the period The lower and upper limits of slow charging power; a negative lower limit indicates that discharge is allowed. The length of a single time period; It is a positive number.
5. The method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 1, characterized in that, In step S3, the operation of the radial distribution network after the disaster is characterized based on the DistFlow optimal power flow model. Radial means that the distribution network operates in a tree-like or radial topology, which means considering branch power flow constraints, voltage amplitude constraints, load reduction decisions, and electric vehicle power reduction decisions. Line faults are equivalently disconnected by increasing the impedance of the corresponding branch, and transformer damage is characterized by reducing the capacity limit. The aggregated charging and discharging power of each charging station output by the spatiotemporal energy traffic balance model on the traffic side in step S2 is used as the time-varying node injection quantity and input into the distribution network operation model, thereby coupling the balance solution results on the traffic side to the power side.
6. The method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 4, characterized in that, In step S4, for each disaster task The recovery process is described as a task-conditional Markov decision process: (17) in, For the task The corresponding Markov decision process; For state space, For the action space, As a state transition kernel, For the reward function, mapped as , It is the set of real numbers. Discount factor; The state is defined as: (18) The actual departure requirements are determined by the following formula: (19) Action is defined as: (20) And satisfy: (21) The state transition satisfies: (22) The instant reward is: (23) The costs of the transportation network and the distribution network are as follows: (24) (25) In equations (18)-(25): For time period The state vector, , Index the sum of the demand dimension, charging / discharging power dimension, and the power flow-voltage dimension of the distribution network in the current time period for three adjacent time periods. Offset of the status window; For time period The action vector, The components are assembled in the order of fast charging first, then slow charging. , , and The normalized price control component has a value range of [value range missing]. ; For time period Start and End Pairs Actual starting point needs; and Fast charging and slow charging stations respectively During the period Aggregation power, and energy exchange satisfy ; branch road During the period The meritorious trend, For nodes During the period The voltage amplitude; and The actual electricity price for fast charging and slow charging after denormalization; This aggregates all charging stations. and These are the base numbers for the fast charging and slow charging station sets, respectively. For indicator functions, For extended paths The corresponding actual departure time; For the task The state transition conditional probability under the given condition is implicitly given by solving the simultaneous solution of traffic equilibrium and power flow of the distribution network. For time period The instant reward, normalized sum of negative costs; and These are the normalized benchmark values for the costs of the power distribution network and the transportation network, used to align the two cost magnitudes. For time period The cost of the transportation network This is the total travel cost for that period of time; For time period Distribution network costs For the set of distribution network nodes, This is a set of load classifications for non-electric vehicles. and These are the load reduction penalty weight and the electric vehicle power reduction penalty weight, respectively. For the first Level of load importance coefficient; For nodes No. The amount of load reduction at the level, For the site During the period The power reduction of electric vehicles, the task condition Markov decision process takes price control as the action input, and solves the state transition and reward feedback by combining traffic equilibrium and power distribution network operation.
7. A method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 6, characterized in that, In step S51, during the process of learning the task representation using offline data, for the task... The offline dataset is represented as: (26) Wherein, a single transfer is denoted as The transfer-level encoder and the task-level aggregation module are respectively represented as: and The transfer-level encoder satisfies: (27) Task embedding satisfies: (28) Task-level aggregation using attention pooling is represented as follows: (29) In equations (26)-(29): For the task Offline transfer dataset, For a single transferred sample; For transfer level encoders, This is a task-level aggregation module; For the task No. The transition-level embedding of each transition, dimension The encoder outputs the dimension. For the task Task-level embedding; For the context length, and the global time period set in equation (4) distinguish; This is the attention weight matrix. For attention query vectors, For attention hidden layer dimensions; For the task The Middle The attention weights of each transition in the task embedding, and .
8. A method for post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery according to claim 7, characterized in that, In step S52, reward perturbation negative samples are constructed and comparative representation learning is performed for the original transfer. Inconsistent task transitions are constructed by adding Gaussian noise to the reward dimension: (30) (31) The original transfer and the reward perturbation transfer are processed by the shared transfer-level encoder to obtain: (32) Define the normalization term as: (33) In equations (30)-(33): For original instant rewards, As a reward after the disturbance; For independent and identically distributed Gaussian perturbations, the variance is... This is the perturbation variance hyperparameter; To reward the inconsistent task transfer constructed after the perturbation; This represents a positive sample representation of another original transfer within the same task. To reward the transfer of disturbances One negative sample is represented; Cosine similarity, with values ranging from... ); To compare and learn the temperature coefficient; This is the normalized denominator term for the InfoNCE loss; The InfoNCE loss of the transfer-level encoder is defined as follows: (34) in, To compare learning loss.
9. A post-disaster coupled power-transportation system vehicle-grid interactive and coordinated recovery method according to claim 8, characterized in that, In step S6, let the union of all offline task data be... Embed the task Input policy network and value network: (35) The objective of offline reinforcement learning is defined as: (36) The action value network minimizes the Bellman training error, as follows: (37) The conservative Q-learning regularization term is represented as: (38) The symbols in equations (35) to (38) are defined as follows: Represents the union of all offline datasets for all tasks; Indicates the network parameters of the policy The task-conditional policy network is used to represent the conditions in a given state. and task embedding Time output action The conditional probability density; Indicated by value network parameters The task-conditional action-value network represents the value of the task, and its output is an estimate of the cumulative reward. This represents the total loss in offline reinforcement learning. This indicates a loss for soft actors and critics. This indicates a conservative Q-learning regularization term. Represents the Bellman error loss of the value network; Learn the regularization coefficients for conservative Q; Indicates offline samples The corresponding target value is the sum of the immediate reward and the discounted future value estimated by the target network; Represents offline datasets In state Distribution of induced behavioral strategies based on empirical conditions; It represents a finite set of actions consisting of actions sampled under the current policy and actions sampled uniformly in the action space.
10. A computer system comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the post-disaster coupled power-transportation system vehicle-network interactive collaborative recovery method based on offline meta-reinforcement learning as described in any one of claims 1-9.
