I was wondering if I could get support regarding a model I am doing. My research work lead me to the need to implement a fitting function into my model in CVX, however this fitting function is not convex as it is a sigmoid. I have tried dividing the function into two sections based on my decision variable Di but this does not seem to be working and I am getting the following error: Constraints may not appear in if/then statements.
My problem is quite big so I will just show a fragment of the problem:
fsigm = -(param(1)+(param(2)-param(1))./(1+10.^((param(3)-Di(1,t))*param(4))));
fsigm = param(1)+(param(2)-param(1))./(1+10.^((param(3)-Di(1,t))*param(4)));
The goal is to maximize Mk.
Should I switch to YALMIP to be able to still use MATLAB?.
Thanks a lot!