Matlab fmincon violates nonlinear inequality during search

In summary, the conversation discusses using fmincon in Matlab to solve an optimization problem with a nonlinear inequality restriction. The issue arises when the search radius extends beyond the bounds, causing the objective function to be undefined and resulting in an error. Possible solutions suggested include tightening the bounds or defining a smaller search step.
  • #1
cindydodolo
1
0
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!

Cindy
 
Physics news on Phys.org
  • #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:
 

Related to Matlab fmincon violates nonlinear inequality during search

1. What is Matlab fmincon?

Matlab fmincon is a built-in optimization function in Matlab that is used to find the minimum value of a given function subject to certain constraints.

2. What does it mean when fmincon violates nonlinear inequality during search?

This means that during the optimization process, the algorithm encountered a point that violates one of the nonlinear inequality constraints. This can happen if the initial point or the constraints are not properly specified, or if the function being optimized is not well-behaved.

3. How can I fix the violation of nonlinear inequality in fmincon?

There are a few ways to fix this issue. First, make sure that the initial point and constraints are properly specified. If they are, then try adjusting the tolerance levels in the fmincon options. You can also try using a different optimization algorithm or reformulating your problem to avoid the violation. If all else fails, you may need to consult with a Matlab expert for further assistance.

4. Is it common for fmincon to violate nonlinear inequality during search?

No, it is not common for fmincon to violate nonlinear inequality during search. This usually only happens if there are issues with the problem formulation or if the function being optimized is particularly difficult to handle.

5. Can I use fmincon with linear inequality constraints?

Yes, fmincon can handle both linear and nonlinear inequality constraints. However, it is important to note that different algorithms and options may be more suitable for different types of constraints. It is always a good idea to consult the Matlab documentation or an expert for advice on which approach to use for your specific problem.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Replies
93
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
7K
  • STEM Academic Advising
Replies
13
Views
2K
  • Quantum Physics
Replies
13
Views
1K
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
7K
Back
Top