Optimization or Global Oprimization toolbox for semidefinite programming
이전 댓글 표시
Hi all, just a quick question is it possible to use Optimization or Global Oprimization toolbox to solve semidefinite programming problem? I can't find the way to input semidefinite constraint for matrix. Thanks
답변 (1개)
TED MOSBY
2025년 5월 12일
Hi Frogy,
The Optimization Toolbox or Global Optimization Toolbox do not have a built-in solver that accepts a positive - semidefinite matix constraint. The conic solver that ships with MATLAB: "coneprog" used for second-order cones. Instead you can use a modelling layer that express variables as symmetric matrices, add the constraint X >= 0 (PSD), and call an external SDP solver.
For this you will have to download the following:
- YALMIP: using YALMIP you describe the variables, constrainsts, cost etc.
- SDP-capable solver like SDPT3 or SeDuMi: when you call "optimize", YALMIP packages your problem and hands it over to this solver that understands semi-definite problem.
Here is a little workflow showing how to get started:
- Use sdpvar just like you’d write variables on paper:
X = sdpvar(n,n,'symmetric'); % matrix you want PSD
2. Tell YALMIP the constraints and cost in plain math:
F = [X >= 0, trace(X) == 1]; % “X is PSD and its trace is 1”
cost = trace(C*X); % whatever you’re minimising
3. Pick a solver
ops = sdpsettings('solver','sdpt3'); % or 'sedumi', 'mosek', …
4. Then solve and record the answer
optimize(F, cost, ops);
Xopt = value(X);
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!