Dear Dr.
Löfberg,
Thank you for your patience, I have added 1<=w<=3 and delete ismember(w,[1,2,3]) in the constraints, and set big-M=4, but the problem is still infeasible, and error messages are as below. the only uncertainty constriant in the model is only one:
N = 8;
C = 3;
R = 8;
W = 19;
M = 4;
Y = binvar(N,C,R,T,'full');
delta = sdpvar(1,1,'full');
w = sdpvar(1,length(s),'full');
constraint = constraint + [uncertain(w),1<=w<=3];
for t = 1:T
for c = 1:C
con6 = 0;
for r = 1:R
for i = 1:N
constraint = constraint + [delta <= w(i)];
constraint = constraint + [delta <= M * Y(i,c,r,t)];
constraint = constraint + [M*(1-Y(i,c,r,t)) + delta >= w(i)];
con6 = con6 + delta;
end
end
constraint = constraint + [con6<=W];
end
end
error message
==============================================
***** Starting YALMIP robustification module. *********************
- Detected 8 uncertain variables
- Detected 8 independent group(s) of uncertain variables
- Eliminating uncertainty using explicit maximization of inf-norm
***** Derivation of robust counterpart done ***********************
Infeasibility row 'c3578': 0 = 1.
Presolve time = 0.00 sec. (0.99 ticks)
Root node processing (before b&c):
Real time = 0.00 sec. (1.29 ticks)
Parallel b&c, 4 threads:
Real time = 0.00 sec. (0.00 ticks)
Sync time (average) = 0.00 sec.
Wait time (average) = 0.00 sec.
------------
Total (root+branch&cut) = 0.00 sec. (1.29 ticks)
sol =
yalmiptime: 0.5061
solvertime: 0.0079
info: 'Infeasible problem (CPLEX-IBM)'
problem: 1
==============================================
I do not know how to find the error in the model, does this model can be solved by yalmip?
Thanks a lot.
Qihuang Mei