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

difference between DCOPF solved by GAMS and solved by matpower #252

Open
yanda1234 opened this issue Nov 22, 2024 · 3 comments
Open

difference between DCOPF solved by GAMS and solved by matpower #252

yanda1234 opened this issue Nov 22, 2024 · 3 comments

Comments

@yanda1234
Copy link

yanda1234 commented Nov 22, 2024

Hi Dr. Zimmerman,

Due to the need of project, I used GAMS to write DCOPF formulation by myself, which includes FOM, VOM, fuel cost, branch flow based on b* angle_diff (branch flows are constrained by their capacities) and power balance equations at each bus. For some unknown reasons, I never get a same result as matpower, which I believe is the correct solution. In addition, I notice the bus angle solved in GAMS version DCOPF can have some super large value for those uncapacitated branches, whose capacities are set by 9999MW. I am curious if you have any thoughts which might be the cause. Many thanks in advance!

Best,
Yanda

@rdzman
Copy link
Member

rdzman commented Nov 22, 2024

Is it possible that your units are not consistent? MATPOWER converts all angles to radians and all power flows to p.u. with the b parameters also in p.u. That would be my first guess.

@yanda1234
Copy link
Author

yanda1234 commented Nov 22, 2024

Hi Dr. Zimmerman,

Thank you so much for your prompt response. I followed your advice last night and discovered an error in the SBase value, which I have now corrected. However, even after fixing it, I noticed that the bus angles from the DCOPF solution in my GAMS code still differ from the corresponding values solved in MATPOWER. This discrepancy has left me quite puzzled.

May I ask a quick question? In MATPOWER's DCOPF, are all branch flows guaranteed to be strictly within their capacity limits?
I noticed one branch in MATPOWER's DCOPF results has a flow exceeding its capacity. And the number of such branches is even higher in the DCOPF results solved using GAMS.

Best,
Yanda

@rdzman
Copy link
Member

rdzman commented Nov 25, 2024

For a successful solution all branch flows are guaranteed to be strictly within their capacity limits. It is important, however, to check the value of results.success. If it is 0, then it was unsuccessful and the rest of the results are meaningless.

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

No branches or pull requests

2 participants