I'm using cvxopt.solvers.cp and am confused on how the domain and constraints interact. Let's suppose I'm trying to minimize some function f_0 which operates on probability distributions. As of now, I'm calling:
cp(F, G, h, dims, A, b)
where G and h are defined to guarantee that the elements of x are within the range (0,1)
where A and b are defined to guarantee that the elements of x sum to 1.
When F() is called, I return a random probability distribution---so all the constraints are satisfied. When F(x) is called, I verify that its elements are probabilities that sum to 1, since the domain of f_0 is the set of probabilities distributions.
It seems to me that I am doing something needlessly. Since I have declared explicit inequality and equality constraints, it seems that my "domain" is just R^n rather than distributions on the simplex. If so, then my verifications on F(x) calls are unnecessary, and a call such as F() should just return any random vector (and not just a probability distribution). Correct?
Alternatively, it seems I could just call:
cp(F)
where F() returns a probability distribution and F(x) returns None if the elements of x are not probabilities that sum to 1. This makes my domain equal to the simplex and I have no explicit inequality or equality constraints. Would this approach be better?
Help me understand! It seems I could formulate this problem as an unconstrained optimization with a constrained domain, or as a constrained optimization with an unconstrained domain.