Adding another ng rows to the gencost matrix will apply a cost to the reactive 
power, but not to the absolute value of the reactive power. And the 
User-defined Costs as described in Sections 6.3.1 of the MATPOWER 6 User’s 
Manual <http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> 
doesn’t help you here, though you could apply a quadratic cost, if that would 
work for you.

However, if it needs to be a linear cost on the absolute value, I think you’re 
going to have to use the general non-linear cost capabilities in the current 
development version of MATPOWER on GitHub. They are described in Sections 6.3.3 
and 7.2.2 in the new manual 
<https://www.dropbox.com/home/work/latest-MATPOWER-manual?preview=MATPOWER-manual.pdf>.

if you have more questions along the way, don’t hesitate to ask.

    Ray



> On May 7, 2018, at 11:01 AM, Stefanie Aebi <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> I am trying to set up an OPF problem where the objective function consists of 
> - active power generation (Pg*cp, where Pg is generation and cp is cost)
> - reactive power generation (|Qg|*cq, where Qg is reactive generation and cq 
> is cost)
> 
> How do I get the absolute values for Qg into the objective function? Is there 
> a way to hard-code the objective or is there a workaround that will end up 
> charging the absolute values?
> 
> Thanks for any hints.
> Best regards, Steffi
> 
> 

Reply via email to