Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab fmincon violates nonlinear inequality during search

  1. Jun 3, 2012 #1
    Hi everyone,

    I am trying to solve an optimization problem using fmincon in Matlab with a nonlinear inequality restriction. Part of the objective function is undefined if this nonlinear inequality is violated. I also set up lower and upper bounds for fmincon. I use the "interior-point" algorithms so that the bounds are never violated. However, fmincon does search beyond the region defined by the nonlinear inequality. When it does, the objective function is not defined and Matlab reports an error. Is there any way to restrict the search within the region defined by the nonlinear inequality restriction?

    Thanks a lot!

  2. jcsd
  3. Jun 3, 2012 #2
    I haven't used this function so I'm guessing, but it might be the case that your method's search radius is such that when it is very close to the bounds, it gets evaluated out of bounds as well. Try tightening your bounds a little or defining a smaller search step :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook