Matlab Optimisation toolbox (Score Constaint)

2 ビュー (過去 30 日間)
Ali Khabibulayev
Ali Khabibulayev 2021 年 11 月 24 日
回答済み: Alan Weiss 2021 年 11 月 25 日
Greeting all,
I have a long matlab code, but essentially what I have is a TARGETVALUE and ACTUALVALUE variables, I am trying to optimise the the function so that the difference between those is 0. However, my optimiser keeps omptimising the problem to the point where the difference is negative.
Is there a way to limit the "Score" to 0 and restrict it from going to negatives?
Any help would be much appreciated.
  1 件のコメント
Ali Khabibulayev
Ali Khabibulayev 2021 年 11 月 24 日
I am using GA and GAmultiobj algorithm

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

採用された回答

Alan Weiss
Alan Weiss 2021 年 11 月 25 日
Instead of minimizing TARGETVALUE - ACTUALVALUE , instead minimize either abs(TARGETVALUE - ACTUALVALUE) or (TARGETVALUE - ACTUALVALUE)^2.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by