I need to solve a large number of small convex optimisation problems with the same constraints, so I am trying to use cvxpy's DPP feature to cache/speedup compilation. It doesn't seem to work for my problem containing a single complex matrix parameter L
.
import numpy as np
import cvxpy as cp
A = np.eye(4)+np.eye(4)*1j
L = cp.Parameter((4,4),complex=True)
X = cp.Variable((4,4),hermitian=True)
obj = cp.Minimize(cp.norm(X-L,'fro'))
prob = cp.Problem(obj)
L.value = A
assert prob.is_dcp(dpp=True)
prob.solve(solver=cp.SCS,verbose=True)
If I change the definitions of A
and L
to A=np.eye(4)
and L = cp.Parameter((4,4))
, then I do see the (Subsequent compilations of this problem, using the same arguments, should take less time.)
message in the verbose print out.
I am using cvxpy version 1.2.1.
Does anyone know what's going on? Many thanks!