Dear all,
Is it possible to add as a dynamic constraint an external custom function in CVXPY working with boolean variables? In particular, i have a numpy matrix C (size m x n):
X = Bool(m , n)
objective = Minimize(sum_entries(mul_elemwise(C,X)))
constraints = []
constraints.append(sum_entries(X) == 3)
Instead of 'X' in constraint parenthesis i want to add 'mycustomfunction(X)' in order to work as a dynamic constraint added to the objective but obviously, i am getting the error
"ValueError: not enough values to unpack (expected 2, got 0)" as X is 'None' yet if i am saying it correctly.
Thank you in advance for your help.