I’m solving the following multi-product pricing optimization problem:
maximize sum((1/beta1(i,j))*(beta0(i,j)*q(i,j) + entr(q(i,j))+ entr(1-sum(q(i,:))) + log(1-sum(q(i,:))))) \for all i & j
for j = 1:4
(q(i,j))^(1.1) <= q(i,j) <= (q(i,j))^(0.9);
(1-sum(q(i,:)))^1.1 <= (1-sum(q(i,:))) <= (1-sum(q(i,:)))^0.9;
0 <= q(i,j) <= 1; \for all i & j
The objective function is jointly concave in all q(i,j)'s. and the constraints are convex set. However, CVX completely ignores the constraints as if they don’t exist and produces the same opt_val as the if the problem were unconstrained. Also, worth mentioning there are warnings next to the scroller of the editor that states:" ‘<=’ produces a value that might be unused.".
I wonder what went wrong.
All feedback are highly welcome.
The MATLAB editor doesn’t “understand” CVX, so I wouldn’t worry about editor warnings on CVX code lines if it looks correct to you.
Are the constraints satisfied at the reported optimal solution? You haven’t provided your CVX code or a reproducible problem. But it is certainly possible that the addition of constraints to an unconstrained problem does not change the argmax and optimal objective value. If x = argmax of unconstrained problem, then adding constraints which x satisfies will result in a constrained problem having the same argmax and optimal objective value. I’m not saying that’s what’s going on in your case, or whether you have made some error in your CVX code.
Don’t use quiet option when you are trying to figure out what’s going on. I moved the ’ from the end of the beta 's to after the ] .
There seem to be some numerical difficulties, but the problem was reported as solved using sedum, sdpt3, both using the CVX successive approximation method. I also solved it using scs and ecos, which allow the problem to be solved under CVX 3.0beta without using the successive approximation method. All but ecos reported optimal objective value of about 263.774. Ecos resulted in optimal objective value of 634.568. I didn’t check whether any constraints are violated. Here are optimal q from sedumi and ecos. Optimal q from sdpt3 and scs are close to sedumi. I leave the checking to you.
Please remove the quiet option, and show us the solver output, optimal q, and tell us which constraints are violated (by more than solver tolerance).
Edit: I used ECOS 2.04. As can plainly be seen, the optimal q from ECOS has negative components which violate the constraint 0 <= q <= 1. So something is wrong with either CVX 3.0beta (which does have some bugs) or ECOS. The other solvers pretty much agree, so I leave it you to point out the constraint violation(s) by the returned optimal solution.