Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodal Prices #409

Closed
spmacdonald opened this issue Nov 2, 2018 · 12 comments
Closed

Nodal Prices #409

spmacdonald opened this issue Nov 2, 2018 · 12 comments

Comments

@spmacdonald
Copy link

Hello,

Is it possible to calculate the nodal LMP prices for each bus in the OPF case with PowerModels?

Thank you

@ccoffrin
Copy link
Member

ccoffrin commented Nov 2, 2018

Yes, but as of v0.8.6 this is only working for linear models (e.g. DC-OPF).

The basic setup is,

result = run_dc_opf("case14.m", ipopt_solver, setting = Dict("output" => Dict("duals" => true)))

Then look for the value lam_kcl_r in result["solution"]["bus"].

Additional examples can be reviewed here, https://github.com/lanl-ansi/PowerModels.jl/blob/master/test/output.jl#L71

PS: The best forum for general questions about PowerModels is discourse, github issues are best for reporting bugs and feature requests.

@spmacdonald
Copy link
Author

Ok, good to know thank you. What would it take to do this for the AC case? I am interested in helping but would need some guidance.

Any interest in including a method to decompose the LMP into components? energy, congestion and losses.

@ccoffrin
Copy link
Member

ccoffrin commented Nov 4, 2018

There is an issue in supporting AC that has to do with how JuMP v0.18 is implemented. I don't exactly recall the details. It should be easy to support in JuMP v0.19, which is noted here, #199

If you would like to play with JuMP v0.19 have a look at the version of PowerModels in the v0.7-moi branch.

As for decomposing the LMP into components. I am not familiar with that method, do you have a refrence I can read?

@spmacdonald
Copy link
Author

Regarding decomposing the LMP into components:

As you know all centrally coordinated electricity markets in the United States employ locational pricing to price electric energy. They define the LMP at a bus to be: LAM_i = system energy price + congestion_i + losses_i

I have asked PJM for a technical reference on how the losses are calculated, they sent me this training document: https://www.pjm.com/-/media/training/core-curriculum/ip-lmp-101/lmp-training.ashx?la=en
It is a bit light on details and I am working with them to get additional information.

Here are some relevant papers:

Luonan Chen, H. Suzuki, T. Wachi and Y. Shimura, "Components of nodal prices for electric power systems," in IEEE Transactions on Power Systems, vol. 17, no. 1, pp. 41-49, Feb. 2002.
doi: 10.1109/59.982191

Xu Cheng and T. J. Overbye, "An energy reference bus independent LMP decomposition algorithm," in IEEE Transactions on Power Systems, vol. 21, no. 3, pp. 1041-1049, Aug. 2006.
doi: 10.1109/TPWRS.2006.876703

T. Orfanogianni and G. Gross, "A General Formulation for LMP Evaluation," in IEEE Transactions on Power Systems, vol. 22, no. 3, pp. 1163-1173, Aug. 2007.
doi: 10.1109/TPWRS.2007.901297

D. Cheverez-Gonzalez and C. L. DeMarco, "Mutually orthogonal LMP decompositions: Congestion decomposes, losses do not," 2009 6th International Conference on the European Energy Market, Leuven, 2009, pp. 1-6.
doi: 10.1109/EEM.2009.5207186

F. Li, E. Litvinov and T. Zheng, "A combined LMP model considering reference independent decomposition and fictitious nodal demand," IEEE PES General Meeting, Providence, RI, 2010, pp. 1-5.
doi: 10.1109/PES.2010.5589739

D. Chéverez-González and J. Lin, "Mutually orthogonal LMP decomposition: Analysis of PJM network by null space approach," IEEE PES General Meeting, Providence, RI, 2010, pp. 1-8.
doi: 10.1109/PES.2010.5588186

V. Sarkar and S. A. Khaparde, "Optimal LMP Decomposition for the ACOPF Calculation," in IEEE Transactions on Power Systems, vol. 26, no. 3, pp. 1714-1723, Aug. 2011.
doi: 10.1109/TPWRS.2011.2104371

P. Lipka, S. S. Oren, R. P. O’Neill and A. Castillo, "Running a More Complete Market With the SLP-IV-ACOPF," in IEEE Transactions on Power Systems, vol. 32, no. 2, pp. 1139-1148, March 2017.
doi: 10.1109/TPWRS.2016.2569596

@ccoffrin
Copy link
Member

ccoffrin commented Nov 5, 2018

I am going to take a similar stance as @rdzman on this one. I am opening to accepting PRs that perform this computation, but it's not a super high priority for me to implement at this point.

I'll also note, if the shift factors are required adding their computation to PowerModels (#87) would be the first step to implementing such a feature. After that the computation you propose for LMPs would be fairly easy.

I do hope to implement a PTDF model in the next couple of months.

@spmacdonald
Copy link
Author

That is understandable. Are you open to collaborators? I am interested in helping

@ccoffrin
Copy link
Member

ccoffrin commented Nov 6, 2018 via email

@spmacdonald
Copy link
Author

Thanks a lot, I appreciate the offer.

I spent some more time reading today and found this paper:

https://www.ferc.gov/legal/staff-reports/2017/marginallosscalculations.pdf

which seems to be what I am after.

@gcherot
Copy link

gcherot commented Aug 31, 2022

Hello, I have two questions:

  1. What do "lam_kcl_r" and "lam_kcl_i" mean? In other words, which constraints are they the dual of?
  2. Is it possible to access the value of all Lagrange multipliers at the end of the optimisation? If not, could you consider adding this feature? I am willing to help but I have no experience in Julia.

@ccoffrin
Copy link
Member

These lambda values are the Lagrange multipliers of the power balance constraint "r" for active power and "i" for reactive power.

@mtanneau
Copy link
Contributor

mtanneau commented Nov 8, 2022

I second the request to be able to grab the Lagrange multipliers of all constraints (not just power balance): thermal constraints, voltage magnitude bounds, active/reactive power bounds, etc...

@ccoffrin
Copy link
Member

Closing as nodal prices are now widely supported. Made a new issue for expanding the scope of dual reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants