Dear all, I am trying to simulate dispatchable loads. I am doing the following:
mpc = loadcase('case300'); mpc = load2disp(mpc); [mpc_solved, bare_success] = rundcopf(mpc,mpoption('OUT_ALL',0,'VERBOSE' ,0)); Then I have to experiments: 1. Setting mpc.bus(1,3) = 100000; before running DCOPF in order to exceed the generation. 2. Setting mpc.branch(:,6) = 100; in order to set low branch limits. Both experiments are aimed to force the load shedding. While the results of the first simulation seem to satisfy all constraints, the second one gives the martix singularity warnings and the solution does not satisfy all the constraints: For ex. one of the rows of the gen matrix: # Pg Pmin 13 -67.8104690140355 -10 0 -10 0.997700000000000 100 1 0 -58 Pg is obviously less than allowed Pmin. Question I. I wonder if there is a way to avoid matrix warnings and get a solution satisfying all constraints. I don't see any reason why it should not be possible to find a solution for lowered branch limits except for may be bad initial/starting point. Question II. I am also trying to imitate dispatchable loads myself by creating generators with Pmin = -Pg and Pmax = 0, and gencost to be very large negative number : disp_case = loadcase('case300'); dc = disp_case; for i=1:size(dc.bus,1) if (dc.bus(i,2) == 1) dc.bus(i,2) = 2; dc.gen(size(dc.gen,1)+1,1:10) = [dc.bus(i,1),0,0,0,0,dc.bus(i,8),100,1,0,-dc.bus(i,3)]; dc.gen(size(dc.gen,1),11:25) = 0; dc.gencost(size(dc.gencost,1)+1,1:8) = [1,0,0,2,-dc.bus(i,3),-10000*dc.bus(i,3),0,0]; end end disp_case = dc; mpopt = mpoption('OUT_ALL',0,'VERBOSE',0); [disp_case_solved, disp_success] = rundcopf(disp_case,mpopt); The procedure doesn't give me any errors, just the disp_success is equal to 0, and no values are being calculated. What can be the reason for this? Thank you so much! Petya