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
