The large-scale integration of distributed photovoltaic (PV) generation and electric vehicles (EVs) increases uncertainty in distribution-network source and load conditions and complicates system operation. Conventional optimization methods based on iterative solutions and day-ahead forecasts may not meet the real-time operating requirements of active distribution networks. Therefore, a multi-time-scale Graph Attention Network (GAT)-based online optimization and control method is proposed for distribution networks with emerging source-load resources. First, stochastic and time-varying source-load scenarios are generated using a PV output model and an EV charging-load model. Second, the reactive power optimization model is solved offline to construct a control-decision dataset that accounts for the different dynamic responses of the regulation devices. The GAT is then trained to learn the nonlinear mapping from distribution-network operating states to control decisions, forming a multi-time-scale online decision-making model. The long-time-scale model regulates discrete devices, whereas the short-time-scale model regulates continuous devices. For the IEEE 33-bus case study, the average GAT inference time is 0.0703 s, compared with 83.7667 s for PSO. The hour-level model achieves MAE/RMSE values of 0.0398/0.0407, while the 15 min model achieves 0.0374/0.0397; all bus voltages are maintained within 0.95–1.05 p.u. after optimization. The model is validated under the tested operating distribution; broader robustness and field applicability require further validation.
With the increasing penetration of electric vehicles (EVs) and distributed energy resources, source-load uncertainty, spatiotemporal variability, and nonlinear coupling make rapid and accurate assessment of operating states more difficult in active distribution networks. This paper proposes a Physics-Informed Graph Attention Network (PIGAT) surrogate model for power flow prediction. PV output is represented by a Beta distribution, and EV charging loads are generated by category-based Monte Carlo sampling. The graph attention mechanism captures the topological relationships among buses. A physics-informed loss combines nodal power balance and system active power conservation constraints to improve the physical consistency of the predictions. The model maps source-load inputs to bus voltage magnitudes, voltage phase angles, and system active power loss. Tests on the IEEE 33-bus and 69-bus systems evaluate prediction accuracy, physical consistency, inference time, performance under light- and heavy-load conditions, and performance with limited training data. On the IEEE 33-bus system, the MAE and RMSE of bus voltage magnitude predictions are below 5 × 10−4 p.u.; the MAE and RMSE of system active power loss predictions are 0.635 and 0.712 kW, respectively; and the MAE of the active power conservation deviation is 0.862 kW. The pure forward-pass inference time is 1.58 ms, compared with 8.19 ms for MATPOWER; including the optional physics-residual check, the total evaluation time is 2.64 ms.