Thank you, Prof. Zimmerman. I have tried and the price is correct now.
2014-12-12 1:38 GMT+08:00 Ray Zimmerman <[email protected]>: > > The answer is actually correct based on the value of the load curtailment > assumed by load2disp(), which is $5000. You can simply change that value in > the gencost matrix if you want something smaller. > > E.g. > mpc_LC.gencost(3:6, COST) = 100; > > Hope this helps, > > Ray > > On Dec 10, 2014, at 10:32 PM, difei tang <[email protected]> wrote: > > Dear Prof. Zimmerman and Matpower users, > > I am doing AC OPF load shedding with generator failure. > I used load2disp.m to convert all the fixed load to dispatchable load. > The code is: > mpc = loadcase('case9'); > mpc_LC = load2disp(mpc); > mpc_LC.gen(1,8) = 0; % set Gen 1 and 3 out of service > mpc_LC.gen(3,8) = 0; > [results_LC, success_LC] = runopf(mpc_LC); > > > Converged in 0.67 seconds > Objective Function Value = -1210215.60 $/hr > > ================================================================================ > | Bus Data > | > > ================================================================================ > Bus Voltage Generation Load > Lambda($/MVA-hr) > # Mag(pu) Ang(deg) P (MW) Q (MVAr) P (MW) Q (MVAr) P > Q > ----- ------- -------- -------- -------- -------- -------- ------- > ------- > 1 1.028 0.000* - - - - > 5068.403-204.208 > 2 1.033 18.804 249.33 18.30 - - 43.586 > - > 3 1.049 2.700 - - - - > 4942.836-205.941 > 4 1.028 0.000 - - - - > 5068.403-204.208 > 5 1.034 -0.714 - - 50.35* 16.78* > 5072.673-218.018 > 6 1.049 2.700 - - - - > 4942.836-205.941 > 7 1.025 4.947 - - 100.00* 35.00* > 4904.162-170.803 > 8 1.033 10.406 - - - - > 4818.644-159.149 > 9 1.007 0.746 - - 92.93* 37.17* > 5071.383-178.457 > -------- -------- -------- -------- > Total: 249.33 18.30 243.28 88.96 > > The total cost and nodal price results are very high.Which is obviously > wrong. > The total cost is a big negative value because of the high cost of > negative generator (5000 set by load2disp.m). > > My question is: > 1. How can I achieve the load shedding without the big value of total cost > and nodal price? > 2. I would like to add a load curtailment cost for the load which is shed. > How can I do this? Do I need to add user cost functions? > > >
