Hi Khaldon,

Dispatchable loads are modeled as negative generators with negative cost. The 
negative “cost” is actually the negative of the benefit the load receives from 
the consumption. The OPF objective is to minimize the total “cost” which is the 
negative of the net benefits (benefits to demand - cost of supply). It is 
expected that these net benefits would be positive, hence the OPF objective 
function value is negative.

So, there is nothing to fix. If you want to see only the cost of generation, 
use the totcost() function for only the rows of gen/gencost that correspond to 
actual generators, not the dispatchable loads.

Hope this helps,

   Ray



On Apr 23, 2021, at 2:18 AM, KHALDON AHMED QAID AL-AREQI 
<p011810...@student.utem.edu.my<mailto:p011810...@student.utem.edu.my>> wrote:

Dear MATPOWER Team,

Thanks for this creative tool.

I am new using MATPOWER, am not sure if I do it correctly here. I am trying to 
do load shedding scenarios using load2dis() in OPF for case9. But in the normal 
scenario the cost increased and become negative.
What I should to fix this?

Using this code

mpc=loadcase(case9);
mpc = load2disp(mpc);
r=runopf(mpc);
cost=r.f

Ans

cost =

         -1569703.31218761


Thank you in advance , any help is appreciated

Khaldon Qaid


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10


Reply via email to