-1

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?

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
ِdidi
  • 19
  • 2
  • 1
    see the help of `fmincon`https://se.mathworks.com/help/optim/ug/fmincon.html, c(x) should be <= 0 – ThomasIsCoding Jan 10 '20 at 20:28
  • Relook at the documentation for [`fmincon()`](https://www.mathworks.com/help/optim/ug/fmincon.html): "`x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon)` subjects the minimization to the nonlinear inequalities c(x) or equalities ceq(x) defined in `nonlcon`. `fmincon` optimizes such that c(x) ≤ 0 and ceq(x) = 0. If no bounds exist, set lb = [] and/or ub = []." Inequalities are not strict for `fmincon`. – SecretAgentMan Jan 10 '20 at 23:11

1 Answers1

0

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.

ThomasIsCoding
  • 96,636
  • 9
  • 24
  • 81