[已答复] Cplex求解出错

[复制链接]
yanyannia 发表于 2022-9-7 11:22:38
本帖最后由 yanyannia 于 2022-9-22 10:41 编辑

我的程序运行结果是“求解出错”,请各位大神帮忙看看,是约束有问题还是参数设置的问题呀?程序有点长~辛苦辛苦!我用的是matlab2019b,要安装yalmip和cplex12.9
链接:https://pan.baidu.com/s/1sM4Z4C8xAcal4WwLPxlUXA
提取码:jp55
安装过程参考:
https://blog.csdn.net/WASEFADG/article/details/118890809
https://blog.csdn.net/mushuiliu/article/details/110307213


clear
clc
tic

w_hy=binvar(2,1);
w_el=binvar(2,1);
sdpvar P_PV_1(3,9) P_PV_2(3,9);  
sdpvar P_cur_1(3,9) P_cur_2(3,9);
sdpvar P_M_1(3,9) P_M_2(3,9);     
sdpvar P_SL_1(3,9) P_SL_2(3,9);  
sdpvar P_evsh_1(3,9) P_evsh_2(3,9);
sdpvar P_ev_1(3,9) P_ev_2(3,9);  
sdpvar P_ESC_1(3,9) P_ESC_2(3,9);  
sdpvar P_ESD_1(3,9) P_ESD_2(3,9);   
sdpvar P_P2G_1(3,9) P_P2G_2(3,9);  
sdpvar F2(3,9);  
sdpvar F1(1,1);
sdpvar F2_v(3,9);

v_et_1=binvar(3,9);
v_et_2=binvar(3,9);
v_PV_1_up=binvar(3,9);
v_PV_1_down=binvar(3,9);
v_PV_2_up=binvar(3,9);
v_PV_2_down=binvar(3,9);

x_1=intvar(3,9);
x_2=intvar(3,9);
x_3=intvar(3,9);
x_4=intvar(3,9);
x_5=intvar(3,9);

x_H2EV_1=intvar(3,9);
x_H2EV_2=intvar(3,9);
x_H2EV_3=intvar(3,9);
x_H2EV_4=intvar(3,9);
x_H2EV_5=intvar(3,9);

x_EV_1=intvar(3,9);
x_EV_2=intvar(3,9);
x_EV_3=intvar(3,9);
x_EV_4=intvar(3,9);
x_EV_5=intvar(3,9);

f_EV_13_1=intvar(3,9);
f_EV_13_2=intvar(3,9);
f_EV_13_3=intvar(3,9);
f_EV_14_1=intvar(3,9);
f_EV_14_2=intvar(3,9);
f_EV_14_3=intvar(3,9);

q_H2EV_13=intvar(3,9);
q_H2EV_14=intvar(3,9);
f_H2EV_13_1=intvar(3,9);
f_H2EV_13_2=intvar(3,9);
f_H2EV_13_3=intvar(3,9);
f_H2EV_14_1=intvar(3,9);
f_H2EV_14_2=intvar(3,9);
f_H2EV_14_3=intvar(3,9);

m_EV_1=intvar(3,9);
m_EV_2=intvar(3,9);   

sdpvar Time_de_1(3,9) Time_de_2(3,9) Time_de_3(3,9) Time_de_4(3,9) Time_de_5(3,9);
sdpvar delta_x_1_1(3,9) delta_x_1_2(3,9) delta_x_1_3(3,9) delta_x_1_4(3,9) delta_x_1_5(3,9) delta_x_1_6(3,9);
sdpvar delta_x_2_1(3,9) delta_x_2_2(3,9) delta_x_2_3(3,9) delta_x_2_4(3,9) delta_x_2_5(3,9) delta_x_2_6(3,9);
sdpvar delta_x_3_1(3,9) delta_x_3_2(3,9) delta_x_3_3(3,9) delta_x_3_4(3,9) delta_x_3_5(3,9) delta_x_3_6(3,9);
sdpvar delta_x_4_1(3,9) delta_x_4_2(3,9) delta_x_4_3(3,9) delta_x_4_4(3,9) delta_x_4_5(3,9) delta_x_4_6(3,9);
sdpvar delta_x_5_1(3,9) delta_x_5_2(3,9) delta_x_5_3(3,9) delta_x_5_4(3,9) delta_x_5_5(3,9) delta_x_5_6(3,9);

sdpvar G_h2ev_1(3,9) G_h2ev_2(3,9);   
sdpvar G_sh_1(3,9) G_sh_2(3,9);   
sdpvar G_P2G_1(3,9) G_P2G_2(3,9);  

sdpvar pi_1(9,1) pi_2(9,1);
sdpvar nu(3,9) beta(3,9);
sdpvar epsilon(3,1);

alpha_1_1=binvar(9,9);
alpha_1_2=binvar(9,9);
alpha_1_3=binvar(9,9);%节点_时间(n,j)
alpha_2_1=binvar(9,9);
alpha_2_2=binvar(9,9);
alpha_2_3=binvar(9,9);%节点_时间

sdpvar kappa_1_1(9,9) kappa_1_2(9,9) kappa_1_3(9,9);%节点_时间(n,j)
sdpvar kappa_2_1(9,9) kappa_2_2(9,9) kappa_2_3(9,9);%节点_时间

sdpvar c_1_1(9,9) c_1_2(9,9) c_1_3(9,9);%节点_时间(n,j)
sdpvar c_2_1(9,9) c_2_2(9,9) c_2_3(9,9);%节点_时间

sdpvar M_H2EV_1(3,9) M_H2EV_2(3,9) M_P2G_1(3,9) M_P2G_2(3,9) M_HS_1(3,9) M_HS_2(3,9) Min_HS_1(3,9) Min_HS_2(3,9) H_FCS_1(3,9) H_FCS_2(3,9);

H_hy=[5000;5000];
H_P2G=[50;60];
H_HS=[3000;3000];
H_FCS=[50;50];  
C_hy=55;  
C_P2G=35100;  
C_HS=52.5;     
C_FCS=40;        
lambda_PVc=40;   
lambda_M=80;     
lambda_SL=107;   
lambda_epe=80;  
lambda_TN=0.67;      
lambda_hpe=80;   

C_max=[20;15;20;30;30];
C_1_MAX=C_max(1)*ones(3,9);
C_2_MAX=C_max(2)*ones(3,9);
C_3_MAX=C_max(3)*ones(3,9);
C_4_MAX=C_max(4)*ones(3,9);
C_5_MAX=C_max(5)*ones(3,9);
C_1_MAX_H=C_max(1)/6*ones(3,9);
C_2_MAX_H=C_max(2)/6*ones(3,9);
C_3_MAX_H=C_max(3)/6*ones(3,9);
C_4_MAX_H=C_max(4)/6*ones(3,9);
C_5_MAX_H=C_max(5)/6*ones(3,9);
delta_link=[1 0 0 1 0 0;0 1 0 0 1 0;0 0 1 0 0 1;1 1 1 0 0 0;0 0 0 1 1 1];
delta_station=[1 1 1 1 1 1;0 0 0 1 1 1];
q_EV_13=[5 5 5 5 5 5 5 5 5;15 15 15 15 15 15 15 15 15;12 12 12 12 12 12 12 12 12];
q_EV_14=[7 7 7 7 7 7 7 7 7;18 18 18 18 18 18 18 18 18;14 14 14 14 14 14 14 14 14];
f_p_min=zeros(3,9);
g=5;
e=0.015;

g_1_h=[0.0001;0.0029;0.0192;0.0686;0.1801;0.3915];
g_2_h=[0.0002;0.0038;0.0192;0.0607;0.1482;0.5691];
g_3_h=[0.0001;0.0026;0.0173;.0618;0.1620;0.3523];
g_4_h=[0.0000;0.0012;0.0093;0.0356;0.0607;0.5691];
g_5_h=[0.0000;0.0010;0.0077;0.0296;0.0506;0.4743];

pu_hy=100;
pu_ev=100;

eta_P2G=0.79;
chi_P2G=28.7;
HEO=1500*ones(1,9);
HEmin=[200;200];
eta_HC=0.8;
eta_HD=0.8;
Teta_HD=1/eta_HD;

SEO=20*ones(1,9);
SEmax=[40;30];
SEmin=[7;5];
P_L_1=[10 10 10 10 10 10 10 10 10;
20 20 20 20 20 20 20 20 20;
18 18 18 18 18 18 18 18 18];
P_L_2=[8 8 8 8 8 8 8 8 8;
18 18 18 18 18 18 18 18 18;
15 15 15 15 15 15 15 15 15];

P_ES_max=[10;10];
SE_Max_1=SEmax(1)*ones(3,9);
SE_Max_2=SEmax(2)*ones(3,9);
SE_Min_1=SEmin(1)*ones(3,9);
SE_Min_2=SEmin(2)*ones(3,9);
P_ES_max_1=P_ES_max(1)*ones(3,9);
P_ES_max_2=P_ES_max(2)*ones(3,9);
Un_1=ones(3,9);
%Un_2=ones(1,9);
eta_ESC=0.9;
eta_ESD=0.9;
Teta_ESD=1/eta_ESD;
P_PV_0_1=[0 0 0 0 0 0 0 0 0;
          40 40 40 40 40 40 40 40 40;
          25 25 25 25 25 25 25 25 25];
P_PV_0_2=[0 0 0 0 0 0 0 0 0;
          30 30 30 30 30 30 30 30 40;
          20 20 20 20 20 20 20 20 20];
P_PV_delta_1=[0 0 0 0 0 0 0 0 0;
          3 3 3 3 3 3 3 3 4;
          2 2 2 2 2 2 2 2 2];
P_PV_delta_2=[0 0 0 0 0 0 0 0 0;
          3 3 3 3 3 3 3 3 4;
          2 2 2 2 2 2 2 2 2];
Gamma_PV_1=2*ones(1,9);
Gamma_PV_2=1*ones(1,9);

r=5;
Dual_min=zeros(9,9);
Min_epsilon=zeros(3,1);
Max_epsilon=100;
Max_nu=15000;
M=1000;%大M

P_1_0=[0.7;0.2;0.1];
P_1_1=[0.1;0.1;0.8];
P_2_0=[0.8;0.1;0.1];
P_2_1=[0.1;0.2;0.7];
pi_0=[0.56;0.07;0.07;0.16;0.02;0.02;0.08;0.01;0.01];
P_k_1=[0.14285;0.14285;0.14285;0.5;0.5;0.5;8;8;8];
P_k_2=[0.125;2;7;0.125;2;7;0.125;2;7];
m_H2EV_1=[0 0 0 1 1 1 2 2 2;3 3 3 6 6 6 9 9 9;2 2 2 5 5 5 8 8 8];
m_H2EV_2=[0 1 2 0 1 2 0 1 2;2 5 8 2 5 8 2 5 8;2 4 6 2 4 6 2 4 6];  

u_1=m_H2EV_1*g*pu_hy;
u_2=m_H2EV_2*g*pu_hy;
H_HY_1=H_hy(1)*Un_1;
H_HY_2=H_hy(2)*Un_1;

C=[M_H2EV_1==(H_hy(1)*w_hy(1)).*Un_1
   M_H2EV_2==(H_hy(2)*w_hy(2)).*Un_1
   M_P2G_1==(H_P2G(1)*w_hy(1)).*Un_1
   M_P2G_2==(H_P2G(2)*w_hy(2)).*Un_1
   M_HS_1==(H_HS(1)*w_hy(1)).*Un_1  
   M_HS_2==(H_HS(2)*w_hy(2)).*Un_1
   Min_HS_1==(HEmin(1)*w_hy(1)).*Un_1
   Min_HS_2==(HEmin(2)*w_hy(2)).*Un_1];
C=[C
   H_FCS_1==(H_FCS(1)*w_el(1)).*Un_1%%约束(23)的上界
   H_FCS_2==(H_FCS(2)*w_el(2)).*Un_1];

%% 交通约束
%式(4)
C=[C
   x_1==x_H2EV_1+x_EV_1
   x_2==x_H2EV_2+x_EV_2
   x_3==x_H2EV_3+x_EV_3
   x_4==x_H2EV_4+x_EV_4
   x_5==x_H2EV_5+x_EV_5];
C=[C
   x_1<=C_1_MAX
   x_2<=C_2_MAX
   x_3<=C_3_MAX
   x_4<=C_4_MAX
   x_5<=C_5_MAX];
%式(5)
C=[C
   q_EV_13==f_EV_13_1+f_EV_13_2+f_EV_13_3
   q_EV_14==f_EV_14_1+f_EV_14_2+f_EV_14_3];
C=[C
   [x_EV_1(1,1);x_EV_2(1,1);x_EV_3(1,1);x_EV_4(1,1);x_EV_5(1,1)]==delta_link*[f_EV_13_1(1,1);f_EV_13_2(1,1);f_EV_13_3(1,1);f_EV_14_1(1,1);f_EV_14_2(1,1);f_EV_14_3(1,1)]
   [x_EV_1(1,2);x_EV_2(1,2);x_EV_3(1,2);x_EV_4(1,2);x_EV_5(1,2)]==delta_link*[f_EV_13_1(1,2);f_EV_13_2(1,2);f_EV_13_3(1,2);f_EV_14_1(1,2);f_EV_14_2(1,2);f_EV_14_3(1,2)]
   [x_EV_1(1,3);x_EV_2(1,3);x_EV_3(1,3);x_EV_4(1,3);x_EV_5(1,3)]==delta_link*[f_EV_13_1(1,3);f_EV_13_2(1,3);f_EV_13_3(1,3);f_EV_14_1(1,3);f_EV_14_2(1,3);f_EV_14_3(1,3)]
   [x_EV_1(1,4);x_EV_2(1,4);x_EV_3(1,4);x_EV_4(1,4);x_EV_5(1,4)]==delta_link*[f_EV_13_1(1,4);f_EV_13_2(1,4);f_EV_13_3(1,4);f_EV_14_1(1,4);f_EV_14_2(1,4);f_EV_14_3(1,4)]
   [x_EV_1(1,5);x_EV_2(1,5);x_EV_3(1,5);x_EV_4(1,5);x_EV_5(1,5)]==delta_link*[f_EV_13_1(1,5);f_EV_13_2(1,5);f_EV_13_3(1,5);f_EV_14_1(1,5);f_EV_14_2(1,5);f_EV_14_3(1,5)]
   [x_EV_1(1,6);x_EV_2(1,6);x_EV_3(1,6);x_EV_4(1,6);x_EV_5(1,6)]==delta_link*[f_EV_13_1(1,6);f_EV_13_2(1,6);f_EV_13_3(1,6);f_EV_14_1(1,6);f_EV_14_2(1,6);f_EV_14_3(1,6)]
   [x_EV_1(1,7);x_EV_2(1,7);x_EV_3(1,7);x_EV_4(1,7);x_EV_5(1,7)]==delta_link*[f_EV_13_1(1,7);f_EV_13_2(1,7);f_EV_13_3(1,7);f_EV_14_1(1,7);f_EV_14_2(1,7);f_EV_14_3(1,7)]
   [x_EV_1(1,8);x_EV_2(1,8);x_EV_3(1,8);x_EV_4(1,8);x_EV_5(1,8)]==delta_link*[f_EV_13_1(1,8);f_EV_13_2(1,8);f_EV_13_3(1,8);f_EV_14_1(1,8);f_EV_14_2(1,8);f_EV_14_3(1,8)]
   [x_EV_1(1,9);x_EV_2(1,9);x_EV_3(1,9);x_EV_4(1,9);x_EV_5(1,9)]==delta_link*[f_EV_13_1(1,9);f_EV_13_2(1,9);f_EV_13_3(1,9);f_EV_14_1(1,9);f_EV_14_2(1,9);f_EV_14_3(1,9)]
   [x_EV_1(2,1);x_EV_2(2,1);x_EV_3(2,1);x_EV_4(2,1);x_EV_5(2,1)]==delta_link*[f_EV_13_1(2,1);f_EV_13_2(2,1);f_EV_13_3(2,1);f_EV_14_1(2,1);f_EV_14_2(2,1);f_EV_14_3(2,1)]
   [x_EV_1(2,2);x_EV_2(2,2);x_EV_3(2,2);x_EV_4(2,2);x_EV_5(2,2)]==delta_link*[f_EV_13_1(2,2);f_EV_13_2(2,2);f_EV_13_3(2,2);f_EV_14_1(2,2);f_EV_14_2(2,2);f_EV_14_3(2,2)]
   [x_EV_1(2,3);x_EV_2(2,3);x_EV_3(2,3);x_EV_4(2,3);x_EV_5(2,3)]==delta_link*[f_EV_13_1(2,3);f_EV_13_2(2,3);f_EV_13_3(2,3);f_EV_14_1(2,3);f_EV_14_2(2,3);f_EV_14_3(2,3)]
   [x_EV_1(2,4);x_EV_2(2,4);x_EV_3(2,4);x_EV_4(2,4);x_EV_5(2,4)]==delta_link*[f_EV_13_1(2,4);f_EV_13_2(2,4);f_EV_13_3(2,4);f_EV_14_1(2,4);f_EV_14_2(2,4);f_EV_14_3(2,4)]
   [x_EV_1(2,5);x_EV_2(2,5);x_EV_3(2,5);x_EV_4(2,5);x_EV_5(2,5)]==delta_link*[f_EV_13_1(2,5);f_EV_13_2(2,5);f_EV_13_3(2,5);f_EV_14_1(2,5);f_EV_14_2(2,5);f_EV_14_3(2,5)]
   [x_EV_1(2,6);x_EV_2(2,6);x_EV_3(2,6);x_EV_4(2,6);x_EV_5(2,6)]==delta_link*[f_EV_13_1(2,6);f_EV_13_2(2,6);f_EV_13_3(2,6);f_EV_14_1(2,6);f_EV_14_2(2,6);f_EV_14_3(2,6)]
   [x_EV_1(2,7);x_EV_2(2,7);x_EV_3(2,7);x_EV_4(2,7);x_EV_5(2,7)]==delta_link*[f_EV_13_1(2,7);f_EV_13_2(2,7);f_EV_13_3(2,7);f_EV_14_1(2,7);f_EV_14_2(2,7);f_EV_14_3(2,7)]
   [x_EV_1(2,8);x_EV_2(2,8);x_EV_3(2,8);x_EV_4(2,8);x_EV_5(2,8)]==delta_link*[f_EV_13_1(2,8);f_EV_13_2(2,8);f_EV_13_3(2,8);f_EV_14_1(2,8);f_EV_14_2(2,8);f_EV_14_3(2,8)]
   [x_EV_1(3,9);x_EV_2(2,9);x_EV_3(2,9);x_EV_4(2,9);x_EV_5(2,9)]==delta_link*[f_EV_13_1(2,9);f_EV_13_2(2,9);f_EV_13_3(2,9);f_EV_14_1(2,9);f_EV_14_2(2,9);f_EV_14_3(2,9)]
   [x_EV_1(3,1);x_EV_2(3,1);x_EV_3(3,1);x_EV_4(3,1);x_EV_5(3,1)]==delta_link*[f_EV_13_1(3,1);f_EV_13_2(3,1);f_EV_13_3(3,1);f_EV_14_1(3,1);f_EV_14_2(3,1);f_EV_14_3(3,1)]
   [x_EV_1(3,2);x_EV_2(3,2);x_EV_3(3,2);x_EV_4(3,2);x_EV_5(3,2)]==delta_link*[f_EV_13_1(3,2);f_EV_13_2(3,2);f_EV_13_3(3,2);f_EV_14_1(3,2);f_EV_14_2(3,2);f_EV_14_3(3,2)]
   [x_EV_1(3,3);x_EV_2(3,3);x_EV_3(3,3);x_EV_4(3,3);x_EV_5(3,3)]==delta_link*[f_EV_13_1(3,3);f_EV_13_2(3,3);f_EV_13_3(3,3);f_EV_14_1(3,3);f_EV_14_2(3,3);f_EV_14_3(3,3)]
   [x_EV_1(3,4);x_EV_2(3,4);x_EV_3(3,4);x_EV_4(3,4);x_EV_5(3,4)]==delta_link*[f_EV_13_1(3,4);f_EV_13_2(3,4);f_EV_13_3(3,4);f_EV_14_1(3,4);f_EV_14_2(3,4);f_EV_14_3(3,4)]
   [x_EV_1(3,5);x_EV_2(3,5);x_EV_3(3,5);x_EV_4(3,5);x_EV_5(3,5)]==delta_link*[f_EV_13_1(3,5);f_EV_13_2(3,5);f_EV_13_3(3,5);f_EV_14_1(3,5);f_EV_14_2(3,5);f_EV_14_3(3,5)]
   [x_EV_1(3,6);x_EV_2(3,6);x_EV_3(3,6);x_EV_4(3,6);x_EV_5(3,6)]==delta_link*[f_EV_13_1(3,6);f_EV_13_2(3,6);f_EV_13_3(3,6);f_EV_14_1(3,6);f_EV_14_2(3,6);f_EV_14_3(3,6)]
   [x_EV_1(3,7);x_EV_2(3,7);x_EV_3(3,7);x_EV_4(3,7);x_EV_5(3,7)]==delta_link*[f_EV_13_1(3,7);f_EV_13_2(3,7);f_EV_13_3(3,7);f_EV_14_1(3,7);f_EV_14_2(3,7);f_EV_14_3(3,7)]
   [x_EV_1(3,8);x_EV_2(3,8);x_EV_3(3,8);x_EV_4(3,8);x_EV_5(3,8)]==delta_link*[f_EV_13_1(3,8);f_EV_13_2(3,8);f_EV_13_3(3,8);f_EV_14_1(3,8);f_EV_14_2(3,8);f_EV_14_3(3,8)]
   [x_EV_1(3,9);x_EV_2(3,9);x_EV_3(3,9);x_EV_4(3,9);x_EV_5(3,9)]==delta_link*[f_EV_13_1(3,9);f_EV_13_2(3,9);f_EV_13_3(3,9);f_EV_14_1(3,9);f_EV_14_2(3,9);f_EV_14_3(3,9)]];
C=[C
   f_EV_13_1>=f_p_min
   f_EV_13_2>=f_p_min
   f_EV_13_3>=f_p_min
   f_EV_14_1>=f_p_min
   f_EV_14_2>=f_p_min
   f_EV_14_3>=f_p_min];
%式(6)
C=[C
   q_H2EV_13==f_H2EV_13_1+f_H2EV_13_2+f_H2EV_13_3
   q_H2EV_14==f_H2EV_14_1+f_H2EV_14_2+f_H2EV_14_3];
C=[C
   [x_H2EV_1(1,1);x_H2EV_2(1,1);x_H2EV_3(1,1);x_H2EV_4(1,1);x_H2EV_5(1,1)]==delta_link*[f_H2EV_13_1(1,1);f_H2EV_13_2(1,1);f_H2EV_13_3(1,1);f_H2EV_14_1(1,1);f_H2EV_14_2(1,1);f_H2EV_14_3(1,1)]
   [x_H2EV_1(1,2);x_H2EV_2(1,2);x_H2EV_3(1,2);x_H2EV_4(1,2);x_H2EV_5(1,2)]==delta_link*[f_H2EV_13_1(1,2);f_H2EV_13_2(1,2);f_H2EV_13_3(1,2);f_H2EV_14_1(1,2);f_H2EV_14_2(1,2);f_H2EV_14_3(1,2)]
   [x_H2EV_1(1,3);x_H2EV_2(1,3);x_H2EV_3(1,3);x_H2EV_4(1,3);x_H2EV_5(1,3)]==delta_link*[f_H2EV_13_1(1,3);f_H2EV_13_2(1,3);f_H2EV_13_3(1,3);f_H2EV_14_1(1,3);f_H2EV_14_2(1,3);f_H2EV_14_3(1,3)]
   [x_H2EV_1(1,4);x_H2EV_2(1,4);x_H2EV_3(1,4);x_H2EV_4(1,4);x_H2EV_5(1,4)]==delta_link*[f_H2EV_13_1(1,4);f_H2EV_13_2(1,4);f_H2EV_13_3(1,4);f_H2EV_14_1(1,4);f_H2EV_14_2(1,4);f_H2EV_14_3(1,4)]
   [x_H2EV_1(1,5);x_H2EV_2(1,5);x_H2EV_3(1,5);x_H2EV_4(1,5);x_H2EV_5(1,5)]==delta_link*[f_H2EV_13_1(1,5);f_H2EV_13_2(1,5);f_H2EV_13_3(1,5);f_H2EV_14_1(1,5);f_H2EV_14_2(1,5);f_H2EV_14_3(1,5)]
   [x_H2EV_1(1,6);x_H2EV_2(1,6);x_H2EV_3(1,6);x_H2EV_4(1,6);x_H2EV_5(1,6)]==delta_link*[f_H2EV_13_1(1,6);f_H2EV_13_2(1,6);f_H2EV_13_3(1,6);f_H2EV_14_1(1,6);f_H2EV_14_2(1,6);f_H2EV_14_3(1,6)]
   [x_H2EV_1(1,7);x_H2EV_2(1,7);x_H2EV_3(1,7);x_H2EV_4(1,7);x_H2EV_5(1,7)]==delta_link*[f_H2EV_13_1(1,7);f_H2EV_13_2(1,7);f_H2EV_13_3(1,7);f_H2EV_14_1(1,7);f_H2EV_14_2(1,7);f_H2EV_14_3(1,7)]
   [x_H2EV_1(1,8);x_H2EV_2(1,8);x_H2EV_3(1,8);x_H2EV_4(1,8);x_H2EV_5(1,8)]==delta_link*[f_H2EV_13_1(1,8);f_H2EV_13_2(1,8);f_H2EV_13_3(1,8);f_H2EV_14_1(1,8);f_H2EV_14_2(1,8);f_H2EV_14_3(1,8)]
   [x_H2EV_1(1,9);x_H2EV_2(1,9);x_H2EV_3(1,9);x_H2EV_4(1,9);x_H2EV_5(1,9)]==delta_link*[f_H2EV_13_1(1,9);f_H2EV_13_2(1,9);f_H2EV_13_3(1,9);f_H2EV_14_1(1,9);f_H2EV_14_2(1,9);f_H2EV_14_3(1,9)]
   [x_H2EV_1(2,1);x_H2EV_2(2,1);x_H2EV_3(2,1);x_H2EV_4(2,1);x_H2EV_5(2,1)]==delta_link*[f_H2EV_13_1(2,1);f_H2EV_13_2(2,1);f_H2EV_13_3(2,1);f_H2EV_14_1(2,1);f_H2EV_14_2(2,1);f_H2EV_14_3(2,1)]
   [x_H2EV_1(2,2);x_H2EV_2(2,2);x_H2EV_3(2,2);x_H2EV_4(2,2);x_H2EV_5(2,2)]==delta_link*[f_H2EV_13_1(2,2);f_H2EV_13_2(2,2);f_H2EV_13_3(2,2);f_H2EV_14_1(2,2);f_H2EV_14_2(2,2);f_H2EV_14_3(2,2)]
   [x_H2EV_1(2,3);x_H2EV_2(2,3);x_H2EV_3(2,3);x_H2EV_4(2,3);x_H2EV_5(2,3)]==delta_link*[f_H2EV_13_1(2,3);f_H2EV_13_2(2,3);f_H2EV_13_3(2,3);f_H2EV_14_1(2,3);f_H2EV_14_2(2,3);f_H2EV_14_3(2,3)]
   [x_H2EV_1(2,4);x_H2EV_2(2,4);x_H2EV_3(2,4);x_H2EV_4(2,4);x_H2EV_5(2,4)]==delta_link*[f_H2EV_13_1(2,4);f_H2EV_13_2(2,4);f_H2EV_13_3(2,4);f_H2EV_14_1(2,4);f_H2EV_14_2(2,4);f_H2EV_14_3(2,4)]
   [x_H2EV_1(2,5);x_H2EV_2(2,5);x_H2EV_3(2,5);x_H2EV_4(2,5);x_H2EV_5(2,5)]==delta_link*[f_H2EV_13_1(2,5);f_H2EV_13_2(2,5);f_H2EV_13_3(2,5);f_H2EV_14_1(2,5);f_H2EV_14_2(2,5);f_H2EV_14_3(2,5)]
   [x_H2EV_1(2,6);x_H2EV_2(2,6);x_H2EV_3(2,6);x_H2EV_4(2,6);x_H2EV_5(2,6)]==delta_link*[f_H2EV_13_1(2,6);f_H2EV_13_2(2,6);f_H2EV_13_3(2,6);f_H2EV_14_1(2,6);f_H2EV_14_2(2,6);f_H2EV_14_3(2,6)]
   [x_H2EV_1(2,7);x_H2EV_2(2,7);x_H2EV_3(2,7);x_H2EV_4(2,7);x_H2EV_5(2,7)]==delta_link*[f_H2EV_13_1(2,7);f_H2EV_13_2(2,7);f_H2EV_13_3(2,7);f_H2EV_14_1(2,7);f_H2EV_14_2(2,7);f_H2EV_14_3(2,7)]
   [x_H2EV_1(2,8);x_H2EV_2(2,8);x_H2EV_3(2,8);x_H2EV_4(2,8);x_H2EV_5(2,8)]==delta_link*[f_H2EV_13_1(2,8);f_H2EV_13_2(2,8);f_H2EV_13_3(2,8);f_H2EV_14_1(2,8);f_H2EV_14_2(2,8);f_H2EV_14_3(2,8)]
   [x_H2EV_1(3,9);x_H2EV_2(2,9);x_H2EV_3(2,9);x_H2EV_4(2,9);x_H2EV_5(2,9)]==delta_link*[f_H2EV_13_1(2,9);f_H2EV_13_2(2,9);f_H2EV_13_3(2,9);f_H2EV_14_1(2,9);f_H2EV_14_2(2,9);f_H2EV_14_3(2,9)]
   [x_H2EV_1(3,1);x_H2EV_2(3,1);x_H2EV_3(3,1);x_H2EV_4(3,1);x_H2EV_5(3,1)]==delta_link*[f_H2EV_13_1(3,1);f_H2EV_13_2(3,1);f_H2EV_13_3(3,1);f_H2EV_14_1(3,1);f_H2EV_14_2(3,1);f_H2EV_14_3(3,1)]
   [x_H2EV_1(3,2);x_H2EV_2(3,2);x_H2EV_3(3,2);x_H2EV_4(3,2);x_H2EV_5(3,2)]==delta_link*[f_H2EV_13_1(3,2);f_H2EV_13_2(3,2);f_H2EV_13_3(3,2);f_H2EV_14_1(3,2);f_H2EV_14_2(3,2);f_H2EV_14_3(3,2)]
   [x_H2EV_1(3,3);x_H2EV_2(3,3);x_H2EV_3(3,3);x_H2EV_4(3,3);x_H2EV_5(3,3)]==delta_link*[f_H2EV_13_1(3,3);f_H2EV_13_2(3,3);f_H2EV_13_3(3,3);f_H2EV_14_1(3,3);f_H2EV_14_2(3,3);f_H2EV_14_3(3,3)]
   [x_H2EV_1(3,4);x_H2EV_2(3,4);x_H2EV_3(3,4);x_H2EV_4(3,4);x_H2EV_5(3,4)]==delta_link*[f_H2EV_13_1(3,4);f_H2EV_13_2(3,4);f_H2EV_13_3(3,4);f_H2EV_14_1(3,4);f_H2EV_14_2(3,4);f_H2EV_14_3(3,4)]
   [x_H2EV_1(3,5);x_H2EV_2(3,5);x_H2EV_3(3,5);x_H2EV_4(3,5);x_H2EV_5(3,5)]==delta_link*[f_H2EV_13_1(3,5);f_H2EV_13_2(3,5);f_H2EV_13_3(3,5);f_H2EV_14_1(3,5);f_H2EV_14_2(3,5);f_H2EV_14_3(3,5)]
   [x_H2EV_1(3,6);x_H2EV_2(3,6);x_H2EV_3(3,6);x_H2EV_4(3,6);x_H2EV_5(3,6)]==delta_link*[f_H2EV_13_1(3,6);f_H2EV_13_2(3,6);f_H2EV_13_3(3,6);f_H2EV_14_1(3,6);f_H2EV_14_2(3,6);f_H2EV_14_3(3,6)]
   [x_H2EV_1(3,7);x_H2EV_2(3,7);x_H2EV_3(3,7);x_H2EV_4(3,7);x_H2EV_5(3,7)]==delta_link*[f_H2EV_13_1(3,7);f_H2EV_13_2(3,7);f_H2EV_13_3(3,7);f_H2EV_14_1(3,7);f_H2EV_14_2(3,7);f_H2EV_14_3(3,7)]
   [x_H2EV_1(3,8);x_H2EV_2(3,8);x_H2EV_3(3,8);x_H2EV_4(3,8);x_H2EV_5(3,8)]==delta_link*[f_H2EV_13_1(3,8);f_H2EV_13_2(3,8);f_H2EV_13_3(3,8);f_H2EV_14_1(3,8);f_H2EV_14_2(3,8);f_H2EV_14_3(3,8)]
   [x_H2EV_1(3,9);x_H2EV_2(3,9);x_H2EV_3(3,9);x_H2EV_4(3,9);x_H2EV_5(3,9)]==delta_link*[f_H2EV_13_1(3,9);f_H2EV_13_2(3,9);f_H2EV_13_3(3,9);f_H2EV_14_1(3,9);f_H2EV_14_2(3,9);f_H2EV_14_3(3,9)]];
C=[C
   f_H2EV_13_1>=f_p_min
   f_H2EV_13_2>=f_p_min
   f_H2EV_13_3>=f_p_min
   f_H2EV_14_1>=f_p_min
   f_H2EV_14_2>=f_p_min
   f_H2EV_14_3>=f_p_min];
%式(7)
C=[C
   m_EV_1+m_EV_2==q_EV_13+q_EV_14];
C=[C
   [f_EV_13_1(1,1);f_EV_13_2(1,1);f_EV_13_3(1,1);f_EV_14_1(1,1);f_EV_14_2(1,1);f_EV_14_3(1,1)]<=delta_station'*[m_EV_1(1,1);m_EV_2(1,1)]
   [f_EV_13_1(1,2);f_EV_13_2(1,2);f_EV_13_3(1,2);f_EV_14_1(1,2);f_EV_14_2(1,2);f_EV_14_3(1,2)]<=delta_station'*[m_EV_1(1,2);m_EV_2(1,2)]
   [f_EV_13_1(1,3);f_EV_13_2(1,3);f_EV_13_3(1,3);f_EV_14_1(1,3);f_EV_14_2(1,3);f_EV_14_3(1,3)]<=delta_station'*[m_EV_1(1,3);m_EV_2(1,3)]
   [f_EV_13_1(1,4);f_EV_13_2(1,4);f_EV_13_3(1,4);f_EV_14_1(1,4);f_EV_14_2(1,4);f_EV_14_3(1,4)]<=delta_station'*[m_EV_1(1,4);m_EV_2(1,4)]
   [f_EV_13_1(1,5);f_EV_13_2(1,5);f_EV_13_3(1,5);f_EV_14_1(1,5);f_EV_14_2(1,5);f_EV_14_3(1,5)]<=delta_station'*[m_EV_1(1,5);m_EV_2(1,5)]
   [f_EV_13_1(1,6);f_EV_13_2(1,6);f_EV_13_3(1,6);f_EV_14_1(1,6);f_EV_14_2(1,6);f_EV_14_3(1,6)]<=delta_station'*[m_EV_1(1,6);m_EV_2(1,6)]
   [f_EV_13_1(1,7);f_EV_13_2(1,7);f_EV_13_3(1,7);f_EV_14_1(1,7);f_EV_14_2(1,7);f_EV_14_3(1,7)]<=delta_station'*[m_EV_1(1,7);m_EV_2(1,7)]
   [f_EV_13_1(1,8);f_EV_13_2(1,8);f_EV_13_3(1,8);f_EV_14_1(1,8);f_EV_14_2(1,8);f_EV_14_3(1,8)]<=delta_station'*[m_EV_1(1,8);m_EV_2(1,8)]
   [f_EV_13_1(1,9);f_EV_13_2(1,9);f_EV_13_3(1,9);f_EV_14_1(1,9);f_EV_14_2(1,9);f_EV_14_3(1,9)]<=delta_station'*[m_EV_1(1,9);m_EV_2(1,9)]
   [f_EV_13_1(2,1);f_EV_13_2(2,1);f_EV_13_3(2,1);f_EV_14_1(2,1);f_EV_14_2(2,1);f_EV_14_3(2,1)]<=delta_station'*[m_EV_1(2,1);m_EV_2(2,1)]
   [f_EV_13_1(2,2);f_EV_13_2(2,2);f_EV_13_3(2,2);f_EV_14_1(2,2);f_EV_14_2(2,2);f_EV_14_3(2,2)]<=delta_station'*[m_EV_1(2,2);m_EV_2(2,2)]
   [f_EV_13_1(2,3);f_EV_13_2(2,3);f_EV_13_3(2,3);f_EV_14_1(2,3);f_EV_14_2(2,3);f_EV_14_3(2,3)]<=delta_station'*[m_EV_1(2,3);m_EV_2(2,3)]
   [f_EV_13_1(2,4);f_EV_13_2(2,4);f_EV_13_3(2,4);f_EV_14_1(2,4);f_EV_14_2(2,4);f_EV_14_3(2,4)]<=delta_station'*[m_EV_1(2,4);m_EV_2(2,4)]
   [f_EV_13_1(2,5);f_EV_13_2(2,5);f_EV_13_3(2,5);f_EV_14_1(2,5);f_EV_14_2(2,5);f_EV_14_3(2,5)]<=delta_station'*[m_EV_1(2,5);m_EV_2(2,5)]
   [f_EV_13_1(2,6);f_EV_13_2(2,6);f_EV_13_3(2,6);f_EV_14_1(2,6);f_EV_14_2(2,6);f_EV_14_3(2,6)]<=delta_station'*[m_EV_1(2,6);m_EV_2(2,6)]
   [f_EV_13_1(2,7);f_EV_13_2(2,7);f_EV_13_3(2,7);f_EV_14_1(2,7);f_EV_14_2(2,7);f_EV_14_3(2,7)]<=delta_station'*[m_EV_1(2,7);m_EV_2(2,7)]
   [f_EV_13_1(2,8);f_EV_13_2(2,8);f_EV_13_3(2,8);f_EV_14_1(2,8);f_EV_14_2(2,8);f_EV_14_3(2,8)]<=delta_station'*[m_EV_1(2,8);m_EV_2(2,8)]
   [f_EV_13_1(2,9);f_EV_13_2(2,9);f_EV_13_3(2,9);f_EV_14_1(2,9);f_EV_14_2(2,9);f_EV_14_3(2,9)]<=delta_station'*[m_EV_1(2,9);m_EV_2(2,9)]
   [f_EV_13_1(3,1);f_EV_13_2(3,1);f_EV_13_3(3,1);f_EV_14_1(3,1);f_EV_14_2(3,1);f_EV_14_3(3,1)]<=delta_station'*[m_EV_1(3,1);m_EV_2(3,1)]   
   [f_EV_13_1(3,2);f_EV_13_2(3,2);f_EV_13_3(3,2);f_EV_14_1(3,2);f_EV_14_2(3,2);f_EV_14_3(3,2)]<=delta_station'*[m_EV_1(3,2);m_EV_2(3,2)]   
   [f_EV_13_1(3,3);f_EV_13_2(3,3);f_EV_13_3(3,3);f_EV_14_1(3,3);f_EV_14_2(3,3);f_EV_14_3(3,3)]<=delta_station'*[m_EV_1(3,3);m_EV_2(3,3)]   
   [f_EV_13_1(3,4);f_EV_13_2(3,4);f_EV_13_3(3,4);f_EV_14_1(3,4);f_EV_14_2(3,4);f_EV_14_3(3,4)]<=delta_station'*[m_EV_1(3,4);m_EV_2(3,4)]   
   [f_EV_13_1(3,5);f_EV_13_2(3,5);f_EV_13_3(3,5);f_EV_14_1(3,5);f_EV_14_2(3,5);f_EV_14_3(3,5)]<=delta_station'*[m_EV_1(3,5);m_EV_2(3,5)]   
   [f_EV_13_1(3,6);f_EV_13_2(3,6);f_EV_13_3(3,6);f_EV_14_1(3,6);f_EV_14_2(3,6);f_EV_14_3(3,6)]<=delta_station'*[m_EV_1(3,6);m_EV_2(3,6)]   
   [f_EV_13_1(3,7);f_EV_13_2(3,7);f_EV_13_3(3,7);f_EV_14_1(3,7);f_EV_14_2(3,7);f_EV_14_3(3,7)]<=delta_station'*[m_EV_1(3,7);m_EV_2(3,7)]   
   [f_EV_13_1(3,8);f_EV_13_2(3,8);f_EV_13_3(3,8);f_EV_14_1(3,8);f_EV_14_2(3,8);f_EV_14_3(3,8)]<=delta_station'*[m_EV_1(3,8);m_EV_2(3,8)]   
   [f_EV_13_1(3,9);f_EV_13_2(3,9);f_EV_13_3(3,9);f_EV_14_1(3,9);f_EV_14_2(3,9);f_EV_14_3(3,9)]<=delta_station'*[m_EV_1(3,9);m_EV_2(3,9)]];
C=[C
   [m_EV_1(1,1);m_EV_2(1,1)]<=delta_station*[f_EV_13_1(1,1);f_EV_13_2(1,1);f_EV_13_3(1,1);f_EV_14_1(1,1);f_EV_14_2(1,1);f_EV_14_3(1,1)]
   [m_EV_1(1,2);m_EV_2(1,2)]<=delta_station*[f_EV_13_1(1,2);f_EV_13_2(1,2);f_EV_13_3(1,2);f_EV_14_1(1,2);f_EV_14_2(1,2);f_EV_14_3(1,2)]
   [m_EV_1(1,3);m_EV_2(1,3)]<=delta_station*[f_EV_13_1(1,3);f_EV_13_2(1,3);f_EV_13_3(1,3);f_EV_14_1(1,3);f_EV_14_2(1,3);f_EV_14_3(1,3)]
   [m_EV_1(1,4);m_EV_2(1,4)]<=delta_station*[f_EV_13_1(1,4);f_EV_13_2(1,4);f_EV_13_3(1,4);f_EV_14_1(1,4);f_EV_14_2(1,4);f_EV_14_3(1,4)]
   [m_EV_1(1,5);m_EV_2(1,5)]<=delta_station*[f_EV_13_1(1,5);f_EV_13_2(1,5);f_EV_13_3(1,5);f_EV_14_1(1,5);f_EV_14_2(1,5);f_EV_14_3(1,5)]
   [m_EV_1(1,6);m_EV_2(1,6)]<=delta_station*[f_EV_13_1(1,6);f_EV_13_2(1,6);f_EV_13_3(1,6);f_EV_14_1(1,6);f_EV_14_2(1,6);f_EV_14_3(1,6)]
   [m_EV_1(1,7);m_EV_2(1,7)]<=delta_station*[f_EV_13_1(1,7);f_EV_13_2(1,7);f_EV_13_3(1,7);f_EV_14_1(1,7);f_EV_14_2(1,7);f_EV_14_3(1,7)]
   [m_EV_1(1,8);m_EV_2(1,8)]<=delta_station*[f_EV_13_1(1,8);f_EV_13_2(1,8);f_EV_13_3(1,8);f_EV_14_1(1,8);f_EV_14_2(1,8);f_EV_14_3(1,8)]
   [m_EV_1(1,9);m_EV_2(1,9)]<=delta_station*[f_EV_13_1(1,9);f_EV_13_2(1,9);f_EV_13_3(1,9);f_EV_14_1(1,9);f_EV_14_2(1,9);f_EV_14_3(1,9)]
   [m_EV_1(2,1);m_EV_2(2,1)]<=delta_station*[f_EV_13_1(2,1);f_EV_13_2(2,1);f_EV_13_3(2,1);f_EV_14_1(2,1);f_EV_14_2(2,1);f_EV_14_3(2,1)]
   [m_EV_1(2,2);m_EV_2(2,2)]<=delta_station*[f_EV_13_1(2,2);f_EV_13_2(2,2);f_EV_13_3(2,2);f_EV_14_1(2,2);f_EV_14_2(2,2);f_EV_14_3(2,2)]
   [m_EV_1(2,3);m_EV_2(2,3)]<=delta_station*[f_EV_13_1(2,3);f_EV_13_2(2,3);f_EV_13_3(2,3);f_EV_14_1(2,3);f_EV_14_2(2,3);f_EV_14_3(2,3)]
   [m_EV_1(2,4);m_EV_2(2,4)]<=delta_station*[f_EV_13_1(2,4);f_EV_13_2(2,4);f_EV_13_3(2,4);f_EV_14_1(2,4);f_EV_14_2(2,4);f_EV_14_3(2,4)]
   [m_EV_1(2,5);m_EV_2(2,5)]<=delta_station*[f_EV_13_1(2,5);f_EV_13_2(2,5);f_EV_13_3(2,5);f_EV_14_1(2,5);f_EV_14_2(2,5);f_EV_14_3(2,5)]
   [m_EV_1(2,6);m_EV_2(2,6)]<=delta_station*[f_EV_13_1(2,6);f_EV_13_2(2,6);f_EV_13_3(2,6);f_EV_14_1(2,6);f_EV_14_2(2,6);f_EV_14_3(2,6)]
   [m_EV_1(2,7);m_EV_2(2,7)]<=delta_station*[f_EV_13_1(2,7);f_EV_13_2(2,7);f_EV_13_3(2,7);f_EV_14_1(2,7);f_EV_14_2(2,7);f_EV_14_3(2,7)]
   [m_EV_1(2,8);m_EV_2(2,8)]<=delta_station*[f_EV_13_1(2,8);f_EV_13_2(2,8);f_EV_13_3(2,8);f_EV_14_1(2,8);f_EV_14_2(2,8);f_EV_14_3(2,8)]
   [m_EV_1(2,9);m_EV_2(2,9)]<=delta_station*[f_EV_13_1(2,9);f_EV_13_2(2,9);f_EV_13_3(2,9);f_EV_14_1(2,9);f_EV_14_2(2,9);f_EV_14_3(2,9)]
   [m_EV_1(3,1);m_EV_2(3,1)]<=delta_station*[f_EV_13_1(3,1);f_EV_13_2(3,1);f_EV_13_3(3,1);f_EV_14_1(3,1);f_EV_14_2(3,1);f_EV_14_3(3,1)]  
   [m_EV_1(3,2);m_EV_2(3,2)]<=delta_station*[f_EV_13_1(3,2);f_EV_13_2(3,2);f_EV_13_3(3,2);f_EV_14_1(3,2);f_EV_14_2(3,2);f_EV_14_3(3,2)]
   [m_EV_1(3,3);m_EV_2(3,3)]<=delta_station*[f_EV_13_1(3,3);f_EV_13_2(3,3);f_EV_13_3(3,3);f_EV_14_1(3,3);f_EV_14_2(3,3);f_EV_14_3(3,3)]
   [m_EV_1(3,4);m_EV_2(3,4)]<=delta_station*[f_EV_13_1(3,4);f_EV_13_2(3,4);f_EV_13_3(3,4);f_EV_14_1(3,4);f_EV_14_2(3,4);f_EV_14_3(3,4)]
   [m_EV_1(3,5);m_EV_2(3,5)]<=delta_station*[f_EV_13_1(3,5);f_EV_13_2(3,5);f_EV_13_3(3,5);f_EV_14_1(3,5);f_EV_14_2(3,5);f_EV_14_3(3,5)]
   [m_EV_1(3,6);m_EV_2(3,6)]<=delta_station*[f_EV_13_1(3,6);f_EV_13_2(3,6);f_EV_13_3(3,6);f_EV_14_1(3,6);f_EV_14_2(3,6);f_EV_14_3(3,6)]   
   [m_EV_1(3,7);m_EV_2(3,7)]<=delta_station*[f_EV_13_1(3,7);f_EV_13_2(3,7);f_EV_13_3(3,7);f_EV_14_1(3,7);f_EV_14_2(3,7);f_EV_14_3(3,7)]   
   [m_EV_1(3,8);m_EV_2(3,8)]<=delta_station*[f_EV_13_1(3,8);f_EV_13_2(3,8);f_EV_13_3(3,8);f_EV_14_1(3,8);f_EV_14_2(3,8);f_EV_14_3(3,8)]   
   [m_EV_1(3,9);m_EV_2(3,9)]<=delta_station*[f_EV_13_1(3,9);f_EV_13_2(3,9);f_EV_13_3(3,9);f_EV_14_1(3,9);f_EV_14_2(3,9);f_EV_14_3(3,9)]];
%式(8)
C=[C
   m_H2EV_1+m_H2EV_2==q_H2EV_13+q_H2EV_14];
C=[C
   [f_H2EV_13_1(1,1);f_H2EV_13_2(1,1);f_H2EV_13_3(1,1);f_H2EV_14_1(1,1);f_H2EV_14_2(1,1);f_H2EV_14_3(1,1)]<=delta_station'*[m_H2EV_1(1,1);m_H2EV_2(1,1)]
   [f_H2EV_13_1(1,2);f_H2EV_13_2(1,2);f_H2EV_13_3(1,2);f_H2EV_14_1(1,2);f_H2EV_14_2(1,2);f_H2EV_14_3(1,2)]<=delta_station'*[m_H2EV_1(1,2);m_H2EV_2(1,2)]
   [f_H2EV_13_1(1,3);f_H2EV_13_2(1,3);f_H2EV_13_3(1,3);f_H2EV_14_1(1,3);f_H2EV_14_2(1,3);f_H2EV_14_3(1,3)]<=delta_station'*[m_H2EV_1(1,3);m_H2EV_2(1,3)]
   [f_H2EV_13_1(1,4);f_H2EV_13_2(1,4);f_H2EV_13_3(1,4);f_H2EV_14_1(1,4);f_H2EV_14_2(1,4);f_H2EV_14_3(1,4)]<=delta_station'*[m_H2EV_1(1,4);m_H2EV_2(1,4)]
   [f_H2EV_13_1(1,5);f_H2EV_13_2(1,5);f_H2EV_13_3(1,5);f_H2EV_14_1(1,5);f_H2EV_14_2(1,5);f_H2EV_14_3(1,5)]<=delta_station'*[m_H2EV_1(1,5);m_H2EV_2(1,5)]
   [f_H2EV_13_1(1,6);f_H2EV_13_2(1,6);f_H2EV_13_3(1,6);f_H2EV_14_1(1,6);f_H2EV_14_2(1,6);f_H2EV_14_3(1,6)]<=delta_station'*[m_H2EV_1(1,6);m_H2EV_2(1,6)]
   [f_H2EV_13_1(1,7);f_H2EV_13_2(1,7);f_H2EV_13_3(1,7);f_H2EV_14_1(1,7);f_H2EV_14_2(1,7);f_H2EV_14_3(1,7)]<=delta_station'*[m_H2EV_1(1,7);m_H2EV_2(1,7)]
   [f_H2EV_13_1(1,8);f_H2EV_13_2(1,8);f_H2EV_13_3(1,8);f_H2EV_14_1(1,8);f_H2EV_14_2(1,8);f_H2EV_14_3(1,8)]<=delta_station'*[m_H2EV_1(1,8);m_H2EV_2(1,8)]
   [f_H2EV_13_1(1,9);f_H2EV_13_2(1,9);f_H2EV_13_3(1,9);f_H2EV_14_1(1,9);f_H2EV_14_2(1,9);f_H2EV_14_3(1,9)]<=delta_station'*[m_H2EV_1(1,9);m_H2EV_2(1,9)]
   [f_H2EV_13_1(2,1);f_H2EV_13_2(2,1);f_H2EV_13_3(2,1);f_H2EV_14_1(2,1);f_H2EV_14_2(2,1);f_H2EV_14_3(2,1)]<=delta_station'*[m_H2EV_1(2,1);m_H2EV_2(2,1)]
   [f_H2EV_13_1(2,2);f_H2EV_13_2(2,2);f_H2EV_13_3(2,2);f_H2EV_14_1(2,2);f_H2EV_14_2(2,2);f_H2EV_14_3(2,2)]<=delta_station'*[m_H2EV_1(2,2);m_H2EV_2(2,2)]
   [f_H2EV_13_1(2,3);f_H2EV_13_2(2,3);f_H2EV_13_3(2,3);f_H2EV_14_1(2,3);f_H2EV_14_2(2,3);f_H2EV_14_3(2,3)]<=delta_station'*[m_H2EV_1(2,3);m_H2EV_2(2,3)]
   [f_H2EV_13_1(2,4);f_H2EV_13_2(2,4);f_H2EV_13_3(2,4);f_H2EV_14_1(2,4);f_H2EV_14_2(2,4);f_H2EV_14_3(2,4)]<=delta_station'*[m_H2EV_1(2,4);m_H2EV_2(2,4)]
   [f_H2EV_13_1(2,5);f_H2EV_13_2(2,5);f_H2EV_13_3(2,5);f_H2EV_14_1(2,5);f_H2EV_14_2(2,5);f_H2EV_14_3(2,5)]<=delta_station'*[m_H2EV_1(2,5);m_H2EV_2(2,5)]
   [f_H2EV_13_1(2,6);f_H2EV_13_2(2,6);f_H2EV_13_3(2,6);f_H2EV_14_1(2,6);f_H2EV_14_2(2,6);f_H2EV_14_3(2,6)]<=delta_station'*[m_H2EV_1(2,6);m_H2EV_2(2,6)]
   [f_H2EV_13_1(2,7);f_H2EV_13_2(2,7);f_H2EV_13_3(2,7);f_H2EV_14_1(2,7);f_H2EV_14_2(2,7);f_H2EV_14_3(2,7)]<=delta_station'*[m_H2EV_1(2,7);m_H2EV_2(2,7)]
   [f_H2EV_13_1(2,8);f_H2EV_13_2(2,8);f_H2EV_13_3(2,8);f_H2EV_14_1(2,8);f_H2EV_14_2(2,8);f_H2EV_14_3(2,8)]<=delta_station'*[m_H2EV_1(2,8);m_H2EV_2(2,8)]
   [f_H2EV_13_1(2,9);f_H2EV_13_2(2,9);f_H2EV_13_3(2,9);f_H2EV_14_1(2,9);f_H2EV_14_2(2,9);f_H2EV_14_3(2,9)]<=delta_station'*[m_H2EV_1(2,9);m_H2EV_2(2,9)]
   [f_H2EV_13_1(3,1);f_H2EV_13_2(3,1);f_H2EV_13_3(3,1);f_H2EV_14_1(3,1);f_H2EV_14_2(3,1);f_H2EV_14_3(3,1)]<=delta_station'*[m_H2EV_1(3,1);m_H2EV_2(3,1)]   
   [f_H2EV_13_1(3,2);f_H2EV_13_2(3,2);f_H2EV_13_3(3,2);f_H2EV_14_1(3,2);f_H2EV_14_2(3,2);f_H2EV_14_3(3,2)]<=delta_station'*[m_H2EV_1(3,2);m_H2EV_2(3,2)]   
   [f_H2EV_13_1(3,3);f_H2EV_13_2(3,3);f_H2EV_13_3(3,3);f_H2EV_14_1(3,3);f_H2EV_14_2(3,3);f_H2EV_14_3(3,3)]<=delta_station'*[m_H2EV_1(3,3);m_H2EV_2(3,3)]   
   [f_H2EV_13_1(3,4);f_H2EV_13_2(3,4);f_H2EV_13_3(3,4);f_H2EV_14_1(3,4);f_H2EV_14_2(3,4);f_H2EV_14_3(3,4)]<=delta_station'*[m_H2EV_1(3,4);m_H2EV_2(3,4)]   
   [f_H2EV_13_1(3,5);f_H2EV_13_2(3,5);f_H2EV_13_3(3,5);f_H2EV_14_1(3,5);f_H2EV_14_2(3,5);f_H2EV_14_3(3,5)]<=delta_station'*[m_H2EV_1(3,5);m_H2EV_2(3,5)]   
   [f_H2EV_13_1(3,6);f_H2EV_13_2(3,6);f_H2EV_13_3(3,6);f_H2EV_14_1(3,6);f_H2EV_14_2(3,6);f_H2EV_14_3(3,6)]<=delta_station'*[m_H2EV_1(3,6);m_H2EV_2(3,6)]   
   [f_H2EV_13_1(3,7);f_H2EV_13_2(3,7);f_H2EV_13_3(3,7);f_H2EV_14_1(3,7);f_H2EV_14_2(3,7);f_H2EV_14_3(3,7)]<=delta_station'*[m_H2EV_1(3,7);m_H2EV_2(3,7)]   
   [f_H2EV_13_1(3,8);f_H2EV_13_2(3,8);f_H2EV_13_3(3,8);f_H2EV_14_1(3,8);f_H2EV_14_2(3,8);f_H2EV_14_3(3,8)]<=delta_station'*[m_H2EV_1(3,8);m_H2EV_2(3,8)]   
   [f_H2EV_13_1(3,9);f_H2EV_13_2(3,9);f_H2EV_13_3(3,9);f_H2EV_14_1(3,9);f_H2EV_14_2(3,9);f_H2EV_14_3(3,9)]<=delta_station'*[m_H2EV_1(3,9);m_H2EV_2(3,9)]];
C=[C
   [m_H2EV_1(1,1);m_H2EV_2(1,1)]<=delta_station*[f_H2EV_13_1(1,1);f_H2EV_13_2(1,1);f_H2EV_13_3(1,1);f_H2EV_14_1(1,1);f_H2EV_14_2(1,1);f_H2EV_14_3(1,1)]
   [m_H2EV_1(1,2);m_H2EV_2(1,2)]<=delta_station*[f_H2EV_13_1(1,2);f_H2EV_13_2(1,2);f_H2EV_13_3(1,2);f_H2EV_14_1(1,2);f_H2EV_14_2(1,2);f_H2EV_14_3(1,2)]
   [m_H2EV_1(1,3);m_H2EV_2(1,3)]<=delta_station*[f_H2EV_13_1(1,3);f_H2EV_13_2(1,3);f_H2EV_13_3(1,3);f_H2EV_14_1(1,3);f_H2EV_14_2(1,3);f_H2EV_14_3(1,3)]
   [m_H2EV_1(1,4);m_H2EV_2(1,4)]<=delta_station*[f_H2EV_13_1(1,4);f_H2EV_13_2(1,4);f_H2EV_13_3(1,4);f_H2EV_14_1(1,4);f_H2EV_14_2(1,4);f_H2EV_14_3(1,4)]
   [m_H2EV_1(1,5);m_H2EV_2(1,5)]<=delta_station*[f_H2EV_13_1(1,5);f_H2EV_13_2(1,5);f_H2EV_13_3(1,5);f_H2EV_14_1(1,5);f_H2EV_14_2(1,5);f_H2EV_14_3(1,5)]
   [m_H2EV_1(1,6);m_H2EV_2(1,6)]<=delta_station*[f_H2EV_13_1(1,6);f_H2EV_13_2(1,6);f_H2EV_13_3(1,6);f_H2EV_14_1(1,6);f_H2EV_14_2(1,6);f_H2EV_14_3(1,6)]
   [m_H2EV_1(1,7);m_H2EV_2(1,7)]<=delta_station*[f_H2EV_13_1(1,7);f_H2EV_13_2(1,7);f_H2EV_13_3(1,7);f_H2EV_14_1(1,7);f_H2EV_14_2(1,7);f_H2EV_14_3(1,7)]
   [m_H2EV_1(1,8);m_H2EV_2(1,8)]<=delta_station*[f_H2EV_13_1(1,8);f_H2EV_13_2(1,8);f_H2EV_13_3(1,8);f_H2EV_14_1(1,8);f_H2EV_14_2(1,8);f_H2EV_14_3(1,8)]
   [m_H2EV_1(1,9);m_H2EV_2(1,9)]<=delta_station*[f_H2EV_13_1(1,9);f_H2EV_13_2(1,9);f_H2EV_13_3(1,9);f_H2EV_14_1(1,9);f_H2EV_14_2(1,9);f_H2EV_14_3(1,9)]
   [m_H2EV_1(2,1);m_H2EV_2(2,1)]<=delta_station*[f_H2EV_13_1(2,1);f_H2EV_13_2(2,1);f_H2EV_13_3(2,1);f_H2EV_14_1(2,1);f_H2EV_14_2(2,1);f_H2EV_14_3(2,1)]
   [m_H2EV_1(2,2);m_H2EV_2(2,2)]<=delta_station*[f_H2EV_13_1(2,2);f_H2EV_13_2(2,2);f_H2EV_13_3(2,2);f_H2EV_14_1(2,2);f_H2EV_14_2(2,2);f_H2EV_14_3(2,2)]
   [m_H2EV_1(2,3);m_H2EV_2(2,3)]<=delta_station*[f_H2EV_13_1(2,3);f_H2EV_13_2(2,3);f_H2EV_13_3(2,3);f_H2EV_14_1(2,3);f_H2EV_14_2(2,3);f_H2EV_14_3(2,3)]
   [m_H2EV_1(2,4);m_H2EV_2(2,4)]<=delta_station*[f_H2EV_13_1(2,4);f_H2EV_13_2(2,4);f_H2EV_13_3(2,4);f_H2EV_14_1(2,4);f_H2EV_14_2(2,4);f_H2EV_14_3(2,4)]
   [m_H2EV_1(2,5);m_H2EV_2(2,5)]<=delta_station*[f_H2EV_13_1(2,5);f_H2EV_13_2(2,5);f_H2EV_13_3(2,5);f_H2EV_14_1(2,5);f_H2EV_14_2(2,5);f_H2EV_14_3(2,5)]
   [m_H2EV_1(2,6);m_H2EV_2(2,6)]<=delta_station*[f_H2EV_13_1(2,6);f_H2EV_13_2(2,6);f_H2EV_13_3(2,6);f_H2EV_14_1(2,6);f_H2EV_14_2(2,6);f_H2EV_14_3(2,6)]
   [m_H2EV_1(2,7);m_H2EV_2(2,7)]<=delta_station*[f_H2EV_13_1(2,7);f_H2EV_13_2(2,7);f_H2EV_13_3(2,7);f_H2EV_14_1(2,7);f_H2EV_14_2(2,7);f_H2EV_14_3(2,7)]
   [m_H2EV_1(2,8);m_H2EV_2(2,8)]<=delta_station*[f_H2EV_13_1(2,8);f_H2EV_13_2(2,8);f_H2EV_13_3(2,8);f_H2EV_14_1(2,8);f_H2EV_14_2(2,8);f_H2EV_14_3(2,8)]
   [m_H2EV_1(2,9);m_H2EV_2(2,9)]<=delta_station*[f_H2EV_13_1(2,9);f_H2EV_13_2(2,9);f_H2EV_13_3(2,9);f_H2EV_14_1(2,9);f_H2EV_14_2(2,9);f_H2EV_14_3(2,9)]
   [m_H2EV_1(3,1);m_H2EV_2(3,1)]<=delta_station*[f_H2EV_13_1(3,1);f_H2EV_13_2(3,1);f_H2EV_13_3(3,1);f_H2EV_14_1(3,1);f_H2EV_14_2(3,1);f_H2EV_14_3(3,1)]
   [m_H2EV_1(3,2);m_H2EV_2(3,2)]<=delta_station*[f_H2EV_13_1(3,2);f_H2EV_13_2(3,2);f_H2EV_13_3(3,2);f_H2EV_14_1(3,2);f_H2EV_14_2(3,2);f_H2EV_14_3(3,2)]
   [m_H2EV_1(3,3);m_H2EV_2(3,3)]<=delta_station*[f_H2EV_13_1(3,3);f_H2EV_13_2(3,3);f_H2EV_13_3(3,3);f_H2EV_14_1(3,3);f_H2EV_14_2(3,3);f_H2EV_14_3(3,3)]
   [m_H2EV_1(3,4);m_H2EV_2(3,4)]<=delta_station*[f_H2EV_13_1(3,4);f_H2EV_13_2(3,4);f_H2EV_13_3(3,4);f_H2EV_14_1(3,4);f_H2EV_14_2(3,4);f_H2EV_14_3(3,4)]  
   [m_H2EV_1(3,5);m_H2EV_2(3,5)]<=delta_station*[f_H2EV_13_1(3,5);f_H2EV_13_2(3,5);f_H2EV_13_3(3,5);f_H2EV_14_1(3,5);f_H2EV_14_2(3,5);f_H2EV_14_3(3,5)]
   [m_H2EV_1(3,6);m_H2EV_2(3,6)]<=delta_station*[f_H2EV_13_1(3,6);f_H2EV_13_2(3,6);f_H2EV_13_3(3,6);f_H2EV_14_1(3,6);f_H2EV_14_2(3,6);f_H2EV_14_3(3,6)]   
   [m_H2EV_1(3,7);m_H2EV_2(3,7)]<=delta_station*[f_H2EV_13_1(3,7);f_H2EV_13_2(3,7);f_H2EV_13_3(3,7);f_H2EV_14_1(3,7);f_H2EV_14_2(3,7);f_H2EV_14_3(3,7)]   
   [m_H2EV_1(3,8);m_H2EV_2(3,8)]<=delta_station*[f_H2EV_13_1(3,8);f_H2EV_13_2(3,8);f_H2EV_13_3(3,8);f_H2EV_14_1(3,8);f_H2EV_14_2(3,8);f_H2EV_14_3(3,8)]  
   [m_H2EV_1(3,9);m_H2EV_2(3,9)]<=delta_station*[f_H2EV_13_1(3,9);f_H2EV_13_2(3,9);f_H2EV_13_3(3,9);f_H2EV_14_1(3,9);f_H2EV_14_2(3,9);f_H2EV_14_3(3,9)]];   
%式(11)
C=[C
   Time_de_1==g_1_h(1).*delta_x_1_1+g_1_h(2).*delta_x_1_2+g_1_h(3).*delta_x_1_3+g_1_h(4).*delta_x_1_4+g_1_h(5).*delta_x_1_5+g_1_h(6).*delta_x_1_6
   Time_de_2==g_2_h(1).*delta_x_2_1+g_2_h(2).*delta_x_2_2+g_2_h(3).*delta_x_2_3+g_2_h(4).*delta_x_2_4+g_2_h(5).*delta_x_2_5+g_2_h(6).*delta_x_2_6
   Time_de_3==g_3_h(1).*delta_x_3_1+g_3_h(2).*delta_x_3_2+g_3_h(3).*delta_x_3_3+g_3_h(4).*delta_x_3_4+g_3_h(5).*delta_x_3_5+g_3_h(6).*delta_x_3_6
   Time_de_4==g_4_h(1).*delta_x_4_1+g_4_h(2).*delta_x_4_2+g_4_h(3).*delta_x_4_3+g_4_h(4).*delta_x_4_4+g_4_h(5).*delta_x_4_5+g_4_h(6).*delta_x_4_6
   Time_de_5==g_5_h(1).*delta_x_5_1+g_5_h(2).*delta_x_5_2+g_5_h(3).*delta_x_5_3+g_5_h(4).*delta_x_5_4+g_5_h(5).*delta_x_5_5+g_5_h(6).*delta_x_5_6];
C=[C
   x_1==delta_x_1_1+delta_x_1_2+delta_x_1_3+delta_x_1_4+delta_x_1_5+delta_x_1_6
   x_2==delta_x_2_1+delta_x_2_2+delta_x_2_3+delta_x_2_4+delta_x_2_5+delta_x_2_6
   x_3==delta_x_3_1+delta_x_3_2+delta_x_3_3+delta_x_3_4+delta_x_3_5+delta_x_3_6
   x_4==delta_x_4_1+delta_x_4_2+delta_x_4_3+delta_x_4_4+delta_x_4_5+delta_x_4_6
   x_5==delta_x_5_1+delta_x_5_2+delta_x_5_3+delta_x_5_4+delta_x_5_5+delta_x_5_6];
C=[C
   delta_x_1_1>=f_p_min
   delta_x_1_2>=f_p_min
   delta_x_1_3>=f_p_min
   delta_x_1_4>=f_p_min
   delta_x_1_5>=f_p_min
   delta_x_1_6>=f_p_min
   delta_x_2_1>=f_p_min
   delta_x_2_2>=f_p_min
   delta_x_2_3>=f_p_min
   delta_x_2_4>=f_p_min
   delta_x_2_5>=f_p_min
   delta_x_2_6>=f_p_min
   delta_x_3_1>=f_p_min
   delta_x_3_2>=f_p_min
   delta_x_3_3>=f_p_min
   delta_x_3_4>=f_p_min
   delta_x_3_5>=f_p_min
   delta_x_3_6>=f_p_min
   delta_x_4_1>=f_p_min
   delta_x_4_2>=f_p_min
   delta_x_4_3>=f_p_min
   delta_x_4_4>=f_p_min
   delta_x_4_5>=f_p_min
   delta_x_4_6>=f_p_min
   delta_x_5_1>=f_p_min
   delta_x_5_2>=f_p_min
   delta_x_5_3>=f_p_min
   delta_x_5_4>=f_p_min
   delta_x_5_5>=f_p_min
   delta_x_5_6>=f_p_min
   delta_x_1_1<=C_1_MAX_H
   delta_x_1_2<=C_1_MAX_H
   delta_x_1_3<=C_1_MAX_H
   delta_x_1_4<=C_1_MAX_H
   delta_x_1_5<=C_1_MAX_H
   delta_x_1_6<=C_1_MAX_H
   delta_x_2_1<=C_2_MAX_H
   delta_x_2_2<=C_2_MAX_H
   delta_x_2_3<=C_2_MAX_H
   delta_x_2_4<=C_2_MAX_H
   delta_x_2_5<=C_2_MAX_H
   delta_x_2_6<=C_2_MAX_H
   delta_x_3_1<=C_3_MAX_H
   delta_x_3_2<=C_3_MAX_H
   delta_x_3_3<=C_3_MAX_H
   delta_x_3_4<=C_3_MAX_H
   delta_x_3_5<=C_3_MAX_H
   delta_x_3_6<=C_3_MAX_H
   delta_x_4_1<=C_4_MAX_H
   delta_x_4_2<=C_4_MAX_H
   delta_x_4_3<=C_4_MAX_H
   delta_x_4_4<=C_4_MAX_H
   delta_x_4_5<=C_4_MAX_H
   delta_x_4_6<=C_4_MAX_H
   delta_x_5_1<=C_5_MAX_H
   delta_x_5_2<=C_5_MAX_H
   delta_x_5_3<=C_5_MAX_H
   delta_x_5_4<=C_5_MAX_H
   delta_x_5_5<=C_5_MAX_H
   delta_x_5_6<=C_5_MAX_H];
%式(12)
C=[C
   u_1>=f_p_min
   u_2>=f_p_min
   u_1<=H_HY_1
   u_2<=H_HY_2];
%式(13)
C=[C
   G_sh_1>=f_p_min
   G_sh_2>=f_p_min];
%式(14)
C=[C
   G_h2ev_1-G_sh_1<=M_H2EV_1
   G_h2ev_1-G_sh_1>=f_p_min
   G_h2ev_2-G_sh_2<=M_H2EV_2
   G_h2ev_2-G_sh_2>=f_p_min];
%式(15)
C=[C
   P_P2G_1<=M_P2G_1
   P_P2G_1>=f_p_min
   P_P2G_2<=M_P2G_2
   P_P2G_2>=f_p_min];
% %耦合约束,式(33)-(35)
C=[C
   G_h2ev_1==u_1
   G_h2ev_2==u_2
   P_ev_1==(e*pu_ev).*m_EV_1
   P_ev_2==(e*pu_ev).*m_EV_2
   G_P2G_1==(eta_P2G*chi_P2G).*P_P2G_1
   G_P2G_2==(chi_P2G*eta_P2G).*P_P2G_2];
C=[C
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))<=M_HS_1(1,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))>=Min_HS_1(1,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))+8*eta_HC*G_P2G_1(2,:)-8*Teta_HD*(G_h2ev_1(2,:)-G_sh_1(2,:))<=M_HS_1(2,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))+8*eta_HC*G_P2G_1(2,:)-8*Teta_HD*(G_h2ev_1(2,:)-G_sh_1(2,:))>=Min_HS_1(2,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))+8*eta_HC*G_P2G_1(2,:)-8*Teta_HD*(G_h2ev_1(2,:)-G_sh_1(2,:))+8*eta_HC*G_P2G_1(3,:)-8*Teta_HD*(G_h2ev_1(3,:)-G_sh_1(3,:))<=M_HS_1(3,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))+8*eta_HC*G_P2G_1(2,:)-8*Teta_HD*(G_h2ev_1(2,:)-G_sh_1(2,:))+8*eta_HC*G_P2G_1(3,:)-8*Teta_HD*(G_h2ev_1(3,:)-G_sh_1(3,:))>=Min_HS_1(3,:)
   HEO+8*eta_HC*G_P2G_1(1,:)-8*Teta_HD*(G_h2ev_1(1,:)-G_sh_1(1,:))+8*eta_HC*G_P2G_1(2,:)-8*Teta_HD*(G_h2ev_1(2,:)-G_sh_1(2,:))+8*eta_HC*G_P2G_1(3,:)-8*Teta_HD*(G_h2ev_1(3,:)-G_sh_1(3,:))==HEO];
C=[C
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))<=M_HS_2(1,:)  
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))>=Min_HS_2(1,:)
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))+8*eta_HC*G_P2G_2(2,:)-8*Teta_HD*(G_h2ev_2(2,:)-G_sh_2(2,:))<=M_HS_2(2,:)
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))+8*eta_HC*G_P2G_2(2,:)-8*Teta_HD*(G_h2ev_2(2,:)-G_sh_2(2,:))>=Min_HS_2(2,:)
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))+8*eta_HC*G_P2G_2(2,:)-8*Teta_HD*(G_h2ev_2(2,:)-G_sh_2(2,:))+8*eta_HC*G_P2G_2(3,:)-8*Teta_HD*(G_h2ev_2(3,:)-G_sh_2(3,:))<=M_HS_2(3,:)
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))+8*eta_HC*G_P2G_2(2,:)-8*Teta_HD*(G_h2ev_2(2,:)-G_sh_2(2,:))+8*eta_HC*G_P2G_2(3,:)-8*Teta_HD*(G_h2ev_2(3,:)-G_sh_2(3,:))>=Min_HS_2(3,:)
   HEO+8*eta_HC*G_P2G_2(1,:)-8*Teta_HD*(G_h2ev_2(1,:)-G_sh_2(1,:))+8*eta_HC*G_P2G_2(2,:)-8*Teta_HD*(G_h2ev_2(2,:)-G_sh_2(2,:))+8*eta_HC*G_P2G_2(3,:)-8*Teta_HD*(G_h2ev_2(3,:)-G_sh_2(3,:))==HEO];
%式(17)
C=[C
   G_P2G_1<=M_HS_1
   G_P2G_2<=M_HS_2
   G_P2G_1>=f_p_min
   G_P2G_2>=f_p_min];
%式(20)
C=[C
   P_M_1-P_SL_1+P_PV_1-P_cur_1+P_ESD_1-P_ESC_1-P_L_1-P_P2G_1-P_ev_1+P_evsh_1==f_p_min
   P_M_2-P_SL_2+P_PV_2-P_cur_2+P_ESD_2-P_ESC_2-P_L_2-P_P2G_2-P_ev_2+P_evsh_2==f_p_min];
%式(22)
C=[C
   P_cur_1<=P_PV_1
   P_cur_2<=P_PV_2
   P_cur_1>=f_p_min
   P_cur_2>=f_p_min];
%式(23)
C=[C
   P_ev_1<=H_FCS_1
   P_ev_2<=H_FCS_2
   P_ev_1>=f_p_min
   P_ev_2>=f_p_min];
%式(24)
C=[C
   P_ev_1-P_evsh_1<=H_FCS_1
   P_ev_2-P_evsh_2<=H_FCS_2
   P_ev_1-P_evsh_1>=f_p_min
   P_ev_2-P_evsh_2>=f_p_min];
%式(25)
C=[C
   P_evsh_1>=f_p_min
   P_evsh_2>=f_p_min];
%式(27)
C=[C
   P_ESC_1<=v_et_1.*P_ES_max_1
   P_ESC_2<=v_et_2.*P_ES_max_2
   P_ESC_1>=f_p_min
   P_ESC_2>=f_p_min];
%式(28)
C=[C
   P_ESD_1<=(1-v_et_1).*P_ES_max_1
   P_ESD_2<=(1-v_et_2).*P_ES_max_2
%    P_ESD_1<=P_ES_max_1.*(Un_1-v_et_1)
%    P_ESD_2<=P_ES_max_2.*(Un_1-v_et_2)
   P_ESD_1>=f_p_min
   P_ESD_2>=f_p_min];  

C=[C
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)<=SE_Max_1(1,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)>=SE_Min_1(1,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)+8*eta_ESC*P_ESC_1(2,:)-8*Teta_ESD*P_ESD_1(2,:)<=SE_Max_1(2,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)+8*eta_ESC*P_ESC_1(2,:)-8*Teta_ESD*P_ESD_1(2,:)>=SE_Min_1(2,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)+8*eta_ESC*P_ESC_1(2,:)-8*Teta_ESD*P_ESD_1(2,:)+8*eta_ESC*P_ESC_1(3,:)-8*Teta_ESD*P_ESD_1(3,:)<=SE_Max_1(3,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)+8*eta_ESC*P_ESC_1(2,:)-8*Teta_ESD*P_ESD_1(2,:)+8*eta_ESC*P_ESC_1(3,:)-8*Teta_ESD*P_ESD_1(3,:)>=SE_Min_1(3,:)
   SEO+8*eta_ESC*P_ESC_1(1,:)-8*Teta_ESD*P_ESD_1(1,:)+8*eta_ESC*P_ESC_1(2,:)-8*Teta_ESD*P_ESD_1(2,:)+8*eta_ESC*P_ESC_1(3,:)-8*Teta_ESD*P_ESD_1(3,:)==SEO];
C=[C
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)<=SE_Max_2(1,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)>=SE_Min_2(1,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)+8*eta_ESC*P_ESC_2(2,:)-8*Teta_ESD*P_ESD_2(2,:)<=SE_Max_2(2,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)+8*eta_ESC*P_ESC_2(2,:)-8*Teta_ESD*P_ESD_2(2,:)>=SE_Min_2(2,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)+8*eta_ESC*P_ESC_2(2,:)-8*Teta_ESD*P_ESD_2(2,:)+8*eta_ESC*P_ESC_2(3,:)-8*Teta_ESD*P_ESD_2(3,:)<=SE_Max_2(3,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)+8*eta_ESC*P_ESC_2(2,:)-8*Teta_ESD*P_ESD_2(2,:)+8*eta_ESC*P_ESC_2(3,:)-8*Teta_ESD*P_ESD_2(3,:)>=SE_Min_2(3,:)
   SEO+8*eta_ESC*P_ESC_2(1,:)-8*Teta_ESD*P_ESD_2(1,:)+8*eta_ESC*P_ESC_2(2,:)-8*Teta_ESD*P_ESD_2(2,:)+8*eta_ESC*P_ESC_2(3,:)-8*Teta_ESD*P_ESD_2(3,:)==SEO];
%式(31)
C=[C
   P_PV_1==P_PV_0_1+P_PV_delta_1.*(v_PV_1_up-v_PV_1_down)
   P_PV_2==P_PV_0_2+P_PV_delta_2.*(v_PV_2_up-v_PV_2_down)];
%式(32)
C=[C
   v_PV_1_up(1,:)+v_PV_1_down(1,:)+v_PV_1_up(2,:)+v_PV_1_down(2,:)+v_PV_1_up(3,:)+v_PV_1_down(3,:)<=Gamma_PV_1
   v_PV_2_up(1,:)+v_PV_2_down(1,:)+v_PV_2_up(2,:)+v_PV_2_down(2,:)+v_PV_2_up(3,:)+v_PV_2_down(3,:)<=Gamma_PV_2];
%式(2-1)
C=[C
   F1==((C_hy*H_hy(1))+(C_P2G*H_P2G(1))+(C_HS*H_HS(1)))*w_hy(1)+(C_FCS*H_FCS(1))*w_el(1)+((C_hy*H_hy(2))+(C_P2G*H_P2G(2))+(C_HS*H_HS(2)))*w_hy(2)+(C_FCS*H_FCS(2))*w_el(2)
   F2==lambda_PVc*(P_cur_1+P_cur_2)+lambda_M*(P_M_1+P_M_2)-lambda_SL*(P_SL_1+P_SL_2)+lambda_epe*(P_evsh_1+P_evsh_2)+lambda_TN*(Time_de_1+Time_de_2+Time_de_3+Time_de_4+Time_de_5)+lambda_hpe*(G_sh_1+G_sh_2)
   F2>=f_p_min];
%式(2-2)
C=[C
%    kappa_1_1>=Dual_min
%    kappa_1_2>=Dual_min
%    kappa_1_3>=Dual_min
%    kappa_2_1>=Dual_min
%    kappa_2_2>=Dual_min
%    kappa_2_3>=Dual_min
%    c_1_1>=Dual_min
%    c_1_2>=Dual_min
%    c_1_3>=Dual_min
%    c_2_1>=Dual_min
%    c_2_2>=Dual_min
%    c_2_3>=Dual_min
   epsilon>=Min_epsilon];
%式(47)
C=[C
   sum(pi_2(:))==1
   sum(pi_1(:))==1];
%式(2-1)(2-3)(2-4)(2-5)(2-6)
for n=1:9
    for j=1:9
        C=[C
   nu(1,n)>=F2(1,j)-(kappa_1_1(n,j)+kappa_2_1(n,j))
   nu(2,n)>=F2(2,j)-(kappa_1_2(n,j)+kappa_2_2(n,j))
   nu(3,n)>=F2(3,j)-(kappa_1_3(n,j)+kappa_2_3(n,j))
   kappa_1_1(n,j)<=u_1(1,n)*epsilon(1)-u_1(1,j)*epsilon(1)+M*c_1_1(n,j)  %节点_时间(n,j)
   kappa_2_1(n,j)<=u_2(1,n)*epsilon(1)-u_2(1,j)*epsilon(1)+M*c_2_1(n,j)
   kappa_1_2(n,j)<=u_1(2,n)*epsilon(2)-u_1(2,j)*epsilon(2)+M*c_1_2(n,j)  %节点_时间(n,j)
   kappa_2_2(n,j)<=u_2(2,n)*epsilon(2)-u_2(2,j)*epsilon(2)+M*c_2_2(n,j)
   kappa_1_3(n,j)<=u_1(3,n)*epsilon(3)-u_1(3,j)*epsilon(3)+M*c_1_3(n,j)  %节点_时间(n,j)
   kappa_2_3(n,j)<=u_2(3,n)*epsilon(3)-u_2(3,j)*epsilon(3)+M*c_2_3(n,j)
   kappa_1_1(n,j)<=-u_1(1,n)*epsilon(1)+u_1(1,j)*epsilon(1)+M*epsilon(1)-M*c_1_1(n,j)  %节点_时间(n,j)
   kappa_2_1(n,j)<=-u_2(1,n)*epsilon(1)+u_2(1,j)*epsilon(1)+M*epsilon(1)-M*c_2_1(n,j)
   kappa_1_2(n,j)<=-u_1(2,n)*epsilon(2)+u_1(2,j)*epsilon(2)+M*epsilon(2)-M*c_1_2(n,j)  %节点_时间(n,j)
   kappa_2_2(n,j)<=-u_2(2,n)*epsilon(2)+u_2(2,j)*epsilon(2)+M*epsilon(2)-M*c_2_2(n,j)
   kappa_1_3(n,j)<=-u_1(3,n)*epsilon(3)+u_1(3,j)*epsilon(3)+M*epsilon(3)-M*c_1_3(n,j)  %节点_时间(n,j)
   kappa_2_3(n,j)<=-u_2(3,n)*epsilon(3)+u_2(3,j)*epsilon(3)+M*epsilon(3)-M*c_2_3(n,j)
   kappa_1_1(n,j)>=u_1(1,n)*epsilon(1)-u_1(1,j)*epsilon(1)  %节点_时间(n,j)
   kappa_2_1(n,j)>=u_2(1,n)*epsilon(1)-u_2(1,j)*epsilon(1)
   kappa_1_2(n,j)>=u_1(2,n)*epsilon(2)-u_1(2,j)*epsilon(2)  %节点_时间(n,j)
   kappa_2_2(n,j)>=u_2(2,n)*epsilon(2)-u_2(2,j)*epsilon(2)
   kappa_1_3(n,j)>=u_1(3,n)*epsilon(3)-u_1(3,j)*epsilon(3)  %节点_时间(n,j)
   kappa_2_3(n,j)>=u_2(3,n)*epsilon(3)-u_2(3,j)*epsilon(3)
   kappa_1_1(n,j)>=-u_1(1,n)*epsilon(1)+u_1(1,j)*epsilon(1)  %节点_时间(n,j)
   kappa_2_1(n,j)>=-u_2(1,n)*epsilon(1)+u_2(1,j)*epsilon(1)
   kappa_1_2(n,j)>=-u_1(2,n)*epsilon(2)+u_1(2,j)*epsilon(2)  %节点_时间(n,j)
   kappa_2_2(n,j)>=-u_2(2,n)*epsilon(2)+u_2(2,j)*epsilon(2)
   kappa_1_3(n,j)>=-u_1(3,n)*epsilon(3)+u_1(3,j)*epsilon(3)  %节点_时间(n,j)
   kappa_2_3(n,j)>=-u_2(3,n)*epsilon(3)+u_2(3,j)*epsilon(3)
   c_1_1(n,j)>=(alpha_1_1(n,j)-1)*Max_epsilon+epsilon(1)
   c_2_1(n,j)>=(alpha_2_1(n,j)-1)*Max_epsilon+epsilon(1)
   c_1_2(n,j)>=(alpha_1_2(n,j)-1)*Max_epsilon+epsilon(2)
   c_2_2(n,j)>=(alpha_2_2(n,j)-1)*Max_epsilon+epsilon(2)
   c_1_3(n,j)>=(alpha_1_3(n,j)-1)*Max_epsilon+epsilon(3)
   c_2_3(n,j)>=(alpha_2_3(n,j)-1)*Max_epsilon+epsilon(3)
   c_1_1(n,j)<=epsilon(1)
   c_2_1(n,j)<=epsilon(1)
   c_1_2(n,j)<=epsilon(2)
   c_2_2(n,j)<=epsilon(2)
   c_1_3(n,j)<=epsilon(3)
   c_2_3(n,j)<=epsilon(3)
   c_1_1(n,j)<=alpha_1_1(n,j)*Max_epsilon
   c_2_1(n,j)<=alpha_2_1(n,j)*Max_epsilon
   c_1_2(n,j)<=alpha_1_2(n,j)*Max_epsilon
   c_2_2(n,j)<=alpha_2_2(n,j)*Max_epsilon
   c_1_3(n,j)<=alpha_1_3(n,j)*Max_epsilon
   c_2_3(n,j)<=alpha_2_3(n,j)*Max_epsilon
   pi_2(n,1)<=P_k_1(n,1)*pi_1(n,1)+1-w_hy(2)  %pi_2(9,1)  %式(47)
   pi_2(n,1)<=pi_1(n,1)+w_hy(2)
   pi_1(n,1)<=P_k_1(n,1)*pi_0(n,1)+1-w_hy(1)
   pi_1(n,1)<=pi_0(n,1)+w_hy(1)
   beta(1,n)>=Max_nu*(pi_2(n,1)-1)+nu(1,n)
   beta(2,n)>=Max_nu*(pi_2(n,1)-1)+nu(2,n)
   beta(3,n)>=Max_nu*(pi_2(n,1)-1)+nu(3,n)
   beta<=nu
   beta(1,n)<=Max_nu*pi_2(n,1)
   beta(2,n)<=Max_nu*pi_2(n,1)
   beta(3,n)<=Max_nu*pi_2(n,1)];
    end
end  

ops=sdpsettings('verbose',0,'solver','cplex');%提前指定求解器
SOCr=F1+365*(sum(sum(beta))+r*sum(epsilon));
obcost=SOCr;%目标函数,最小化总成本

result=optimize(C,obcost,ops);
if result.problem==0
    yF1=value(F1);     
else
    disp('求解出错');
end



YALMIP-master.zip

1.22 MB, 下载次数: 0

13 条回复


yanyannia 发表于 2022-9-13 10:53:52
求指导呀~

hhh619 发表于 2022-9-13 11:45:17
你连你的代码都不贴,别人怎么看啊?根据报错猜吗

yanyannia 发表于 2022-9-13 16:03:25
hhh619 发表于 2022-9-13 11:45
你连你的代码都不贴,别人怎么看啊?根据报错猜吗

补充代码啦~代码比较长

yanyannia 发表于 2022-9-18 14:35:17
各位大神帮忙看看呗~

cbcbcbcb 发表于 2022-9-18 20:05:19
本帖最后由 cbcbcbcb 于 2022-9-18 20:45 编辑

你粘贴上来的代码,你自己运行过没有?你粘贴上来的代码在你那里可以运行,是因为你程序所在的文件夹里有你的调用函数,但是论坛里的朋友没有你的调用函数呀,你让别人怎么帮你?

麻烦你下次在一个独立的文件夹里,新建一个m文件,然后把你粘贴的代码放在里面,运行一下,看看是不是会少一些调用函数。这样别人才愿意帮你呀(不要搞得别人一运行你的代码,要不缺这个调用函数,要不缺别的调用函数)。

让别人帮你之前,请把准备工作做到位。



yanyannia 发表于 2022-9-18 22:44:39
cbcbcbcb 发表于 2022-9-18 20:05
你粘贴上来的代码,你自己运行过没有?你粘贴上来的代码在你那里可以运行,是因为你程序所在的文件夹里有你 ...

我没调用任何函数啊,直接运行的,可以运行但没有最优解。就是直接安装yalmip和cplex,然后运行这个文件

yanyannia 发表于 2022-9-18 22:47:08
cbcbcbcb 发表于 2022-9-18 20:05
你粘贴上来的代码,你自己运行过没有?你粘贴上来的代码在你那里可以运行,是因为你程序所在的文件夹里有你 ...

我运行的文件夹里只有这一个.m文件,只要安装了yalmip和cplex,复制代码直接运行就可以,结果是“求解出错”

yanyannia 发表于 2022-9-18 22:55:44
cbcbcbcb 发表于 2022-9-18 20:05
你粘贴上来的代码,你自己运行过没有?你粘贴上来的代码在你那里可以运行,是因为你程序所在的文件夹里有你 ...

你是指这个提醒嘛?直接点“更改文件夹”就可以运行了呀~ 捕获.JPG

cbcbcbcb 发表于 2022-9-18 22:59:07
yanyannia 发表于 2022-9-18 22:55
你是指这个提醒嘛?直接点“更改文件夹”就可以运行了呀~

不好意思啊,我没有安装这个外部工具箱,帮不了你了

yanyannia 发表于 2022-9-19 15:07:07
各位大神帮帮孩子啊!~

yanyannia 发表于 2022-9-21 14:55:11
顶一下,求指导!

cbcbcbcb 发表于 2022-9-21 15:20:36
本帖最后由 cbcbcbcb 于 2022-9-21 15:23 编辑
yanyannia 发表于 2022-9-21 14:55
顶一下,求指导!

你要不试着把你所用的‘’外部工具箱‘’附上来?你引用了外部工具箱,你不附上来,难不成还让人去其它网站把工具箱下下来吗?

yanyannia 发表于 7 天前
cbcbcbcb 发表于 2022-9-21 15:20
你要不试着把你所用的‘’外部工具箱‘’附上来?你引用了外部工具箱,你不附上来,难不成还让人去其它网 ...

你好,我用的是matlab2019b,要安装yalmip和cplex12.9
链接:https://pan.baidu.com/s/1sM4Z4C8xAcal4WwLPxlUXA
提取码:jp55
安装过程参考:
https://blog.csdn.net/WASEFADG/article/details/118890809
https://blog.csdn.net/mushuiliu/article/details/110307213
您需要登录后才可以回帖 登录 | 注册

本版积分规则

相关帖子
相关文章
热门教程
站长推荐
快速回复 返回顶部 返回列表