How to express minimum function in constraints
It is unclear what is variables and parameters.
Assume x is a variable then you can write
b+min(1,a)*x<=x
as
t=min(1,a) (t is parameter)
b+t*x<=x
Sometimes you have to adapt the model on paper a little bit to make it easier for Cvx to digest.
sorry, and let me be clear, the b and a are variables, they are both continuous variables greater than 0 and less than 1, and M,K are constant
Thanks for your answer, then can I introduce slack variables let min(1,a)>= c and b+c<=1 to solve this problem?
You’d need to introduce binary variables to handle non-convex usage of min. If you search on the internet, you’ll see howto do that. Fro instance, https://yalmip.github.io/tutorial/logicprogramming .
