Optimization or Global Oprimization toolbox for semidefinite programming

14 Ansichten (letzte 30 Tage)
Frogy Bo
Frogy Bo am 10 Mär. 2011
Beantwortet: TED MOSBY am 12 Mai 2025
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

Antworten (1)

TED MOSBY
TED MOSBY am 12 Mai 2025
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:
  1. 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!

Kategorien

Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by