Dear Ray, I mean an quadratic cost function, such as f(x)= - x^2 + 4x - 2. This function f(x) has both negative and positive values for positive values of x (attached picture).
Thanks for the help, Panagis On 17 September 2012 16:20, Ray Zimmerman <[email protected]> wrote: > In order to be sure I understand what you are attempting, I think I'd still > need an example of the kind of function you are looking for. > > -- > Ray Zimmerman > Senior Research Associate > 419A Warren Hall, Cornell University, Ithaca, NY 14853 > phone: (607) 255-9645 > > > > > On Sep 14, 2012, at 3:40 AM, Panagis Vovos wrote: > > Dear Ladies and Gentlemen, > > Judging from a reply I received already, I definetely have not made it > perfectly clear what I mean by negative-psitive values for my > user-defined cost function. I can get a function having both positive > and negative values, BUT ONLY IF my variable can take negative values. > This is because the user defined cost function is in the form > Y=aX^2+bX, which means it has to verify Y=0 for X=0 (cross junction of > the two axes). Unfortunatelly, most OPF variables cannot take negative > values. > > > Thanks again, > > Panagis Vovos > > > > Dear Ladies and Gentlemen, > > I am trying to define my own cost function, that will be added to the > regulat MATPOWER OPF cost function, using 5.3.1. However, after > simulating (5.27)-(5.31) in Matlab, I am unable to produce a (ideally, > quadratic) cost function that will span in both negtive and positive > values. The best I can get is a positive or negative (but never both) > cost function with a dead band. Does anyone know a way that I can > achieve this according to MATPOWER standard approach or do I have to > write my own code for the definition of the cost function, derivatives > etc? > > Thank you for your time, > > Panagis Vovos > >
<<attachment: fx.jpg>>
