I’m working to minimize a cost function , I want to exclude one element from a summation " it’s sounds like my Dvar will affect them and vice versa
this the problem that I’m working on
this my code so far ,
for i = 1:I
for t = 1:T
cvx_begin
variable pd(I,T) ;
f1 = lamda_base .*pd(i,t) + beta .* pd(i,t).^2;
f2 = beta *(L(t)-w(t)+ sum(pd(1:i-1,t))- sum(pd(i+1:I,t))).*pd(i,t);
minimize (f1+f2)
I really appreciate your help , I believe that the problem in the part which relate to excluding one element from the summation , but I can’t figure it out