SDP relaxation in PowerModelsAneex

Hi All,

I am wondering if there is an SDP relaxation of the OPF problem in PowerModelsAnnex? If there is no such function, I would appreciate any guide for implementing that in the PowerModelsAnnex.

I have noticed there are tow different SDP relaxations in PowerModels, including SDP and SparseSDP relaxations; can you please let me know how scalable are those relaxations?

All the best,
Rasoul

Hi Rasoul,

I have not yet ported the SDP relaxation to PowerModelsAnnex. However, the SOC relaxation there uses a similar variable space, so an extension of that model would be a good place to start.

The basic SDP model is the easiest to implement. It is very similar to most of the papers you would find about that model. The sparse version omits some entires in the W matrix and is hence more complex. But is also about 10 times more scalable.

In my experience, 100 buses is around the limit for the basic SDP model and about 1000 buses for the sparse version. In both cases you will want to use the MOSEK SDP solver. The open-source solvers are lagging far behind in terms of reliability compared to MOSEK.

FWIW, I generally do not use the SDP model in my work due to solver reliability challenges. Making SDP OPF formulation reliable in practice seems to be an open research topic.

I hope that helps!

Hi Dr. Coffrin,

Thank you so much for the response! I will look at the SOC relaxation in the PowerModelAnnex. It sure helps!

All the best,
Rasoul

Hi Dr. Coffrin,

I am implementing the SDP relaxation of the OPF problemin PowerModelsAnnex. I have added the LinearAlgebra package but when I run my code I get the following warning and error:


┌ Warning: Package PowerModelsAnnex does not have LinearAlgebra in its dependencies:

│ - If you have PowerModelsAnnex checked out for development and have

│ added LinearAlgebra as a dependency but haven't updated your primary

│ environment's manifest file, try `Pkg.resolve()`.

│ - Otherwise you may need to report an issue with PowerModelsAnnex

└ Loading LinearAlgebra into PowerModelsAnnex from project dependency, future warnings for PowerModelsAnnex are suppressed.

[ Info: Precompiling Ipopt [b6b21f68-93f8-5de0-b562-5493be1d77c9]

[ Info: Precompiling MAT [23992714-dd62-5051-b70f-ba57cb901cac]

[info | PowerModels]: removing 3 cost terms from generator 3: Float64[]

[warn | PowerModels]: Updated generator 3 cost function with order 0 to a function of order 3: [0.0, 0.0, 0.0]

ERROR: LoadError: UndefVarError: I not defined

I should note that when I added the LinearAlgebra package it was not added as a unique folder to the packages instead multiple folder have been added. Can you please guide me how I can add LinearAlgebra package to the PowerModelsAnnex dependencies? Thanks in advance!

All the best,

Rasoul

Hi Rasoul,

The warning,

Warning: Package PowerModelsAnnex does not have LinearAlgebra in its dependencies:

Relates to how Julia package development works. I would recomend looking for a tutorial about that.

The error,

ERROR: LoadError: UndefVarError: I not defined

Is most likely an undefined value in you code.

Hi Dr Coffrin,

Thanks for the response. I is the eye matrix, defined in LinearAlgebra package, that you have directly used in your SDP code in PowerModels. You have used LinearAlgebra package in your code. But When I added that package to PowerModelsAnnex I got the above error. My problem is how I can use the LinearAlgebra library in the power model annex. I will definitely look at the Julia package development documents.

All the best,
Rasoul

Hi Dr. Coffrin,

I went through the Julia package development documents and could fix the error that I got (i.e, I successfully add the LinearAlgebra as a dependency to the PowerModelsAnnex).

I have written a code to solve the OPF problem via SDP relaxation as function, i.e, sdp.opf, which exports the build_sdp_opf. However, when I want to run my code via build_sdp_opf(case,model) I get the following error.

build_sdp_opf not defined

I have already run a similar addendum file to PowerModelsAnnex in julia 0.6 without getting any error. But recently I upgraded my julia to 1.3. I will appreciate it if you let me know about possible actions that I should take to run my code in julia 1.3. Thanks in advance!

All the best,
Rasoul