Dcp Requirement Violated When Specifying Constraing In Cvxpy, Perhaps Need To Rethink Entire Formulation Of Problem
This is a follow-up to an earlier specific question, but as I add more complexity to the problem formulation, I realize that I need to take a step back and consider whether cvxpy
Solution 1:
Just transform it:
constr8 = (tot_util/cp.sum(dec_vars)) >= 1.3
->
constr8 = tot_util >= 1.3 * cp.sum(dec_vars)
You might need to enforce that cp.sum(dec_vars)
is positive though or else: 0 >= 0
is a valid solution.
See also: lpsolve docs: Ratios
Side-remark
Yes, you are targeting machine-learning scale data with general-purpose optimization tools which will quickly hit a limit, even for pure continuous cases. In your case, using discrete-optimization, you probably will run into scalability issues (sounds like 1M binary-variables), especially when limited to open-source solvers.
Post a Comment for "Dcp Requirement Violated When Specifying Constraing In Cvxpy, Perhaps Need To Rethink Entire Formulation Of Problem"