'CVXOPT QP with equality constraints on some elements

I am trying to CVXOPT to solve a QP problem that has a form of

min_x 1/2 x^T P x + q^T x

assume x is a column vector with the dimension of (m,1), each element is non-negative and has upper bound maxVal, so the inequality constraints are

0 <= x_{i1} <= maxVal, i=1,...,m

And starting from the k+1th row, the item is 0, so the equality constraint is:

x_{j1} = 0, j=k+1,...,m

However, I am not sure how to code the equality constraint on part of the elements in x by following the CVXOPT QP instruction. Anyone with such experience can help? Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source