I need to code this function out; it’s subject to the following constraints.
e[k+1] = t*e[k+1] + eta_c*p_c[k] -p_d[k]/eta_c. (1)
p_c[k]*p_d[k] = 0
e[0] = 0
0<= p_c[k] <= P
0<= p_d[k] <= P
0<= e[k+1] <= E
Equation one may be written in compact form as:
e(p_c, p_d) = t*1^H*x0 + eta_c*A*p_c – A*p_d *eta_d
t=0.02, eta_c =0.8, eta_d =0.9, P =10, E = 20, H=24, k = 1:24, x0 = e[1]
A = lower diagonal matrix of size H by H.
p_c and p_d are any sequence of number of length H. They can be column vectors
e[k+1] = t*e[k+1] + eta_c*p_c[k] -p_d[k]/eta_c. (1)
p_c[k]*p_d[k] = 0
e[0] = 0
0<= p_c[k] <= P
0<= p_d[k] <= P
0<= e[k+1] <= E
Equation one may be written in compact form as:
e(p_c, p_d) = t*1^H*x0 + eta_c*A*p_c – A*p_d *eta_d
t=0.02, eta_c =0.8, eta_d =0.9, P =10, E = 20, H=24, k = 1:24, x0 = e[1]
A = lower diagonal matrix of size H by H.
p_c and p_d are any sequence of number of length H. They can be column vectors