Dear
Johan Löfberg,
%===================script start===================
t_u_number = 1;
m=5;
K=1000;
M_curr = [1,0,3,1,2]';
Cu = [0,0,-1,0,1]';
pm = [1,0,0]';
A=[1,0,0,0,0; 0,1,0,0,0; 0,0,0,1,0];
F = [];
sigma_u = intvar(t_u_number,1,'full');
F = [F,sigma_u >= 0];
t_O = intvar(m,1,'full');
F = [F, t_O >= 0];
t_I = intvar(m,1,'full');
F = [F, t_I >= 0];
b = binvar(m,1,'full');
F = [F,M_curr+Cu*sigma_u +(t_O-t_I) >= 0];
F = [F,A*(M_curr + Cu*sigma_u + (t_O-t_I)) == pm];
for j=1:t_u_number
F = [F, A*(sigma_u(j)*Cu(:,j)) == 0];
end
F = [F,ones(1,m)*t_I >= 1];
F = [F, t_I - K*b <= 0];
F = [F, t_O - K*(ones(m,1)-b) <= 0];
obj = ones(1,m)*(t_I + t_O);
options = sdpsettings('solver','gurobi');
output = optimize(F, obj,options); %"Either infeasible or unbounded (GRUROBI)"
%===================script end===================
I solve the above the programming model and get the information "Either infeasible or unbounded (GRUROBI)".
However, I find the following solution by hand:
sigma_u = [0]';
t_O = [0,0,0,0,0]';
t_I=[0,0,0,1,0]';
b = [0,0,0,1,0]';
Could you tell me where I went wrong?
Thand you very much!