-
Notifications
You must be signed in to change notification settings - Fork 38
Enable AC polar formulation for OPF #122
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,7 @@ def solve_opf( | |
| opftype = "ac" | ||
| useef = True | ||
| usejabr = False | ||
| polar = False | ||
| default_solver_params = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would change the settings to We have to set a solution limit for the case when we have branch switching, because then we have binaries in the model.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wouldn't
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it would. We would need to do something else when we have branch switching on. |
||
| "Presolve": 0, | ||
| "SolutionLimit": 1, | ||
|
|
@@ -89,18 +90,28 @@ def solve_opf( | |
| opftype = "ac" | ||
| useef = True | ||
| usejabr = True | ||
| polar = False | ||
| default_solver_params = {"MIPGap": 1e-3, "OptimalityTol": 1e-3} | ||
| # Exact polar AC | ||
| elif opftype.lower() == "acpolar": | ||
| opftype = "ac" | ||
| useef = False | ||
| usejabr = False | ||
| polar = True | ||
| default_solver_params = {"MIPGap": 1e-3, "OptimalityTol": 1e-3} | ||
| # AC relaxation using the JABR inequality | ||
| elif opftype.lower() == "acrelax": | ||
| opftype = "ac" | ||
| useef = False | ||
| usejabr = True | ||
| polar = False | ||
| default_solver_params = {"MIPGap": 1e-3, "OptimalityTol": 1e-3} | ||
| # DC linear approximation (ef & jabr are irrelevant) | ||
| elif opftype.lower() == "dc": | ||
| opftype = "dc" | ||
| useef = False | ||
| usejabr = False | ||
| polar = False | ||
| default_solver_params = {"MIPGap": 1e-4, "OptimalityTol": 1e-4} | ||
| else: | ||
| raise ValueError(f"Unknown opftype '{opftype}'") | ||
|
|
@@ -115,8 +126,8 @@ def solve_opf( | |
| branchswitching=branch_switching, | ||
| usemipstart=use_mip_start, | ||
| minactivebranches=min_active_branches, | ||
| polar=False, | ||
| ivtype="aggressive", | ||
| polar=polar, | ||
| ivtype="aggressive", # ignored, no IV formulation used | ||
| useactivelossineqs=False, | ||
| ) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove
aclocaland introduceacreclocalandacpolarlocalwhich are the same, but with the difference that forrecwe useand for polar we use