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

about semi-definite constraints #83

Open
hyMIT opened this issue Jun 3, 2024 · 4 comments
Open

about semi-definite constraints #83

hyMIT opened this issue Jun 3, 2024 · 4 comments

Comments

@hyMIT
Copy link

hyMIT commented Jun 3, 2024

it's easy to add just one semi-definite constraints in the K.structure. However, when turning to multiple positive semi-definite constraints, I can not refer to the similar cases in "sedumi-help".

What's more, my partner tells me to add relaxation variables in the linear constraints(i.e. K.l part),but the examples also did not show the similar cases.

While now I am caught in a dilemma that the result of cvx and sedumi do not match, but I've got no idea how to figure out the bug in my code, so I am writing this issue for help. I'll attach my code(cvx, sedumi) and my mode to make things clear.

Hope to receive your reply ! Thank u very much!

sdp3.zip

@johanlofberg
Copy link
Member

Your best bet is to start with a much much simpler problem where you really understand everything and then add complexity to the model. Also, setup a super simple model in the modeling tool, and see what is created and sent to the solver to reverse engineer and understand.

I would not be surprised if you have set up the model from, say, the dual side, while cvx has decided to take the primal route, or vice versa.

Of course, the big question is why you ever would want to set this up manually...

@hyMIT
Copy link
Author

hyMIT commented Jun 6, 2024

Your best bet is to start with a much much simpler problem where you really understand everything and then add complexity to the model. Also, setup a super simple model in the modeling tool, and see what is created and sent to the solver to reverse engineer and understand.

I would not be surprised if you have set up the model from, say, the dual side, while cvx has decided to take the primal route, or vice versa.

Of course, the big question is why you ever would want to set this up manually...

Since the sedumi solver can solve the SDP problem as the "LP", if we set up the model manually in the sedumi, then it will save a lot of time in the pre-process. What's more, the problem I list serve as the relaxation problem to estimate the lower bound, so rewrite the code in sedumi really means a lot. But I cannot figure out the syntax in sedumi, especially the psd part. I know the cvx also provide the "sedumi" solver, but it does not provide any interface to export the model, and then the reverse engineer. So I wonder if you could help me with the psd part.

@johanlofberg
Copy link
Member

I have no idea what you are talking about, but reverse engineering is trivial as you simply put a break in sedumi.m and then debug to look at what is sent from the modelling language

@hyMIT
Copy link
Author

hyMIT commented Jun 6, 2024

thank u very much, it helps me a lot.

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