I'm in need of an LP where you can multiply two non-constants. Here is the following code that I am trying to perform:
import cvxpy as cvx
a = cvx.Variable()
b = cvx.Variable()
c = cvx.Variable()
obj = cvx.Maximize(((0.4270437386 * a) + (0.1737677971 * b) + (0.21763175116 * c) - 0.03) / (((((2 * a * 0.424718270) * b) * (0.195770376 ** 0.5)) * (0.022090814 ** 0.5)) * ((2 * c * -0.041137487) * b * (0.194241184 ** 0.5) * (0.022090814 ** 0.5)) * (2 * a * 0.363033596 * c * (0.195770376** 0.5) * (0.194241184 ** 0.5))))
Unfortunately this raises an error:
cvxpy.error.DCPError: Cannot multiply two non-constants.
This stems from several areas in the denominator of obj
, such as (2 * a * 0.424718270) * b)
.
I was wondering if anyone knew of any LP programs where we can do this sort of thing? Is it even possible.