Firstly thank you very much for the interest you showed on my case!!!
I see your point but I don't know (or I can't understand) how can I change solver parameters while using yalmip!! For instance, I quote a part of my matlab code where I solve the optimization problem in order to help me on how can I change it, i.e. which commands should I use to change optimizer parameters.
for i = 1:t
if i==1
e_1{1} = e0_1;%Starting with zero initial values
e_2{1} = e0_2;%Starting with zero initial values
else
e_1{1} = D_1 * e_opt_1(:,i-1) + u_opt_1(:,i-1);%State update using optimal solution P_con_1{1} and optimal state e_1{1}
e_2{1} = D_2 * e_opt_2(:,i-1) + u_opt_2(:,i-1);%State update using optimal solution P_con_2{1} and optimal state e_2{1}
end
constraints = [];%Initiallization of constraint matrices
F = 0;%Objective function Initiallization
F_1 = 0;
F_2 = 0;
P_1 = zeros(2,N_c);
P_2 = zeros(1,N_c);
sum_1 = zeros(N_c,1);
sum_2 = zeros(N_c,1);
for k = 1:N_c
for j = 1:N_c
P_1(2,j) = P_shifted_1(j+k-1);
P_2(1,j) = P_shifted_2(j+k-1);
end
%Objective function
F_1 = F_1 + (norm(Y_1*(P_unc_1(:,i+k-1)+P_con_1{k}+P_1*d_1{k}) - Q_spot_1(i+k-1),2))^2;
F_2 = F_2 + (norm(Y_2*(P_unc_2(:,i+k-1)+P_con_2{k}+P_2*d_2{k}) - Q_spot_2(i+k-1),2))^2;
F = F_1 + F_2;
sum_1 = sum_1 + d_1{k};
sum_2 = sum_2 + d_2{k};
%Subject to
constraints = [constraints, e_1{k+1} == D_1 * e_1{k} + P_con_1{k}];
constraints = [constraints, e_2{k+1} == D_2 * e_2{k} + P_con_2{k}];
constraints = [constraints, T_1{k} == R_1 * (P_unc_1(:,i+k-1)+P_con_1{k})];
constraints = [constraints, T_2{k} == R_2 * (P_unc_2(:,i+k-1)+P_con_2{k})];
constraints = [constraints, e_min_1 <= e_1{k+1} <= e_max_1];
constraints = [constraints, e_min_2 <= e_2{k+1} <= e_max_2];
constraints = [constraints, p_min_1 <= P_con_1{k} <= p_max_1];
constraints = [constraints, p_min_2 <= P_con_2{k} <= p_max_2];
constraints = [constraints, T_1{k} + T_2{k} <= f_max];
end
constraints = [constraints, sum_1 == ones(N_c,1), sum_2 == ones(N_c,1)];
%Solver selection(MOSEK)
options = sdpsettings('solver', 'mosek');
%problem solved for each BRP
controller = optimize(constraints, F, options);
u_opt_1(:,i) = value(P_con_1{1});
u_opt_2(:,i) = value(P_con_2{1});
T_opt_1(:,i) = value(T_1{1});
T_opt_2(:,i) = value(T_2{1});
e_opt_1(:,i) = value(e_1{1});
e_opt_2(:,i) = value(e_2{1});
end
Where all the variables are sdp ones, while variables d_1{k} and d_2{k} are binaries!!
Thank you in advance!!