Cost for reactive power in PowerModels?

Hi there,

I am using PowerModels quite a bit – thanks @ccoffrin for this nice tool!

Usually, the cost function for optimal power flow problems depends solely on the active power. For several reasons, I would like to add a term that assigns a cost for the reactive power. In objective.jl of PowerModels I could not find any expression related to dictionary entries :qg.

My question is: is it implemented and I have simply overlooked it?

If it is not implemented, how could I fix it? My suggestion: to the dictionary returned by PowerModels.parse_file() I add an entry cost_q to each entry gen, and then I modify the function objective_min_gen_polynomial_fuel_cost() (assuming I have polynomial costs for the reactive power).

Any help is appreciated, thanks.

Hi @timueh, great to hear that you have found PowerModels useful!

In the base of PowerModels there are no objective functions that have reactive power.

My recommendation would be to play around with one of the models implemented in PowerModelsAnnex. You should be able to add your cost_q data to the Matpower files using this feature in PowerModels, so that you can access that data when building the objective function.

Once you have a working example using a PowerModelsAnnex model, then we can discuss how that can be translated into a PowerModels objective function.