Open ccoffrin opened 5 years ago
@ccoffrin but it is still feasible to clean up the upper level of the type tree to implement it in PowerSimulations?
Yes, the active power only type is independent and will get into the next release of PowerModels.
That's great. Excited about all the features JuMP 0.19 is going to offer!
@blegat and @odow, the ecosystem has come a long way since this issue was originally posted. What is the current best practice on this topic?
At least in the near term, a good implementation of quadratic objective functions in the conic solvers that only support linear objectives will keep these two types around, but I would be nice if there was a path to remove these in the future.
All solvers have a quadratic to SOC bridge by default, but the SOC to quadratic is opt-in. So you can use the QCQP formulations with all solvers.
Ideally, you could just keep the conic formulations. But you'd probably need to add the SOCtoNonConvexQuadBridge{Float64}
bridge to your JuMP model.
@blegat can say more.
norm(U*x) <= t
, use SOC. Even for QCQP solvers, its best to do y = U*x
, sum(y.^2) <= t^2
than to to do x¨U'U*x <= t^2
x' * Q * x <= t
, you can enter it like this. No need to do cholesky, the bridge is going to do it for you. If Q
is only positive semidefinite then you might want to do LDLt yourself, see https://github.com/jump-dev/MathOptInterface.jl/issues/1971#issuecomment-1214338168.min x' * Q * x
, enter it like this, the bridge will do cholesky if needed.min norm(L * x)
, you could enter it as a SOC constraint. It will be bridged into quadratic constraints for QCQP solvers and they might be smart enough to see that there was a slack variable added by the bridge and substitute it back to have a quadratic objective. For QP solvers, it's a bit of an issue though. I would like min norm(L * x)
to be a valid objective but we'll need to wait for @odow to finish the NLP rewrite and then do discipline convex programming so that this objective is bridged into a SOC constraints for tconic. Of course you can enter it as min x' * L' * L * x
but then the bridge will have to do cholesky on it to recover L
+ numerical roundoff errors which is not ideal.So in short, just enter it as you have it. If you have L
, use a SOC formulation, if you have Q
use a quadratic formulation. For the objective, probably go for the quadratic objective even if you have L
with a TODO note to change when we have DCP.
Based on discussion with @mlubin and @blegat, the best longterm strategy is to implement all formulations in PowerModels using MOI's SOC and RSOC constraints. Bridges then can be used to send those JuMP models to QCQP or NLP solvers. These bridges may be implemented in InfrastructureModels or as optional bridges provided as part of MOI.
To that end, cleaning up the conic PowerModel types will wait until PowerModels moves to JuMP v0.19.
CC @frederikgeth, @jd-lara