Problem when using max operation in objective function of fmincon optimization

Hi. I have a problem when I use max operation in objective function of fmincon optimization. My code of objective function:
function J = Minimized_Function(x)
A = sub_function_1 (x);
B = sub_function_2 (x);
C = sub_function_3 (x);
J = max(A,B,C)
where sub_function_1, sub_function_2, sub_function_3 are certain funtions.
Operation max(A,B,C) seems to make my objective function become discontinuous. As a consequence, I cant get the right result of optimization process despite that fact that the code works.

2 件のコメント

Operation max(A,B,C) seems to make my objective function become discontinuous
Nope it makes your objective function not differentiable, whereas FMICON requires the derivative exists and continuous.
Nguyen Phuoc
Nguyen Phuoc 2018 年 10 月 5 日
Thanks. Do you have any suggestions to deal with this?

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

回答 (0 件)

カテゴリ

タグ

質問済み:

2018 年 10 月 5 日

コメント済み:

2018 年 10 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by