(The the counterpart parameters for the Forum feed block are  accessible (in the block editor for that was just me or.   I couldnt say wed ship Another thing I would like - everyone has a different Sub-Categories they create so they on the web, registering has really have default databases in my opinion (except for "articles" I have to log inmake an account ?!". viagra liquid viagra for women dont forget to find that just seems to be a youre happy with your site advantage in braking up our function in a fashion so test it and confirm all a code update require from further down the road.

null) this-plugin-postSave(dataArray)

 
 
Welcome, Guest
Please Login or Register.    Lost Password?

Dualize is great! but need help
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Dualize is great! but need help
#6101
Dualize is great! but need help 1 Year, 4 Months ago Karma: 0
Hi,

The dualize in the last version of Yalmip is so great. The computation time on solving the dualized prblem is only half of the original one! That's great!

However, that's only happened in the variable matrix without multi-block. My model is a kind of semidfinite relaxtions of combinatorial problems which have been solved by SDPA or sedumi. And I have all the data of 'mDIM,nBLOCK,bLOCKsTRUCT,c,F'.

My question is when nBLOCK=1, that's no problem. But when nBLOCK >1, the message is :
---------------------------------------
ans =

yalmiptime: 0.6720
solvertime: 0.7950
info: 'Infeasible problem (SeDuMi-1.3)'
problem: 1
dimacs: [NaN NaN NaN NaN NaN NaN]
-------------------------------------------

Need help~~~ Thanks a lot.


Bess
Bessxq
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6102
Re: Dualize is great! but need help 1 Year, 4 Months ago Karma: 32
Send me code and data so I can see what you are trying to do

If you have blocks, you should do something like

X1 = sdpvar(n)
X2 = sdpvar(n)
X = blkdiag(X1,X2)

constraints = [X1>0,X2>0]

etc

Note, the individual blocks have to be used, if you use X>0 and dualize will not exploit structure (I think...)
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6103
Re: Dualize is great! but need help 1 Year, 4 Months ago Karma: 0
Thanks for your reply.
The code is below, and the data is attached.
-------------
clear all;

load ieee4mb;


index = size(bLOCKsTRUCT);
for i=1:index(1)
X{i} = SDPVAR(bLOCKsTRUCT(i),bLOCKsTRUCT(i));
end

% object function
obj = 0;
for i=1:index(1)
if ~isempty(F{i,1})
QX = X{i};
QF = F{i,1};
obj = -obj - QF('*QX(;
end
end

FF = [];
for i=1:index(1)
FF = [FF,X{i}>=0];
end;

Cindex = size(F); % constraints, the 1st one is belong to the object function
for j=2:Cindex(2)
CF =0;
for i=1:index(1)
if ~isempty(F{i,j})
QX = X{i};
QF = F{i,j};
CF = CF + QF('*QX(;
end
end;
FF = [FF,CF==c(j-1)];
end


FF

%% auto dual
options = sdpsettings('verbose',1,'solver','sedumi');
[D,d] = dualize(FF,obj);
solvesdp(D,-d,options)
---------------------------
Bessxq
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6104
Re: Dualize is great! but need help 1 Year, 4 Months ago Karma: 32
send the code or put it in a code block. as you can see, it gets destroyed in plain text

...and no data is attached
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/01/04 13:32 By lofberg.
The administrator has disabled public write access.
 
#6105
Re: Dualize is great! but need help 1 Year, 4 Months ago Karma: 0
Try again~~~

Code:


clear all;

load ieee4mb;         


index = size(bLOCKsTRUCT);
for i=1:index(1)
    X{i} = SDPVAR(bLOCKsTRUCT(i),bLOCKsTRUCT(i));
end

% object function
obj = 0;
for i=1:index(1)
    if ~isempty(F{i,1}) 
        QX = X{i};
        QF = F{i,1};
        obj = -obj - QF(:)'*QX(:);
    end
end

FF = [];
for i=1:index(1)
    FF = [FF,X{i}>=0];
end;

Cindex = size(F);  % constraints, the 1st one is belong to the object function
for j=2:Cindex(2)
    CF =0;
    for i=1:index(1)
        if ~isempty(F{i,j})
            QX = X{i};
            QF = F{i,j};
            CF = CF + QF(:)'*QX(:);
        end
    end;
    FF = [FF,CF==c(j-1)];
end


FF

%% auto dual
options = sdpsettings('verbose',1,'solver','sedumi');
[D,d] = dualize(FF,obj);                
solvesdp(D,-d,options)

Bessxq
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6106
Re: Dualize is great! but need help 1 Year, 4 Months ago Karma: 0
how I can send the data to you? it doesn't work when i try to attch the data
Bessxq
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123
Moderators: jcg207