필터 지우기
필터 지우기

how to minimize the non-smooth function (- min(x,y) )

조회 수: 3 (최근 30일)
JJLeov
JJLeov 2015년 9월 29일
편집: Walter Roberson 2015년 10월 1일
I want to minimize - min(x,y) subject to the constraint x + y <= 10 .
Which function / Tool should I use?

답변 (3개)

Walter Roberson
Walter Roberson 2015년 9월 29일
If the function is not smooth then it could have any number of "exceptions" that are arbitrarily narrow. You would need a global minimizer and even then it might not be able to find the minimum.
For example, x - (A*(x-17)).^(-1000) is effectively x except in the range [17-1/A, 17+1/A] with it being x-1 at those boundaries and effectively negative infinity inside the boundaries.
Because your non-smooth formula might have any number of narrow arbitrarily deep minima, the only way to minimize would be to examine every floating point number pair that satisfies the boundary condition.
If you had more information about the manner in which the function was non-smooth, it is possible that work-arounds might be found to allow minimization. For example if the location of the jumps was known ahead of time, then the problem could be broken up into a series of minimizations over limited ranges of values, with the global minima chosen as the smallest of those piecewise minima.

JJLeov
JJLeov 2015년 9월 29일
thank you for the comment.. My objective function is (- min(x,y) .. (subject to x+y <= 10) I suppose I cannot use fmincon.. but I am not sure how to proceed. Lv.
  댓글 수: 3
JJLeov
JJLeov 2015년 9월 30일
I see. Thank you. I see as well that in the solution.. x - y = 0 (it comes from the function -min(x,y)) x + y = 10 (it comes from the constraint). so..everything reduces to a linear system of equations. I only wonder if that I could do without using any special toolbox of Matlab.
Walter Roberson
Walter Roberson 2015년 9월 30일
The constrained minimizer fmincon() requires the Optimization Toolbox. If you do not have that then you need to reason you way through.
When you have a function in two variables in which the variables can be interchanged without affecting the form of the function, then you know that the optimum is going to occur when (A) the two variables are the same, or when at least one of them is +/- infinity, or at least one of them sets up a 0 or an infinity that makes the other one irrelevant, or at the boundary conditions of at least one of the variables. Or (B) possibly along a shape such as a circle, or every x within the constraints. The (A) group involves tests at a finite number of points; the (B) group involves an infinite number of solutions.

댓글을 달려면 로그인하십시오.


Johan Löfberg
Johan Löfberg 2015년 10월 1일
편집: Walter Roberson 2015년 10월 1일
You can write this particular instance using linear programming. Note that you are minimizing max(-x,-y). The function max is a convex function, and you can rewrite this using an epigraph reformulation (standard practice in optimization modelling). Introduce a new variable z, and you can minimize z under the constraints -x<=z, -y <=z, x+y<=10. Of course, you could just as well have worked with the concave min operator and z >= -min(x,y) to obtain z + min(x,y)>=0 which is equivalent to z + x >=0, z + y >=0.
I assume you actually want to solve something more complex though, as this trivially is solved manually.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by