lanl-ansi / PowerModels.jl

A Julia/JuMP Package for Power Network Optimization
https://lanl-ansi.github.io/PowerModels.jl/stable/
Other
386 stars 145 forks source link

Generator bus voltage for pti files #856

Open jay-dave opened 1 year ago

jay-dave commented 1 year ago

PowerModels uses bus voltages (vm) from bus data as a setpoint for power flow calculations, even at generator buses. The .raw files have generator scheduled voltages (vg), that seems to be taking over the bus voltages (vm) for generator buses. Adding following simple code is helping to validate results for case 3, case 5 and case 14.

for (g,gen) in destination_data["gen"] genbus = gen["gen_bus"] destination_data["bus"]["$genbus"]["vm"] = gen["vg"] end where destination_data is the input_data dictionary (see pti.jl).

It might be a good idea to include this logic in data processing.

jbarberia commented 1 year ago

I agree that is gonna be a good addition. The export_pti function also export the vg field instead of the bus vm.A similar process should be include there too.

ccoffrin commented 1 year ago

This is topic is related to this discussion, https://github.com/lanl-ansi/PowerModels.jl/issues/798

I think we have a plan for how to update the PowerModels conventions in the next breaking release. If you have other suggestions please add them to that thread.