Model sigmoid function as convex optimisation with logical constraint

I didn’t read the scope of the parentheses carefully enough. That first additive term is problematic. CVX will accept

cvx_begin
variable x
maximize((param(2)-param(1))*inv_pos(1+10^(param(3)-x*param(4))))
cvx_end

The first step is to prove (for any logic branch of your constraints), that your problem is convex. I’m rather dubious yours is.

1 Like