Dear Johan,
I am trying to use YALMIP solving power dispatch in an electric network. The following code is for the dual update in ADMM:
P_gen_c=sdpvar(n_gen,1);
d=(sum(P_gen_c)-sum(mpc.bus(:,3)/mpc.baseMVA))~=0; %binary
objective=d*1e9+Rou/2*sum((P_gen_c-u-P_gen_S(:,it)).^2); % indicator
constraints=[mpc.gen(:,10)<=P_gen_c*mpc.baseMVA<=mpc.gen(:,9)];
optimize(constraints,objective, opt);
I expect that P_gen_c should be the values, whose sum equals to the sum of loads (sum(mpc.bus(:,3)/mpc.baseMVA)), since a large penalty (1e9) is posed on the unbalance. However, P_gen_c turns out to be zero according to the optimization results (value(d)=0 and value(obj)=1e9). I guess there might be some errors. Could you kindly help me with this?