I have a rather complex quadratic problem that I am trying to solve in python, however, for the sake of this question - i am significantly simplifying the problem at hand.
I have the following quadratic function I am trying to minimize while satisfying the following constraints:
minimize 0.5 * x.T * P * x + q.T * x
where:
x >= 0
x[0] >= 1.5
x[n] >= 1.5 # n = last element
I have written the equivalent in scipy.optimize :
def minimize_func(x,y,P):
return 0.5*np.dot(x.T,np.dot(P,x)) + np.dot(y.T,x)
cons = ({'type':'ineq','fun': lambda x: x},
{'type':'ineq','fun': lambda x: x[0] - 1.5},
{'type':'ineq','fun': lambda x: x[n] - 1.5})
However, my question is how do I input specific constraints in cvxopt quadratic solver?
I have looked into the cvxopt documentation page and none of the examples they give seem related to my question.I am looking to input element wise constraints. Any help is greatly appreciated.