说明书
MATLAB代码:基于双层优化的电动汽车优化调度研究
关键词:双层优化 选址定容 输配协同 时空优化
参考文档:《考虑大规模电动汽车接入电网的双层优化调度策略_胡文平》中文版
《A bi-layer optimization based temporal and spatial scheduling for large-scale electric vehicles》完全复现
仿真平台:MATLAB+CPLEX 平台
优势:代码具有一定的深度和创新性,注释清晰,非烂大街的代码,非常精品!
主要内容:代码主要做的是一个双层的电动汽车充放电行为优化问题,具体来讲,输电网上层优化将电动汽车与发电机、基本负荷协调,同时考虑风力发电,从而在时域内优化电动汽车的负荷周期。然后,配电网的下层优化在空间上调度电动汽车负荷的位置。同时代码考虑了风电的出力场景,研究了不同风电出力下电动汽车的适应性,该代码具有一定的创新性,适合新手学习以及在此基础上进行拓展,代码质量非常高,保姆级的注释以及人性化的模块子程序,所有数据均有可靠来源,下单后会直接发您资料,保证您学得会,用的起来,简直是萌新福利!
实现效果:具体如下
%%%%%%配电网潮流优化%%%%%%%%
%%%%%%标幺值SB=100MVA,UB=12.66kV,二阶锥松弛%%%%%%
%%%%%%MISOCP模型,分时段优化,并行计算%%%%%%%%%%%%
clear
clc
tic;
%%%%%IEEE33配电网数据%%%%%%%%%%%;
Pload=[0.0004666666667,0.0005,0.0005666666667,0.0006333333333,0.0006666666667,0.0007333333333,0.0007666666667,0.0008,0.0008666666667,0.0009333333333,0.0009666666667,0.001,0.0009333333333,0.0008666666667,0.0008,0.0007,0.0006666666667,0.0007333333333,0.0008,0.0009333333333,0.0008666666667,0.0007333333333,0.0006,0.0005333333333;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00056,0.0006,0.00068,0.00076,0.0008,0.00088,0.00092,0.00096,0.00104,0.00112,0.00116,0.0012,0.00112,0.00104,0.00096,0.00084,0.0008,0.00088,0.00096,0.00112,0.00104,0.00088,0.00072,0.00064;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.0009333333333,0.001,0.001133333333,0.001266666667,0.001333333333,0.001466666667,0.001533333333,0.0016,0.001733333333,0.001866666667,0.001933333333,0.002,0.001866666667,0.001733333333,0.0016,0.0014,0.001333333333,0.001466666667,0.0016,0.001866666667,0.001733333333,0.001466666667,0.0012,0.001066666667;0.0009333333333,0.001,0.001133333333,0.001266666667,0.001333333333,0.001466666667,0.001533333333,0.0016,0.001733333333,0.001866666667,0.001933333333,0.002,0.001866666667,0.001733333333,0.0016,0.0014,0.001333333333,0.001466666667,0.0016,0.001866666667,0.001733333333,0.001466666667,0.0012,0.001066666667;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00021,0.000225,0.000255,0.000285,0.0003,0.00033,0.000345,0.00036,0.00039,0.00042,0.000435,0.00045,0.00042,0.00039,0.00036,0.000315,0.0003,0.00033,0.00036,0.00042,0.00039,0.00033,0.00027,0.00024;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00056,0.0006,0.00068,0.00076,0.0008,0.00088,0.00092,0.00096,0.00104,0.00112,0.00116,0.0012,0.00112,0.00104,0.00096,0.00084,0.0008,0.00088,0.00096,0.00112,0.00104,0.00088,0.00072,0.00064;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00042,0.00045,0.00051,0.00057,0.0006,0.00066,0.00069,0.00072,0.00078,0.00084,0.00087,0.0009,0.00084,0.00078,0.00072,0.00063,0.0006,0.00066,0.00072,0.00084,0.00078,0.00066,0.00054,0.00048;0.00196,0.0021,0.00238,0.00266,0.0028,0.00308,0.00322,0.00336,0.00364,0.00392,0.00406,0.0042,0.00392,0.00364,0.00336,0.00294,0.0028,0.00308,0.00336,0.00392,0.00364,0.00308,0.00252,0.00224;0.00196,0.0021,0.00238,0.00266,0.0028,0.00308,0.00322,0.00336,0.00364,0.00392,0.00406,0.0042,0.00392,0.00364,0.00336,0.00294,0.0028,0.00308,0.00336,0.00392,0.00364,0.00308,0.00252,0.00224;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.00056,0.0006,0.00068,0.00076,0.0008,0.00088,0.00092,0.00096,0.00104,0.00112,0.00116,0.0012,0.00112,0.00104,0.00096,0.00084,0.0008,0.00088,0.00096,0.00112,0.00104,0.00088,0.00072,0.00064;0.0009333333333,0.001,0.001133333333,0.001266666667,0.001333333333,0.001466666667,0.001533333333,0.0016,0.001733333333,0.001866666667,0.001933333333,0.002,0.001866666667,0.001733333333,0.0016,0.0014,0.001333333333,0.001466666667,0.0016,0.001866666667,0.001733333333,0.001466666667,0.0012,0.001066666667;0.0007,0.00075,0.00085,0.00095,0.001,0.0011,0.00115,0.0012,0.0013,0.0014,0.00145,0.0015,0.0014,0.0013,0.0012,0.00105,0.001,0.0011,0.0012,0.0014,0.0013,0.0011,0.0009,0.0008;0.00098,0.00105,0.00119,0.00133,0.0014,0.00154,0.00161,0.00168,0.00182,0.00196,0.00203,0.0021,0.00196,0.00182,0.00168,0.00147,0.0014,0.00154,0.00168,0.00196,0.00182,0.00154,0.00126,0.00112;0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%节点有功(何立夫数据);
Qload=[0.00028,0.0003,0.00034,0.00038,0.0004,0.00044,0.00046,0.00048,0.00052,0.00056,0.00058,0.0006,0.00056,0.00052,0.00048,0.00042,0.0004,0.00044,0.00048,0.00056,0.00052,0.00044,0.00036,0.00032;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0003733333333,0.0004,0.0004533333333,0.0005066666667,0.0005333333333,0.0005866666667,0.0006133333333,0.00064,0.0006933333333,0.0007466666667,0.0007733333333,0.0008,0.0007466666667,0.0006933333333,0.00064,0.00056,0.0005333333333,0.0005866666667,0.00064,0.0007466666667,0.0006933333333,0.0005866666667,0.00048,0.0004266666667;0.00014,0.00015,0.00017,0.00019,0.0002,0.00022,0.00023,0.00024,0.00026,0.00028,0.00029,0.0003,0.00028,0.00026,0.00024,0.00021,0.0002,0.00022,0.00024,0.00028,0.00026,0.00022,0.00018,0.00016;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;0.0004666666667,0.0005,0.0005666666667,0.0006333333333,0.0006666666667,0.0007333333333,0.0007666666667,0.0008,0.0008666666667,0.0009333333333,0.0009666666667,0.001,0.0009333333333,0.0008666666667,0.0008,0.0007,0.0006666666667,0.0007333333333,0.0008,0.0009333333333,0.0008666666667,0.0007333333333,0.0006,0.0005333333333;0.0004666666667,0.0005,0.0005666666667,0.0006333333333,0.0006666666667,0.0007333333333,0.0007666666667,0.0008,0.0008666666667,0.0009333333333,0.0009666666667,0.001,0.0009333333333,0.0008666666667,0.0008,0.0007,0.0006666666667,0.0007333333333,0.0008,0.0009333333333,0.0008666666667,0.0007333333333,0.0006,0.0005333333333;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;0.00014,0.00015,0.00017,0.00019,0.0002,0.00022,0.00023,0.00024,0.00026,0.00028,0.00029,0.0003,0.00028,0.00026,0.00024,0.00021,0.0002,0.00022,0.00024,0.00028,0.00026,0.00022,0.00018,0.00016;0.0001633333333,0.000175,0.0001983333333,0.0002216666667,0.0002333333333,0.0002566666667,0.0002683333333,0.00028,0.0003033333333,0.0003266666667,0.0003383333333,0.00035,0.0003266666667,0.0003033333333,0.00028,0.000245,0.0002333333333,0.0002566666667,0.00028,0.0003266666667,0.0003033333333,0.0002566666667,0.00021,0.0001866666667;0.0001633333333,0.000175,0.0001983333333,0.0002216666667,0.0002333333333,0.0002566666667,0.0002683333333,0.00028,0.0003033333333,0.0003266666667,0.0003383333333,0.00035,0.0003266666667,0.0003033333333,0.00028,0.000245,0.0002333333333,0.0002566666667,0.00028,0.0003266666667,0.0003033333333,0.0002566666667,0.00021,0.0001866666667;0.0003733333333,0.0004,0.0004533333333,0.0005066666667,0.0005333333333,0.0005866666667,0.0006133333333,0.00064,0.0006933333333,0.0007466666667,0.0007733333333,0.0008,0.0007466666667,0.0006933333333,0.00064,0.00056,0.0005333333333,0.0005866666667,0.00064,0.0007466666667,0.0006933333333,0.0005866666667,0.00048,0.0004266666667;4.666666667e-05,5.e-05,5.666666667e-05,6.333333333e-05,6.666666667e-05,7.333333333e-05,7.666666667e-05,8.e-05,8.666666667e-05,9.333333333e-05,9.666666667e-05,0.0001,9.333333333e-05,8.666666667e-05,8.e-05,7.e-05,6.666666667e-05,7.333333333e-05,8.e-05,9.333333333e-05,8.666666667e-05,7.333333333e-05,6.e-05,5.333333333e-05;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0.0002333333333,0.00025,0.0002833333333,0.0003166666667,0.0003333333333,0.0003666666667,0.0003833333333,0.0004,0.0004333333333,0.0004666666667,0.0004833333333,0.0005,0.0004666666667,0.0004333333333,0.0004,0.00035,0.0003333333333,0.0003666666667,0.0004,0.0004666666667,0.0004333333333,0.0003666666667,0.0003,0.0002666666667;0.0009333333333,0.001,0.001133333333,0.001266666667,0.001333333333,0.001466666667,0.001533333333,0.0016,0.001733333333,0.001866666667,0.001933333333,0.002,0.001866666667,0.001733333333,0.0016,0.0014,0.001333333333,0.001466666667,0.0016,0.001866666667,0.001733333333,0.001466666667,0.0012,0.001066666667;0.0009333333333,0.001,0.001133333333,0.001266666667,0.001333333333,0.001466666667,0.001533333333,0.0016,0.001733333333,0.001866666667,0.001933333333,0.002,0.001866666667,0.001733333333,0.0016,0.0014,0.001333333333,0.001466666667,0.0016,0.001866666667,0.001733333333,0.001466666667,0.0012,0.001066666667;0.0001166666667,0.000125,0.0001416666667,0.0001583333333,0.0001666666667,0.0001833333333,0.0001916666667,0.0002,0.0002166666667,0.0002333333333,0.0002416666667,0.00025,0.0002333333333,0.0002166666667,0.0002,0.000175,0.0001666666667,0.0001833333333,0.0002,0.0002333333333,0.0002166666667,0.0001833333333,0.00015,0.0001333333333;0.0001166666667,0.000125,0.0001416666667,0.0001583333333,0.0001666666667,0.0001833333333,0.0001916666667,0.0002,0.0002166666667,0.0002333333333,0.0002416666667,0.00025,0.0002333333333,0.0002166666667,0.0002,0.000175,0.0001666666667,0.0001833333333,0.0002,0.0002333333333,0.0002166666667,0.0001833333333,0.00015,0.0001333333333;9.333333333e-05,0.0001,0.0001133333333,0.0001266666667,0.0001333333333,0.0001466666667,0.0001533333333,0.00016,0.0001733333333,0.0001866666667,0.0001933333333,0.0002,0.0001866666667,0.0001733333333,0.00016,0.00014,0.0001333333333,0.0001466666667,0.00016,0.0001866666667,0.0001733333333,0.0001466666667,0.00012,0.0001066666667;0.0003266666667,0.00035,0.0003966666667,0.0004433333333,0.0004666666667,0.0005133333333,0.0005366666667,0.00056,0.0006066666667,0.0006533333333,0.0006766666667,0.0007,0.0006533333333,0.0006066666667,0.00056,0.00049,0.0004666666667,0.0005133333333,0.00056,0.0006533333333,0.0006066666667,0.0005133333333,0.00042,0.0003733333333;0.0028,0.003,0.0034,0.0038,0.004,0.0044,0.0046,0.0048,0.0052,0.0056,0.0058,0.006,0.0056,0.0052,0.0048,0.0042,0.004,0.0044,0.0048,0.0056,0.0052,0.0044,0.0036,0.0032;0.0003266666667,0.00035,0.0003966666667,0.0004433333333,0.0004666666667,0.0005133333333,0.0005366666667,0.00056,0.0006066666667,0.0006533333333,0.0006766666667,0.0007,0.0006533333333,0.0006066666667,0.00056,0.00049,0.0004666666667,0.0005133333333,0.00056,0.0006533333333,0.0006066666667,0.0005133333333,0.00042,0.0003733333333;0.0004666666667,0.0005,0.0005666666667,0.0006333333333,0.0006666666667,0.0007333333333,0.0007666666667,0.0008,0.0008666666667,0.0009333333333,0.0009666666667,0.001,0.0009333333333,0.0008666666667,0.0008,0.0007,0.0006666666667,0.0007333333333,0.0008,0.0009333333333,0.0008666666667,0.0007333333333,0.0006,0.0005333333333;0.0001866666667,0.0002,0.0002266666667,0.0002533333333,0.0002666666667,0.0002933333333,0.0003066666667,0.00032,0.0003466666667,0.0003733333333,0.0003866666667,0.0004,0.0003733333333,0.0003466666667,0.00032,0.00028,0.0002666666667,0.0002933333333,0.00032,0.0003733333333,0.0003466666667,0.0002933333333,0.00024,0.0002133333333;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%节点无功(何立夫数据);
%Pload=[0.00058,0.00065,0.00071,0.00083,0.00088,0.00087,0.00084,0.000798,0.000804,0.000798,0.000815,0.00085,0.0009,0.000898,0.000975,0.000993,0.000895,0.00078,0.00069,0.00061,0.00058,0.000582,0.00057,0.000563;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000696,0.00078,0.000852,0.000996,0.001056,0.001044,0.001008,0.0009576,0.0009648,0.0009576,0.000978,0.00102,0.00108,0.0010776,0.00117,0.0011916,0.001074,0.000936,0.000828,0.000732,0.000696,0.0006984,0.000684,0.0006756;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.00116,0.0013,0.00142,0.00166,0.00176,0.00174,0.00168,0.001596,0.001608,0.001596,0.00163,0.0017,0.0018,0.001796,0.00195,0.001986,0.00179,0.00156,0.00138,0.00122,0.00116,0.001164,0.00114,0.001126;0.00116,0.0013,0.00142,0.00166,0.00176,0.00174,0.00168,0.001596,0.001608,0.001596,0.00163,0.0017,0.0018,0.001796,0.00195,0.001986,0.00179,0.00156,0.00138,0.00122,0.00116,0.001164,0.00114,0.001126;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000261,0.0002925,0.0003195,0.0003735,0.000396,0.0003915,0.000378,0.0003591,0.0003618,0.0003591,0.00036675,0.0003825,0.000405,0.0004041,0.00043875,0.00044685,0.00040275,0.000351,0.0003105,0.0002745,0.000261,0.0002619,0.0002565,0.00025335;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000696,0.00078,0.000852,0.000996,0.001056,0.001044,0.001008,0.0009576,0.0009648,0.0009576,0.000978,0.00102,0.00108,0.0010776,0.00117,0.0011916,0.001074,0.000936,0.000828,0.000732,0.000696,0.0006984,0.000684,0.0006756;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.000522,0.000585,0.000639,0.000747,0.000792,0.000783,0.000756,0.0007182,0.0007236,0.0007182,0.0007335,0.000765,0.00081,0.0008082,0.0008775,0.0008937,0.0008055,0.000702,0.000621,0.000549,0.000522,0.0005238,0.000513,0.0005067;0.002436,0.00273,0.002982,0.003486,0.003696,0.003654,0.003528,0.0033516,0.0033768,0.0033516,0.003423,0.00357,0.00378,0.0037716,0.004095,0.0041706,0.003759,0.003276,0.002898,0.002562,0.002436,0.0024444,0.002394,0.0023646;0.002436,0.00273,0.002982,0.003486,0.003696,0.003654,0.003528,0.0033516,0.0033768,0.0033516,0.003423,0.00357,0.00378,0.0037716,0.004095,0.0041706,0.003759,0.003276,0.002898,0.002562,0.002436,0.0024444,0.002394,0.0023646;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000696,0.00078,0.000852,0.000996,0.001056,0.001044,0.001008,0.0009576,0.0009648,0.0009576,0.000978,0.00102,0.00108,0.0010776,0.00117,0.0011916,0.001074,0.000936,0.000828,0.000732,0.000696,0.0006984,0.000684,0.0006756;0.00116,0.0013,0.00142,0.00166,0.00176,0.00174,0.00168,0.001596,0.001608,0.001596,0.00163,0.0017,0.0018,0.001796,0.00195,0.001986,0.00179,0.00156,0.00138,0.00122,0.00116,0.001164,0.00114,0.001126;0.00087,0.000975,0.001065,0.001245,0.00132,0.001305,0.00126,0.001197,0.001206,0.001197,0.0012225,0.001275,0.00135,0.001347,0.0014625,0.0014895,0.0013425,0.00117,0.001035,0.000915,0.00087,0.000873,0.000855,0.0008445;0.001218,0.001365,0.001491,0.001743,0.001848,0.001827,0.001764,0.0016758,0.0016884,0.0016758,0.0017115,0.001785,0.00189,0.0018858,0.0020475,0.0020853,0.0018795,0.001638,0.001449,0.001281,0.001218,0.0012222,0.001197,0.0011823;0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%节点有功;
%Qload=[0.000348,0.00039,0.000426,0.000498,0.000528,0.000522,0.000504,0.0004788,0.0004824,0.0004788,0.000489,0.00051,0.00054,0.0005388,0.000585,0.0005958,0.000537,0.000468,0.000414,0.000366,0.000348,0.0003492,0.000342,0.0003378;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.000464,0.00052,0.000568,0.000664,0.000704,0.000696,0.000672,0.0006384,0.0006432,0.0006384,0.000652,0.00068,0.00072,0.0007184,0.00078,0.0007944,0.000716,0.000624,0.000552,0.000488,0.000464,0.0004656,0.000456,0.0004504;0.000174,0.000195,0.000213,0.000249,0.000264,0.000261,0.000252,0.0002394,0.0002412,0.0002394,0.0002445,0.000255,0.00027,0.0002694,0.0002925,0.0002979,0.0002685,0.000234,0.000207,0.000183,0.000174,0.0001746,0.000171,0.0001689;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.00058,0.00065,0.00071,0.00083,0.00088,0.00087,0.00084,0.000798,0.000804,0.000798,0.000815,0.00085,0.0009,0.000898,0.000975,0.000993,0.000895,0.00078,0.00069,0.00061,0.00058,0.000582,0.00057,0.000563;0.00058,0.00065,0.00071,0.00083,0.00088,0.00087,0.00084,0.000798,0.000804,0.000798,0.000815,0.00085,0.0009,0.000898,0.000975,0.000993,0.000895,0.00078,0.00069,0.00061,0.00058,0.000582,0.00057,0.000563;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.000174,0.000195,0.000213,0.000249,0.000264,0.000261,0.000252,0.0002394,0.0002412,0.0002394,0.0002445,0.000255,0.00027,0.0002694,0.0002925,0.0002979,0.0002685,0.000234,0.000207,0.000183,0.000174,0.0001746,0.000171,0.0001689;0.000203,0.0002275,0.0002485,0.0002905,0.000308,0.0003045,0.000294,0.0002793,0.0002814,0.0002793,0.00028525,0.0002975,0.000315,0.0003143,0.00034125,0.00034755,0.00031325,0.000273,0.0002415,0.0002135,0.000203,0.0002037,0.0001995,0.00019705;0.000203,0.0002275,0.0002485,0.0002905,0.000308,0.0003045,0.000294,0.0002793,0.0002814,0.0002793,0.00028525,0.0002975,0.000315,0.0003143,0.00034125,0.00034755,0.00031325,0.000273,0.0002415,0.0002135,0.000203,0.0002037,0.0001995,0.00019705;0.000464,0.00052,0.000568,0.000664,0.000704,0.000696,0.000672,0.0006384,0.0006432,0.0006384,0.000652,0.00068,0.00072,0.0007184,0.00078,0.0007944,0.000716,0.000624,0.000552,0.000488,0.000464,0.0004656,0.000456,0.0004504;5.8e-05,6.5e-05,7.1e-05,8.3e-05,8.8e-05,8.7e-05,8.4e-05,7.98e-05,8.04e-05,7.98e-05,8.15e-05,8.5e-05,9.e-05,8.98e-05,9.75e-05,9.93e-05,8.95e-05,7.8e-05,6.9e-05,6.1e-05,5.8e-05,5.82e-05,5.7e-05,5.63e-05;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0.00029,0.000325,0.000355,0.000415,0.00044,0.000435,0.00042,0.000399,0.000402,0.000399,0.0004075,0.000425,0.00045,0.000449,0.0004875,0.0004965,0.0004475,0.00039,0.000345,0.000305,0.00029,0.000291,0.000285,0.0002815;0.00116,0.0013,0.00142,0.00166,0.00176,0.00174,0.00168,0.001596,0.001608,0.001596,0.00163,0.0017,0.0018,0.001796,0.00195,0.001986,0.00179,0.00156,0.00138,0.00122,0.00116,0.001164,0.00114,0.001126;0.00116,0.0013,0.00142,0.00166,0.00176,0.00174,0.00168,0.001596,0.001608,0.001596,0.00163,0.0017,0.0018,0.001796,0.00195,0.001986,0.00179,0.00156,0.00138,0.00122,0.00116,0.001164,0.00114,0.001126;0.000145,0.0001625,0.0001775,0.0002075,0.00022,0.0002175,0.00021,0.0001995,0.000201,0.0001995,0.00020375,0.0002125,0.000225,0.0002245,0.00024375,0.00024825,0.00022375,0.000195,0.0001725,0.0001525,0.000145,0.0001455,0.0001425,0.00014075;0.000145,0.0001625,0.0001775,0.0002075,0.00022,0.0002175,0.00021,0.0001995,0.000201,0.0001995,0.00020375,0.0002125,0.000225,0.0002245,0.00024375,0.00024825,0.00022375,0.000195,0.0001725,0.0001525,0.000145,0.0001455,0.0001425,0.00014075;0.000116,0.00013,0.000142,0.000166,0.000176,0.000174,0.000168,0.0001596,0.0001608,0.0001596,0.000163,0.00017,0.00018,0.0001796,0.000195,0.0001986,0.000179,0.000156,0.000138,0.000122,0.000116,0.0001164,0.000114,0.0001126;0.000406,0.000455,0.000497,0.000581,0.000616,0.000609,0.000588,0.0005586,0.0005628,0.0005586,0.0005705,0.000595,0.00063,0.0006286,0.0006825,0.0006951,0.0006265,0.000546,0.000483,0.000427,0.000406,0.0004074,0.000399,0.0003941;0.00348,0.0039,0.00426,0.00498,0.00528,0.00522,0.00504,0.004788,0.004824,0.004788,0.00489,0.0051,0.0054,0.005388,0.00585,0.005958,0.00537,0.00468,0.00414,0.00366,0.00348,0.003492,0.00342,0.003378;0.000406,0.000455,0.000497,0.000581,0.000616,0.000609,0.000588,0.0005586,0.0005628,0.0005586,0.0005705,0.000595,0.00063,0.0006286,0.0006825,0.0006951,0.0006265,0.000546,0.000483,0.000427,0.000406,0.0004074,0.000399,0.0003941;0.00058,0.00065,0.00071,0.00083,0.00088,0.00087,0.00084,0.000798,0.000804,0.000798,0.000815,0.00085,0.0009,0.000898,0.000975,0.000993,0.000895,0.00078,0.00069,0.00061,0.00058,0.000582,0.00057,0.000563;0.000232,0.00026,0.000284,0.000332,0.000352,0.000348,0.000336,0.0003192,0.0003216,0.0003192,0.000326,0.00034,0.00036,0.0003592,0.00039,0.0003972,0.000358,0.000312,0.000276,0.000244,0.000232,0.0002328,0.000228,0.0002252;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%节点无功;
Line=[1,1,2;2,2,3;3,3,4;4,4,5;5,5,6;6,6,7;7,7,8;8,8,9;9,9,10;10,10,11;11,11,12;12,12,13;13,13,14;14,14,15;15,15,16;16,16,17;17,5,25;18,25,26;19,26,27;20,27,28;21,28,29;22,29,30;23,30,31;24,31,32;25,1,18;26,18,19;27,19,20;28,20,21;29,2,22;30,22,23;31,23,24;32,33,1];%支路数据;
Pd=0.000018;%放电功率;
Pc=0.000018;%充电功率;
%Ndsum=[0;0;0;0;0;0;0;0;200;400;400;400;400;400;0;0;0;0;0;400;400;0;0;0];%上层调度放电电动汽车数量;
%Ncsum=[950;950;950;950;0;0;0;0;0;0;0;0;0;0;0;0;300;0;0;0;0;0;950;950];%上层调度充电电动汽车数量;
Ndsum=[0;0;0;0;0;0;0;0;160;160;160;160;160;160;0;0;0;0;0;160;80;0;0;0];%上层调度放电电动汽车数量(何立夫数据);
Ncsum=[380;380;380;360;110;0;0;0;0;0;0;0;0;0;0;0;60;0;0;0;0;0;350;380];%上层调度充电电动汽车数量(何立夫数据);
Nd_resid=zeros(24,1);Nc_resid=zeros(24,1);Nd_comme=zeros(24,1);Nc_comme=zeros(24,1);Nd_indus=zeros(24,1);Nc_indus=zeros(24,1);%区域电动汽车数量;
for t=1:24
if t<=17
%Nd_resid(t)=0.7*0.05*Ndsum(t);Nd_comme(t)=(0.2+0.7*0.15)*Ndsum(t);Nd_indus(t)=(0.1+0.7*0.8)*Ndsum(t);
Nd_resid(t)=0.7*6/112*Ndsum(t);Nd_comme(t)=(0.2+0.7*16/112)*Ndsum(t);Nd_indus(t)=(0.1+0.7*90/112)*Ndsum(t);%何立夫数据;
else
Nd_resid(t)=0.7*Ndsum(t);Nd_comme(t)=0.2*Ndsum(t);Nd_indus(t)=0.1*Ndsum(t);
end
if t>=8&t<=19
%Nc_resid(t)=0.7*11/210*Ncsum(t);Nc_comme(t)=(0.2+0.7*31/210)*Ncsum(t);Nc_indus(t)=(0.1+0.7*0.8)*Ncsum(t);
Nc_resid(t)=0.7/21*Ncsum(t);Nc_comme(t)=(0.2+0.7*6/42)*Ncsum(t);Nc_indus(t)=(0.1+0.7*34/42)*Ncsum(t);%何立夫数据;
else
Nc_resid(t)=0.7*Ncsum(t);Nc_comme(t)=0.2*Ncsum(t);Nc_indus(t)=0.1*Ncsum(t);
end
end
G=[21.4943686300000,-2.58137264300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5.11502111900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-13.7979748700000;-2.58137264300000,8.48018383100000,-3.47721018300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2.42160100500000,0,0,0,0,0,0,0,0,0,0,0;0,-3.47721018300000,6.81657689900000,-3.33936671600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,-3.33936671600000,4.46071128400000,-1.12134456700000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,-1.12134456700000,8.10810813700000,-0.717862656200000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6.26890091400000,0,0,0,0,0,0,0,0;0,0,0,0,-0.717862656200000,2.74899529300000,-2.03113263700000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,-2.03113263700000,3.05745447700000,-1.02632184000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,-1.02632184000000,2.04814808600000,-1.02182624600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,-1.02182624600000,8.37087266200000,-7.34904641600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,-7.34904641600000,11.2079846800000,-3.85893826600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,-3.85893826600000,4.53328987500000,-0.674351609300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,-0.674351609300000,1.75730975500000,-1.08295814500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,-1.08295814500000,2.59620713200000,-1.51324898700000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,-1.51324898700000,2.91389611100000,-1.40064712400000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,-1.40064712400000,1.84749781100000,-0.446850686600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.446850686600000,1.72121744600000,-1.27436675900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.27436675900000,1.27436675900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;-5.11502111900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5.70307629700000,-0.588055178500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.588055178500000,2.24312342000000,-1.65506824100000,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.65506824100000,2.47775884800000,-0.822690607300000,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.822690607300000,0.822690607300000,0,0,0,0,0,0,0,0,0,0,0,0;0,-2.42160100500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.52093297500000,-1.09933197000000,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.09933197000000,2.20881655800000,-1.10948458800000,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.10948458800000,1.10948458800000,0,0,0,0,0,0,0,0,0;0,0,0,0,-6.26890091400000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10.7474519100000,-4.47855099300000,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4.47855099300000,5.33007281800000,-0.851521824600000,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.851521824600000,1.98457500900000,-1.13305318400000,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.13305318400000,3.64061355000000,-2.50756036500000,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2.50756036500000,3.33967096700000,-0.832110601100000,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.832110601100000,3.02074490100000,-2.18863430000000,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2.18863430000000,3.54215431500000,-1.35352001500000,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.35352001500000,1.35352001500000,0;-13.7979748700000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13.7979748700000];%节点导纳矩阵实部;
B=[-13.2295494500000,1.31477215100000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4.88110247000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7.03367482600000;1.31477215100000,-4.74033254100000,1.77090704400000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.65465334600000,0,0,0,0,0,0,0,0,0,0,0;0,1.77090704400000,-3.47169707200000,1.70079002800000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,1.70079002800000,-2.66878833000000,0.967998301700000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0.967998301700000,-6.53405809200000,2.37293489100000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.19312489900000,0,0,0,0,0,0,0,0;0,0,0,0,2.37293489100000,-3.04417369200000,0.671238800900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0.671238800900000,-1.40859623900000,0.737357438600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0.737357438600000,-1.46164041000000,0.724282971500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0.724282971500000,-3.15402873500000,2.42974576300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,2.42974576300000,-3.70575152500000,1.27600576200000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,1.27600576200000,-1.80657531800000,0.530569556300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0.530569556300000,-1.95605120700000,1.42548165000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,1.42548165000000,-2.77229885300000,1.34681720300000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,1.34681720300000,-2.36966683800000,1.02284963500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,1.02284963500000,-1.61945943500000,0.596609799500000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.596609799500000,-2.56297141200000,1.96636161200000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96636161200000,-1.96636161200000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;4.88110247000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5.41098545700000,0.529882986900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.529882986900000,-2.46342302700000,1.93354004000000,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.93354004000000,-3.02129276500000,1.08775272400000,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.08775272400000,-1.08775272400000,0,0,0,0,0,0,0,0,0,0,0,0;0,1.65465334600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2.52273385800000,0.868080512000000,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.868080512000000,-1.73622743700000,0.868146924900000,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.868146924900000,-0.868146924900000,0,0,0,0,0,0,0,0,0;0,0,0,0,3.19312489900000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5.47337236100000,2.28024746200000,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.28024746200000,-3.03101793200000,0.750770469900000,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.750770469900000,-1.73785957800000,0.987089108300000,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.987089108300000,-2.26433906800000,1.27724996000000,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.27724996000000,-2.09962527700000,0.822375317000000,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.822375317000000,-3.37331494100000,2.55093962400000,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.55093962400000,-4.67926053900000,2.12832091500000,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.12832091500000,-2.12832091500000,0;7.03367482600000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7.03367482600000];%节点导纳矩阵虚部;
Vmin=[0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93;0.93];%节点电压最小值;
Vmax=[1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07;1.07];%节点电压最大值;
Plinemax=0.11;%线路功率传输上限;
%%%%%%%%%分时段%%%%%%%%%%
Ploss=zeros(24,1);Nd_data=zeros(33,24);Nc_data=zeros(33,24);Volta=zeros(33,24);Theta=zeros(33,24);
parfor t=1:24
%%%%%%%%%MISOCP模型求解%%%%%%%%%%
u=sdpvar(32,1);%u=Volta^2;
R=sdpvar(32,1);%R=Volta(i)*Volta(j)*cos(Theta(i)-Theta(j));
T=sdpvar(32,1);%T=Volta(i)*Volta(j)*sin(Theta(i)-Theta(j));
Nd=intvar(32,1);
Nc=intvar(32,1);
%Nd=zeros(32,1);%算例七,配电网中没有电动汽车;
%Nc=zeros(32,1);%算例七,配电网中没有电动汽车;
%%%%%%%%%%%目标函数%%%%%%%%%;
f=0;
for i=1:16
f=f-G(i,i+1)*(u(i)+u(i+1)-2*R(i));
end
f=f-G(5,25)*(u(5)+u(25)-2*R(17));
for i=18:24
f=f-G(i+7,i+8)*(u(i+7)+u(i+8)-2*R(i));
end
f=f-G(1,18)*(u(1)+u(18)-2*R(25));
for i=26:28
f=f-G(i-8,i-7)*(u(i-8)+u(i-7)-2*R(i));
end
f=f-G(2,22)*(u(2)+u(22)-2*R(29));
for i=30:31
f=f-G(i-8,i-7)*(u(i-8)+u(i-7)-2*R(i));
end
f=f-G(33,1)*(1.05*1.05+u(1)-2*R(32));
%%%%%约束条件%%%%%%%%
C=[R>=0,u>=Vmin.^2,u<=Vmax.^2,Nd>=0,Nc>=0,Nc<=50,Nd<=50];