Given the decision var x, I am not able to satisfy the following two constraints together (there are other objectives and constraints)
norm(x, 1) <= L
-B <= x <= B
Ideally, I am trying to get the first constr to be satisfied at equality, but, that would be non-convex so have the inequality instead. It seems that when I don’t use the second inequality, then, the first becomes satisfied at equality. However, I needed both with the first to be satisfied near equality. Could I add some constraint on “x” (like a lower bound) so that the first become satisfied? I know that a lower bound on L-1 isn’t convex though there are heuristics to deal with it, but, would like to avoid this. Thank you.
Yes, that (Conic) Modeling Cookbook is of great value for CVX, YALMIP, CVXPY, and CVXR users, whether or not using Mosek. The Conic Modeling Cheatsheet https://docs.mosek.com/cheatsheets/conic.pdf is also handy. I suspect that @Michal_Adamaszek was one of the main authors of both of those, but he’s too modest to brag about it.
Yes, Mosek can be used as solver when doing this in CVX. Gurobi also could be used, provided that there are no SDP constraints (although it appears there are some bugs in the CVX/Gurobi interface, sometimes resulting in correct solutiobns reported by CVX)… I think YALMIP reformulates (under the hood) the L1 norm equality in a manner similar to what is shown in the link. CVX makes you di it yourself.