Hello members,
I am currently solving an optimization problem in which the cost terms include many arithmetic operations on NumPy arrays. I solve this optimization problem repeatedly in the loop by setting up the problem again and again. I guess it's possible to speed up the solve time by making use of the parameters. The structure of the problem remains the same over time but only some quantities change in their values. Currently, I am using many NumPy operations such as dot product and Kronecker product. These terms are used inside cvxpy atomic functions such as quad_form. Now, I have few questions:
- Is it possible to improve my solve time as I expect above by making use of the parameters?
- What operations are allowed on these parameters? For example, if I am using cost = cp.quad_form(np.dot(A,x0) + S@u - reference, Q)
where A is a matrix, x0 is a vector, S is a matrix, u is a vector, reference is a vector, Q is a matrix of appropriate dimensions
How can I rewrite this if I make A,x0, S, reference, and Q as parameters so they still satisfy DCP? here, 'u' is the only cvxpy variable.
Thanks in advance
Sandeep