juliav1.5 在复现程序时出现错误 MethodError: no method matching zero(::Type{Any} )

错误出现在这句程序上 : J = VSP * (α_by_bus[PQPV]*e_f’)
两个矩阵符合矩阵相乘的条件

VSP =
[1 , 1] = 0.0114074
[2 , 1] = -0.000222327
[3 , 1] = -0.000380759
[4 , 1] = -4.19836e-5
[6 , 1] = -6.22981e-5
[7 , 1] = -0.000457888
[8 , 1] = -0.000362298
[9 , 1] = -0.000200394
[10, 1] = -0.000328231
[11, 1] = 0.000410138
[12, 1] = 0.000352092
[13, 1] = 0.000334426
[14, 1] = 0.000196866
[15, 1] = -3.7056e-5
[16, 1] = -4.63379e-5
[17, 1] = -0.000909162
[18, 1] = -0.000670967
[19, 1] = -8.49158e-5
[20, 1] = -0.000498467
[21, 1] = -0.00215362
[22, 1] = -0.000626656
[23, 1] = -0.000135261
[24, 1] = -0.00165385
[25, 1] = -0.00243934
[26, 1] = -0.0010711
[27, 1] = 0.000188929
[28, 1] = 1.27799e-5
[29, 1] = -2.2897e-5
[30, 1] = -3.37157e-5
[31, 1] = -3.40499e-5
[32, 1] = -1.98718e-5
[33, 1] = -2.34791e-5
[34, 1] = -2.4232e-5
[36, 1] = 3.89365e-5
[37, 1] = 3.23391e-5
[38, 1] = -7.48517e-6
[39, 1] = -0.00015128
[40, 1] = -0.000260573
[41, 1] = 0.000168272
[42, 1] = 9.15822e-6
[43, 1] = -4.74411e-6
[44, 1] = -0.000215324
[45, 1] = 2.20781e-5
[46, 1] = 1.19918e-5
[47, 1] = 3.13236e-6
[49, 1] = -2.96852e-6
[50, 1] = 4.13805e-6
[51, 1] = 6.84317e-6
[52, 1] = 1.09801e-5
[53, 1] = 1.57394e-5
[55, 1] = -4.89364e-6
[56, 1] = 1.21539e-6
[57, 1] = 1.08035e-6
[64, 1] = 8.37048e-5
[1 , 2] = 4.71947e-5
[2 , 2] = 0.00645019
[3 , 2] = -7.23713e-5
[4 , 2] = -1.35459e-5
[6 , 2] = -8.03638e-5
[7 , 2] = -0.00045333
[8 , 2] = -0.000323294
[9 , 2] = -0.000179549
[10, 2] = -0.000296782
[11, 2] = 0.000391747
[12, 2] = 0.000336336
[13, 2] = 0.000319493
[14, 2] = 0.00018816
[15, 2] = -3.5299e-5
[16, 2] = -4.41408e-5
[17, 2] = -0.000969331
[18, 2] = -0.000648872
[19, 2] = -8.38017e-5
[20, 2] = -0.000491779
[21, 2] = -0.00216629
[22, 2] = -0.00061644
[23, 2] = -0.000132886
[24, 2] = -0.00162426
[25, 2] = -0.00239571
[26, 2] = -0.00105199
[27, 2] = 0.000185855
[28, 2] = 1.25141e-5
[29, 2] = -2.23641e-5
[30, 2] = -3.2931e-5
[31, 2] = -3.32575e-5
[32, 2] = -1.94094e-5
[33, 2] = -2.29326e-5
[34, 2] = -2.36681e-5
[36, 2] = 3.80303e-5
[37, 2] = 3.15865e-5
[38, 2] = -7.31097e-6
[39, 2] = -0.000148994
[40, 2] = -0.000255975
[41, 2] = 0.000165498
[42, 2] = 9.02644e-6
[43, 2] = -4.67584e-6
[44, 2] = -0.000212158
[45, 2] = 2.17604e-5
[46, 2] = 1.18192e-5
[47, 2] = 3.08729e-6
[49, 2] = -2.9258e-6
[50, 2] = 4.07851e-6
[51, 2] = 6.74471e-6
[52, 2] = 1.08221e-5
[53, 2] = 1.5513e-5
[55, 2] = -4.82323e-6
[56, 2] = 1.19791e-6
[57, 2] = 1.06481e-6
[64, 2] = 8.23813e-5
[1 , 3] = 4.85036e-6
[2 , 3] = 0.00016741
[3 , 3] = 0.000546204
[4 , 3] = 3.32986e-5
[6 , 3] = -9.21617e-5
[7 , 3] = -0.000437806
[8 , 3] = -0.000263925
[9 , 3] = -0.000147937
[10, 3] = -0.000249505
[11, 3] = 0.000367504
[12, 3] = 0.000315576
[13, 3] = 0.000299828
[14, 3] = 0.000176723
[15, 3] = -3.29491e-5
[16, 3] = -4.12023e-5
[17, 3] = -0.00108373
[18, 3] = -0.000622523
[19, 3] = -8.32689e-5
[20, 3] = -0.000488405
[21, 3] = -0.00222096
[22, 3] = -0.000609186
[23, 3] = -0.000131036
[24, 3] = -0.00160072
[25, 3] = -0.00236105
[26, 3] = -0.00103685
[27, 3] = 0.000183678
[28, 3] = 1.22703e-5
[29, 3] = -2.18332e-5
[30, 3] = -3.21493e-5
[31, 3] = -3.24679e-5
[32, 3] = -1.89486e-5
[33, 3] = -2.23882e-5
[34, 3] = -2.31062e-5
[36, 3] = 3.71275e-5
[37, 3] = 3.08367e-5
[38, 3] = -7.13741e-6
[39, 3] = -0.000147543
[40, 3] = -0.000252374
[41, 3] = 0.000163497
[42, 3] = 8.94961e-6
[43, 3] = -4.63604e-6
[44, 3] = -0.000210239
[45, 3] = 2.15752e-5
[46, 3] = 1.17186e-5
[47, 3] = 3.06101e-6
[49, 3] = -2.9009e-6
[50, 3] = 4.04379e-6
[51, 3] = 6.6873e-6
[52, 3] = 1.073e-5
[53, 3] = 1.53809e-5
[55, 3] = -4.78218e-6
[56, 3] = 1.18771e-6
[57, 3] = 1.05575e-6
[64, 3] = 8.14807e-5
[1 , 4] = -3.84959e-6
[2 , 4] = -0.000113374
[3 , 4] = -0.000351481
[4 , 4] = 0.00296446
[6 , 4] = -9.70343e-5
[7 , 4] = -0.000475536
[8 , 4] = -0.000341445
[9 , 4] = -0.00018925
[10, 4] = -0.000311458
[11, 4] = 0.000400787
[12, 4] = 0.000344082
[13, 4] = 0.000326837
[14, 4] = 0.000192447
[15, 4] = -3.61588e-5
[16, 4] = -4.52159e-5
[17, 4] = -0.000944514
[18, 4] = -0.00066011
[19, 4] = -8.44768e-5
[20, 4] = -0.000495807
[21, 4] = -0.00216523
[22, 4] = -0.000622309
[23, 4] = -0.000134228
[24, 4] = -0.00164092
[25, 4] = -0.00242027
[26, 4] = -0.00106276
[27, 4] = 0.000187622
[28, 4] = 1.26593e-5
[29, 4] = -2.26495e-5
[30, 4] = -3.33512e-5
[31, 4] = -3.36818e-5
[32, 4] = -1.9657e-5
[33, 4] = -2.32253e-5
[34, 4] = -2.397e-5
[36, 4] = 3.85156e-5
[37, 4] = 3.19895e-5
[38, 4] = -7.40425e-6
[39, 4] = -0.000150331
[40, 4] = -0.000258572
[41, 4] = 0.000167088
[42, 4] = 9.10444e-6
[43, 4] = -4.71625e-6
[44, 4] = -0.000214022
[45, 4] = 2.19484e-5
[46, 4] = 1.19214e-5
[47, 4] = 3.11396e-6
[49, 4] = -2.95108e-6
[50, 4] = 4.11375e-6
[51, 4] = 6.80298e-6
[52, 4] = 1.09156e-5
[53, 4] = 1.5647e-5
[55, 4] = -4.86491e-6
[56, 4] = 1.20826e-6
[57, 4] = 1.07401e-6
[64, 4] = 8.31471e-5
[1 , 5] = 3.4147e-6
[2 , 5] = 7.31578e-5
[3 , 5] = 0.000196453
[4 , 5] = 2.34545e-5
[5 , 5] = 0.000454341
[6 , 5] = -9.96634e-5
[7 , 5] = -0.000340843
[8 , 5] = -0.000190012
[9 , 5] = -0.000102193
[10, 5] = -0.000174387
[11, 5] = 0.000329521
[12, 5] = 0.000283262
[13, 5] = 0.000269439
[14, 5] = 0.00015962
[15, 5] = -2.95602e-5
[16, 5] = -3.69646e-5
[17, 5] = -0.00128868
[18, 5] = -0.000583999
[19, 5] = -8.33642e-5
[20, 5] = -0.000488535
[21, 5] = -0.00234434
[22, 5] = -0.000604646
[23, 5] = -0.000129613
[24, 5] = -0.00158171
[25, 5] = -0.00233308
[26, 5] = -0.00102472
[27, 5] = 0.000182419
[28, 5] = 1.20128e-5
[29, 5] = -2.12023e-5
[30, 5] = -3.12203e-5
[31, 5] = -3.15297e-5
[32, 5] = -1.84011e-5
[33, 5] = -2.17413e-5
[34, 5] = -2.24385e-5
[36, 5] = 3.60547e-5
[37, 5] = 2.99456e-5
[38, 5] = -6.93117e-6
[39, 5] = -0.000147054
[40, 5] = -0.000249768
[41, 5] = 0.000162334
[42, 5] = 8.93757e-6
[43, 5] = -4.62981e-6
[44, 5] = -0.000209776
[45, 5] = 2.15461e-5
[46, 5] = 1.17029e-5
[47, 5] = 3.05689e-6
[49, 5] = -2.897e-6
[50, 5] = 4.03835e-6
[51, 5] = 6.6783e-6
[52, 5] = 1.07155e-5
[53, 5] = 1.53602e-5
[55, 5] = -4.77574e-6
[56, 5] = 1.18611e-6
[57, 5] = 1.05433e-6
[64, 5] = 8.10534e-5
[1 , 6] = -3.29473e-6
[2 , 6] = -7.08543e-5
[3 , 6] = -0.000190673
[4 , 6] = -2.26304e-5
[6 , 6] = 0.00332305
[7 , 6] = 0.0021181
[8 , 6] = -0.000317183
[9 , 6] = -0.000185912
[10, 6] = -0.000316736
[11, 6] = 0.000405154
[12, 6] = 0.000347515
[13, 6] = 0.000329771
[14, 6] = 0.000193328
[15, 6] = -3.61192e-5
[16, 6] = -4.51664e-5
[17, 6] = -0.000914584
[18, 6] = -0.000663044
[19, 6] = -8.39608e-5
[20, 6] = -0.000492847
[21, 6] = -0.00213054
[22, 6] = -0.000618587
[23, 6] = -0.000133425
[24, 6] = -0.00163136
[25, 6] = -0.00240616
[26, 6] = -0.00105653
[27, 6] = 0.000186358
[28, 6] = 1.26063e-5
[29, 6] = -2.25877e-5
[30, 6] = -3.32603e-5
[31, 6] = -3.35899e-5
[32, 6] = -1.96034e-5
[33, 6] = -2.31619e-5
[34, 6] = -2.39047e-5
[36, 6] = 3.84105e-5
[37, 6] = 3.19023e-5
[38, 6] = -7.38406e-6
[39, 6] = -0.000149228
[40, 6] = -0.000256733
[41, 6] = 0.000165882
[42, 6] = 9.03701e-6
[43, 6] = -4.68132e-6
[44, 6] = -0.000212443
[45, 6] = 2.17859e-5
[46, 6] = 1.18331e-5
[47, 6] = 3.0909e-6
[49, 6] = -2.92923e-6
[50, 6] = 4.08328e-6
[51, 6] = 6.7526e-6
[52, 6] = 1.08347e-5
[53, 6] = 1.55311e-5
[55, 6] = -4.82888e-6
[56, 6] = 1.19931e-6
[57, 6] = 1.06606e-6
[64, 6] = 8.25421e-5
[1 , 7] = -2.92673e-6
[2 , 7] = -5.50448e-5
[3 , 7] = -0.000136155
[4 , 7] = -2.01048e-5
[6 , 7] = 0.00308628
[7 , 7] = 0.0198093
[8 , 7] = -0.00021578
[9 , 7] = -0.000188686
[10, 7] = -0.000382851
[11, 7] = 0.000462101
[12, 7] = 0.000394526
[13, 7] = 0.000372485
[14, 7] = 0.000213447
[15, 7] = -3.87682e-5
[16, 7] = -4.8479e-5
[17, 7] = -0.000747214
[18, 7] = -0.000726645
[19, 7] = -8.57808e-5
[20, 7] = -0.00050402
[21, 7] = -0.00202506
[22, 7] = -0.000633716
[23, 7] = -0.000136792
[24, 7] = -0.00167444
[25, 7] = -0.0024696
[26, 7] = -0.00108419
[27, 7] = 0.000190084
[28, 7] = 1.30838e-5
[29, 7] = -2.36731e-5
[30, 7] = -3.48585e-5
[31, 7] = -3.5204e-5
[32, 7] = -2.05454e-5
[33, 7] = -2.42749e-5
[34, 7] = -2.50533e-5
[36, 7] = 4.02562e-5
[37, 7] = 3.34353e-5
[38, 7] = -7.73888e-6
[39, 7] = -0.000151567
[40, 7] = -0.000261529
[41, 7] = 0.000168753
[42, 7] = 9.17098e-6
[43, 7] = -4.75071e-6
[44, 7] = -0.000215671
[45, 7] = 2.21088e-5
[46, 7] = 1.20085e-5
[47, 7] = 3.13672e-6
[49, 7] = -2.97265e-6
[50, 7] = 4.14381e-6
[51, 7] = 6.8527e-6
[52, 7] = 1.09954e-5
[53, 7] = 1.57614e-5
[55, 7] = -4.90046e-6
[56, 7] = 1.21709e-6
[57, 7] = 1.08186e-6
[64, 7] = 8.39044e-5
[1 , 8] = -6.21713e-6
[2 , 8] = -0.000119905
[3 , 8] = -0.000301749
[4 , 8] = -4.2707e-5
[6 , 8] = -5.23662e-6
[7 , 8] = -0.000259758
[8 , 8] = 0.0152748
[9 , 8] = -0.000202992
[10, 8] = -0.000405422
[11, 8] = 0.000472586
[12, 8] = 0.00040346
[13, 8] = 0.000380902
[14, 8] = 0.000218222
[15, 8] = -3.97393e-5
[16, 8] = -4.96933e-5
[17, 8] = -0.000681196
[18, 8] = -0.000736593
[19, 8] = -8.55229e-5
[20, 8] = -0.000502638
[21, 8] = -0.00198161
[22, 8] = -0.000633486
[23, 8] = -0.000136885
[24, 8] = -0.00167606
[25, 8] = -0.00247197
[26, 8] = -0.00108519
[27, 8] = 0.000189992
[28, 8] = 1.313e-5
[29, 8] = -2.38073e-5
[30, 8] = -3.50562e-5
[31, 8] = -3.54037e-5
[32, 8] = -2.06619e-5
[33, 8] = -2.44126e-5
[34, 8] = -2.51954e-5
[36, 8] = 4.04845e-5
[37, 8] = 3.36249e-5
[38, 8] = -7.78277e-6
[39, 8] = -0.000151335
[40, 8] = -0.000261688

[46, 45] = 0.00830741
[40, 117] = -3.39519e-5
[41, 117] = 0.000136521
[42, 117] = 1.8732e-5
[43, 117] = -9.70348e-6
[44, 117] = -0.000326225
[45, 117] = 4.5158e-5
[46, 117] = 2.45277e-5
[47, 117] = 6.40685e-6
[49, 117] = -6.07173e-6
[50, 117] = 8.46387e-6
[51, 117] = 1.39969e-5
[52, 117] = 2.24584e-5
[53, 117] = 3.21931e-5
[55, 117] = -1.00093e-5
[56, 117] = 2.48594e-6
[57, 117] = 2.20973e-6
[64, 117] = 0.000101248

α_by_bus[PQPV]*e_f’

α_by_bus[PQPV]*e_f’ = Any[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0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.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 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] α[1] α[1] α[1] α[1] α[1] α[1]
α[1] α[1] α[1] α[1]; α[2] α[2] α[2] α[2] α[2] α[2] α[2] α[2] α[2] α[2] α[2]; α[3] α[3] α[3] α[3] α[3] α[3] α[3] α[3] α[3] α[3] α[3]; α[4
] α[4] α[4] α[4] α[4] α[4] α[4] α[4] α[4] α[4] α[4]; α[5] α[5] α[5] α[5] α[5] α[5] α[5] α[5] α[5] α[5] α[5]; α[6] α[6] α[6] α[6] α[6] α[6
] α[6] α[6] α[6] α[6] α[6]; α[7] α[7] α[7] α[7] α[7] α[7] α[7] α[7] α[7] α[7] α[7]; α[8] α[8] α[8] α[8] α[8] α[8] α[8] α[8] α[8] α[8] α[8
]; α[9] α[9] α[9] α[9] α[9] α[9] α[9] α[9] α[9] α[9] α[9]; α[10] α[10] α[10] α[10] α[10] α[10] α[10] α[10] α[10] α[10] α[10]; α[11] α[11] α
[11] α[11] α[11] α[11] α[11] α[11] α[11] α[11] α[11]; α[12] α[12] α[12] α[12] α[12] α[12] α[12] α[12] α[12] α[12] α[12]; α[13] α[13] α[13] α[
13] α[13] α[13] α[13] α[13] α[13] α[13] α[13]; α[14] α[14] α[14] α[14] α[14] α[14] α[14] α[14] α[14] α[14] α[14]; α[15] α[15] α[15] α[15] α[1
5] α[15] α[15] α[15] α[15] α[15] α[15]; α[16] α[16] α[16] α[16] α[16] α[16] α[16] α[16] α[16] α[16] α[16]; α[17] α[17] α[17] α[17] α[17] α[17
] α[17] α[17] α[17] α[17] α[17]; α[18] α[18] α[18] α[18] α[18] α[18] α[18] α[18] α[18] α[18] α[18]; α[19] α[19] α[19] α[19] α[19] α[19] α[19]
α[19] α[19] α[19] α[19]; α[20] α[20] α[20] α[20] α[20] α[20] α[20] α[20] α[20] α[20] α[20]; α[21] α[21] α[21] α[21] α[21] α[21] α[21] α[21]
α[21] α[21] α[21]; α[22] α[22] α[22] α[22] α[22] α[22] α[22] α[22] α[22] α[22] α[22]; α[23] α[23] α[23] α[23] α[23] α[23] α[23] α[23] α[23]
α[23] α[23]; α[24] α[24] α[24] α[24] α[24] α[24] α[24] α[24] α[24] α[24] α[24]; α[25] α[25] α[25] α[25] α[25] α[25] α[25] α[25] α[25] α[25]
α[25]; α[26] α[26] α[26] α[26] α[26] α[26] α[26] α[26] α[26] α[26] α[26]; α[27] α[27] α[27] α[27] α[27] α[27] α[27] α[27] α[27] α[27] α[27];
α[28] α[28] α[28] α[28] α[28] α[28] α[28] α[28] α[28] α[28] α[28]; α[29] α[29] α[29] α[29] α[29] α[29] α[29] α[29] α[29] α[29] α[29]; α[31]
α[31] α[31] α[31] α[31] α[31] α[31] α[31] α[31] α[31] α[31]; α[32] α[32] α[32] α[32] α[32] α[32] α[32] α[32] α[32] α[32] α[32]; α[33] α[33]
α[33] α[33] α[33] α[33] α[33] α[33] α[33] α[33] α[33]; α[34] α[34] α[34] α[34] α[34] α[34] α[34] α[34] α[34] α[34] α[34]; α[35] α[35] α[35]
α[35] α[35] α[35] α[35] α[35] α[35] α[35] α[35]; α[36] α[36] α[36] α[36] α[36] α[36] α[36] α[36] α[36] α[36] α[36]; α[37] α[37] α[37] α[37]
α[37] α[37] α[37] α[37] α[37] α[37] α[37]; α[38] α[38] α[38] α[38] α[38] α[38] α[38] α[38] α[38] α[38] α[38]; α[39] α[39] α[39] α[39] α[39]
α[39] α[39] α[39] α[39] α[39] α[39]; α[40] α[40] α[40] α[40] α[40] α[40] α[40] α[40] α[40] α[40] α[40]; α[41] α[41] α[41] α[41] α[41] α[41]
α[41] α[41] α[41] α[41] α[41]; α[42] α[42] α[42] α[42] α[42] α[42] α[42] α[42] α[42] α[42] α[42]; α[43] α[43] α[43] α[43] α[43] α[43] α[43]
α[43] α[43] α[43] α[43]; α[44] α[44] α[44] α[44] α[44] α[44] α[44] α[44] α[44] α[44] α[44]; α[45] α[45] α[45] α[45] α[45] α[45] α[45] α[45]
α[45] α[45] α[45]; α[46] α[46] α[46] α[46] α[46] α[46] α[46] α[46] α[46] α[46] α[46]; α[47] α[47] α[47] α[47] α[47] α[47] α[47] α[47] α[47]
α[47] α[47]; α[48] α[48] α[48] α[48] α[48] α[48] α[48] α[48] α[48] α[48] α[48]; α[49] α[49] α[49] α[49] α[49] α[49] α[49] α[49] α[49] α[49]
α[49]; α[50] α[50] α[50] α[50] α[50] α[50] α[50] α[50] α[50] α[50] α[50]; α[51] α[51] α[51] α[51] α[51] α[51] α[51] α[51] α[51] α[51] α[51];
α[52] α[52] α[52] α[52] α[52] α[52] α[52] α[52] α[52] α[52] α[52]; α[53] α[53] α[53] α[53] α[53] α[53] α[53] α[53] α[53] α[53] α[53]; α[54]
α[54] α[54] α[54] α[54] α[54] α[54] α[54] α[54] α[54] α[54]]

建议上代码。。。。

谢谢,我想问一下只贴和这个错误相关的代码吗。

是的 ,但是请保证你的代码片段跑得起来。并且错误和这里一样。那些矩阵的话,你可以随机生成一个

您好,实在不好意思,我这个代码很麻烦不是只贴一段就可以的,我这篇程序的代码可以在https://github.com/korpuskel91/acccopf_pricing下载,您如果有时间的话,可以看一下,没有的话,就算了,打扰到您了,实在抱歉。运行的主程序需要在下下来后的src文件下新建一个jl文件,在julia1.5中运行此文件。
该程序的代码如下:

Load Packages

using Distributions, LinearAlgebra, SparseArrays, DataFrames, Dates # Basic Julia Utility
using CSV, JSON, JLD # For reading and writing data
using JuMP # Modeling Framework
using Mosek, MosekTools # Solver and Solver Environment for conic programs
using Ipopt # Interior-point solver for non-convex ACOPF

ENV[“Columns”] = 500 # Increase Default Column-Cutoff for better result display

Load Functions and model

include(“input.jl”) # Type definitons and read-in functions
include(“model_definitions.jl”) # AC-OPF and CC AC-OPF Models
include(“tools.jl”) # Some additional functions
include(“output.jl”) # Postprocessing of solved model

Load case data

casedat = load(“casedata/118bus.jld”)

Prepare Data

generators = casedat[“generators”]
buses = casedat[“buses”]
lines = casedat[“lines”]
generatorlist = casedat[“generatorlist”]

n_buses = length(buses)
n_lines = length(lines)
n_generators = length(generators)

refbus = 1
loadscale = 1.10
mvaBase = 100
thermalLimitscale = 0.6
theta_u = 15

line_limits= [175 175 500 175 175 175 500 500 500 175 175 175 175 175 175 175 175 175 175 175 500 175 175 175 175 175 175 175 175 175 500 500 500 175 175 500 175 500 175 175 140 175 175 175 175 175 175 175 175 500 500 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 500 175 175 500 500 500 500 500 500 500 175 175 500 175 500 175 175 500 500 175 175 175 175 175 175 175 500 175 175 175 175 175 175 500 500 175 500 500 200 200 175 175 175 500 500 175 175 500 500 500 175 500 500 175 175 175 175 175 175 175 175 175 175 200 175 175 175 175 175 175 175 175 175 500 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 500 175 175 175 500 175 175 175]

for i in 1:length(lines)
lines[i].u = 0.99*thermalLimitscale * line_limits[i]/mvaBase #定义线路的容量
end

Create Wind Farms

wp = 1.25
factor_σ = 1.25wp
voll = 10000
#给定发电厂的全年电力预测,见论文risk文献7 仿真部分给出
farms = Farm[]
push!(farms, Farm(70.0/100
wp, factor_σ 7.0/100, 3))
push!(farms, Farm(147.0/100
wp, factor_σ 14.7/100, 8))
push!(farms, Farm(102.0/100
wp, factor_σ 10.2/100, 11))
push!(farms, Farm(105.0/100
wp, factor_σ 10.5/100, 20))
push!(farms, Farm(113.0/100
wp, factor_σ 11.3/100, 24))
push!(farms, Farm(84.0/100
wp, factor_σ 8.4/100, 26))
push!(farms, Farm(59.0/100
wp, factor_σ * 5.9/100, 31))
push!(farms, Farm(250.0/100*wp, factor_σ 25.0/100, 38))
push!(farms, Farm(118.0/100
wp, factor_σ 11.8/100, 43))
push!(farms, Farm(76.0/100
wp, factor_σ 7.6/100, 49))
push!(farms, Farm(72.0/100
wp, factor_σ *7.2/100, 53))
n_farms = length(farms)

for (i,f) in enumerate(farms)
push!(buses[f.bus].farmids, i)
end

println("bus: ", n_buses)
println("line: ", n_lines)
println("gen: ", n_generators)
println("farm: ", n_farms)

PV = findall(b -> b.kind==:PV, buses)
PQ = findall(b -> b.kind==:PQ, buses)
REF = findall(b -> b.kind==:Ref, buses)
@assert length(REF) == 1

Run AC-OPF for linearization point

settings = Dict(
“ϵ” => 0.01,
“theta_u” => 180,
)
m_det = build_ac_opf(thermalLimitscale, generators, buses, lines, farms, settings);

solvetime = @elapsed optimize!(m_det)
objective_value(m_det)
println("Objective value: ", objective_value(m_det))

Run Model with respective settings

var_penalty = Dict(“p_G” => 100, “q_G” => 100, “v” => 100, “f_p” => 100, “f_q” => 100)

#通过这里设定是否有VA-CC参与,如果想要使用VA-CC模型则需要把这个Ψ(var_penalty)设置为0.1 1 10 100 1000.
#此时Ψ(var_penalty)中的Ψp Ψq Ψfp Ψfq 设置=0则说明此时的模型不为VA-cc
var_penalty = Dict(“p_G” => 0, “q_G” => 0, “v” => 0, “f_p” => 0, “f_q” => 0)

settings = Dict(
# Set risk-parameter ϵ < 0.5
“ϵ” => 0.01,
# Restrict voltage angle if numerical instability
# occurs (normally not necessary)
“theta_u” => 180,
# “single”: one alpha per generator (default);
#“split”: one alpha per wind-farm and generator
“alpha_mod” => “single”,#single
# hand dict with variance penalty to model
“var_penalty” => var_penalty,
# “det”: no chance constraints;
# “gen_cc”: chance constraints only on active power generation;
# “full_cc” all chance constraints
“run_type” => “full_cc”, #非常重要的注释
)

m_cc, meta = build_ac_cc_opf(generators, buses, lines, farms, settings, m_det; print_output=false);
solvetime_cc = @elapsed optimize!(m_cc)
termination_status(m_cc)

Show alpha sum for sanity check

println(objective_value(m_cc))

if length(size((m_cc[:α]))) == 1
sum(value.(m_cc[:α]))
else
[sum(value.(m_cc[:α])[:,i]) for i in 1:size(m_cc[:α])[2]]
end

Process Results

res_dfs = jump_to_df(m_cc, settings, buses, generators, lines, farms; solvetime = solvetime_cc);

Show Bus Results

display(res_dfs[1])

Show Line Results

display(res_dfs[2])

Show Global Results

display(res_dfs[3])

Show Detailed Alhpa

display(res_dfs[4])

你这个代码可读性太差了,代码全部是用纯文本提供的,看起来相当不舒服,建议学一下 markdown,使用规范的 markdown 来贴代码。这样别人也会愿意点进来看一下。举个例子,这样看起来会更舒服。

# Load Packages
using Distributions, LinearAlgebra, SparseArrays, DataFrames, Dates # Basic Julia Utility
using CSV, JSON, JLD # For reading and writing data
using JuMP # Modeling Framework
using Mosek, MosekTools # Solver and Solver Environment for conic programs
using Ipopt # Interior-point solver for non-convex ACOPF

ENV[“Columns”] = 500 # Increase Default Column-Cutoff for better result display

# Load Functions and model
include(“input.jl”) # Type definitons and read-in functions
include(“model_definitions.jl”) # AC-OPF and CC AC-OPF Models
include(“tools.jl”) # Some additional functions
include(“output.jl”) # Postprocessing of solved model

此外,你的部分代码无法运行,根据上下文推断,是少了一个 *?

push!(farms, Farm(70.0/100wp, factor_σ 7.0/100, 3))
LoadError: syntax: missing comma or ) in argument list

好了,我现在遇到你上面那个错误了。根据提示,找到这一行。但是我无法确定错误到底在哪,也许你应该去给原作者提 issue.

不好意思,刚才去上课没能及时答复您的消息,非常感谢您能抽出时间回答我的问题并给出建议,我会尝试和原作者提出这个问题的。谢谢!

您好!我在尝试复现同样的工作时跟您遇到了一样的问题,请问您现在有解决掉吗?

你好,这个问题我是通过将julia的版本和所需包的版本都安装成了作者程序中所要求的版本,然后再运行的话就没问题了,具体的原因我也不清楚,你可以尝试一下。

备案号:京ICP备17009874号-2