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

Add support for SOCWRConicPowerModel formulation #30

Merged
merged 5 commits into from
Jul 28, 2023
Merged

Conversation

mtanneau
Copy link
Contributor

This PR also streamlines unit tests considerably, by leveraging the PowerModels type hierarchy

@mtanneau
Copy link
Contributor Author

mtanneau commented Jul 28, 2023

cc @ccoffrin I implemented the SOCWRConic on top of the SOCWR.
There are only 3 constraints that differ between the two formulations.

If relevant for lanl-ansi/PowerModelsAnnex.jl#22 I can implement something similar there?

For completeness:

if OPF == PM.SOCWRPowerModel
model[:thermal_limit_fr][i] = JuMP.@constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2)
model[:thermal_limit_to][i] = JuMP.@constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2)
elseif OPF == PM.SOCWRConicPowerModel
model[:thermal_limit_fr][i] = JuMP.@constraint(model, [branch["rate_a"], p_fr, q_fr] in JuMP.SecondOrderCone())
model[:thermal_limit_to][i] = JuMP.@constraint(model, [branch["rate_a"], p_to, q_to] in JuMP.SecondOrderCone())
end

and
if OPF == PM.SOCWRPowerModel
JuMP.@constraint(model,
voltage_prod_quadratic[(i, j) in keys(ref[:buspairs])],
wr[(i,j)]^2 + wi[(i,j)]^2 <= w[i]*w[j]
)
elseif OPF == PM.SOCWRConicPowerModel
JuMP.@constraint(model,
voltage_prod_conic[(i, j) in keys(ref[:buspairs])],
[w[i] / sqrt(2), w[j] / sqrt(2), wr[(i,j)], wi[(i,j)]] in JuMP.RotatedSecondOrderCone()
)
end

@mtanneau mtanneau merged commit d9fa278 into main Jul 28, 2023
@mtanneau mtanneau deleted the mt/SOCConic branch July 28, 2023 00:19
@ccoffrin
Copy link

I think my primary motivation with lanl-ansi/PowerModelsAnnex.jl#22 was to get the OTS version in there so folks could have an OTS lower bound model to play around with. Back in 2018, Gurobi's MIQCQP solver was one of the few working options, now there are more. I have not seen a big demand for the SOCWRConic model of late so I would probably just close out lanl-ansi/PowerModelsAnnex.jl#22

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

Successfully merging this pull request may close these issues.

2 participants