Hi
I have 3 strange problems with a yalmip optimization code.
First this code
qs_ref= [-16 11 8; -23 -8 -6];
qs_down=[ 16 23 19; 1 20 20];
qs_up= [10 14 7; 15 13 6];
ps_unit=[ 2 4 0; 1 5 3];
%buyer
qb_ref= [0 0 ; 0 0 ];
qb_down=[23 17; 0 20];
qb_up= [13 22; 22 16];
pb_unit=[1 1 ; 1 0];
yalmip('clear')
qs = sdpvar(2,3);
qb = sdpvar(2,2);
Constraints=[-qs_down<=qs<=qs_up;...
-qb_down<=qb<=qb_up;...
sum(min(qs,zeros(2,3)),2)==sum(min(qb,zeros(2,2)),2);...
sum(max(qs,zeros(2,3)),2)==sum(max(qb,zeros(2,2)),2)];
Objective = 100*sum(sum(ps_unit.*abs(qs),2)-sum(pb_unit.*abs(qb),2));
diagnostics=solvesdp(Constraints,Objective,sdpsettings('verbose',0))
returns
solvertime: 0
info: 'No suitable solver'
problem: -2
yalmiptime: 1.8290
But if I change the numbers a little like
qs_ref= [16 19 7; 20 21 -20];
qs_down=[ 7 24 4; 14 24 24];
qs_up= [24 20 11; 12 4 23];
ps_unit=[ 4 3 4; 5 0 5];
%buyer
qb_ref= [0 0; 0 0 ];
qb_down=[16 18; 4 1 ];
qb_up= [ 7 2; 1 21];
pb_unit=[ 3 5; 2 0];
it solves nicely with the scip solver, but I get the error message:
yalmiptime: 0.3413
solvertime: 0.1427
info: 'Infeasible problem (SCIP)'
problem: 1
Do you know why there is no suitable solver for the first problem and why I get the message “infeasible problem” but still a nice solution.
Now I want to extend my contraints with:
for i=1:2
min_p_buy=max(pb_unit(i,:));
for j=1:2
Constraints=[Constraints; implies(qb(i,j)>=1, min_p_buy==2)];
end
end
but I always get an error like:
One or more output arguments not assigned during call to "varargout".
Error in implies (line 62)
varargout{1} = implies_internal(varargin{3:end});
Error in lmi/expandmeta (line 7)
Fnew = [Fnew, feval(F.clauses{i}.data{1},'expand',[],F.clauses{i}.data{2:end})];
Error in expandmodel (line 33)
F = expandmeta(F);
Error in compileinterfacedata (line 116)
[F,failure,cause,operators] = expandmodel(F,h,options);
Error in solvesdp (line 219)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics] =
compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);
Error in TF_market_clear_linear (line 108)
diagnostics=solvesdp(Constraints,Objective,sdpsettings('solver','scip','verbose',0))
Any clue what is wrong?
Looking forward to hear from you