Fmincon with different objective function in line search

2 ビュー (過去 30 日間)
Farzad Fakhraeiroudsari
Farzad Fakhraeiroudsari 2016 年 11 月 14 日
コメント済み: Walter Roberson 2018 年 6 月 9 日
Hello everyone,
I'm using fmincon to optimize a nonlinear and nonconvex optimization problem. I have an Objective function to minimize in general, but in my line search, i would like to add an extra term in the objective function. I don't know whether it's possible to define different objective function during line search.
  1 件のコメント
Dikabrio poke
Dikabrio poke 2018 年 6 月 9 日
have u solved this problem?can you share code to me?

サインインしてコメントする。

回答 (2 件)

Arnav Mendiratta
Arnav Mendiratta 2016 年 11 月 17 日
編集済み: Arnav Mendiratta 2016 年 11 月 17 日
It is possible to pass extra parameters to the objective function and nonlinear constraint functions. Refer to this documentation link for details.
However, I cannot think of any way to use a different objective function for just line search other than running two separate instances of "fmincon", looking through their iterations, and repeating the process with an updated problem/start point.
I am not sure why you would want to do this for a specific objective function. Can you share some more information about the motivation for following this workflow?
  4 件のコメント
Walter Roberson
Walter Roberson 2016 年 11 月 18 日
fmincon does not use gradient descent, and I am not convinced it ever does line search. It sounds as if you have your own optimization routines outside of fmincon.
We need to see your optimization invocation.
Walter Roberson
Walter Roberson 2018 年 6 月 9 日
I do observe that if you request the sqp-legacy algorithm for fmincon then it invokes sqpLineSearch which is a mex file . The documentation for sqp-legacy says that the algorithm is nearly the same as for the sqp algorithm. https://en.wikipedia.org/wiki/Sequential_quadratic_programming
So, potentially sqp or sqp-legacy invoke something that could be called "line search". However, the implementing code is not available, so we cannot see whether there is any way for an objective function to determine whether it is being invoked in a line-search phase.

サインインしてコメントする。


John D'Errico
John D'Errico 2016 年 11 月 17 日
No. You cannot change the objective function while in a line search.
Fmincon does not tell you if it is in a specific part of the algorithm. But worse, if you change the objective function on the fly, you have now created a non-differentiable, or worse, discontinuous function. Fmincon cannot deal with that.
I have no idea why you would want to do what you want to do, but it is a bad idea in general, even if you could do it.
  1 件のコメント
Farzad Fakhraeiroudsari
Farzad Fakhraeiroudsari 2016 年 11 月 18 日
Dear John,
thanks for your respond. since your question was in line with previous respond, i would appreciate if you can check my reply in previous answer. thanks for your comment and feedback in-advance.
Farzad

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by