Hi all,
I have a following function to solve in cvxpy. While setting the objective functions I am getting the DCP rule voilation error. My script is below.
deltaButOld=np.array([1,1,1,1]).T
deltabut1=cp.Variable()
deltabut2=cp.Variable()
deltabut3=cp.Variable()
deltabut4=cp.Variable()
deltaBut=np.array([deltabut1,deltabut2,deltabut3,deltabut4]).T
objective1=0
s_i=np.eye(3)
s1=cp.Variable((3,N)) #N=5
for i in range (0,N):
objective1=objective1+cp.quad_form(s1[:,i],s_i)
objective2=(deltaBut-deltaButOld)
d_i=np.eye(4)
objective2_final=cp.quad_form(objective2,d_i)
objective=objective1+objective2_final
problem=cp.Problem(cp.Minimize(objective))
problem.solve()
from the solution, I need to get the optimal values of deltabut1…deltabut4.
Could anybody help me to define the above cost function in proper DCP format??
Thank you very much in advance!