Suppose
if a+b>=c
% do something, e.g., z = a
end
where z
is objective variable, a
and b
are the CVX variables, and c is a constant.
Suppose
if a+b>=c
% do something, e.g., z = a
end
where z
is objective variable, a
and b
are the CVX variables, and c is a constant.
Do Big M modeling, along the lines of https://math.stackexchange.com/questions/2500415/how-to-write-if-else-statement-in-linear-programming/2501007 . There are many other example on the internet.
This makes use of CVX;s MIDCP capability (requires Gurobi, Mosek, or if you can get it to work, GLPK).
Ok, I will check this this link.