Matlab Optimisation toolbox (Score Constaint)

조회 수: 1 (최근 30일)
BioZ
BioZ 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
BioZ
BioZ 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개)

카테고리

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