Search code examples
matlaboptimizationnonlinear-optimizationinequalities

fmincon with nonzero inequalities constraint


I want to solve a minimization problem in MATLAB.

fmincon():

x = fmincon(fun,x0,Aeq,beq, nonlcon) subjects to the nonlinear inequalities c(x) defined in nonlcon such that c(x) < 0

Is it possible to change c(x) < 0 to c(x) ≤ 0 and use fmincon() function? Does it have any effect on my obtained results? I tried fmincon and obtained the reasonable results but I do not know the effect of this change in my results? which function do you suggest to use in MATLAB for this problem?


Solution

  • It should be noted that, strictly speaking, the constraint c(x) < 0 is a subset of c(x)<=0, so your result of optimization should be a solution with relaxed condition when with c(x)<=0.

    Considering the numeric calculation by MATLAB, the impact might be tiny since you also have calculation precision issues, so no need to worry about it.