Genetic Algorithm: how to set a constraint when it does not involve directly the variables.

Both my variables x(1) and x(2) are an input to a stiff ODE problem of 2 equations. My constraints are on the output vectors (y(i)) obtained with the ODE solver ODE23s. Precisely, I want my fitness function to evaluated only when:
(abs(y(1,end)-constant1)<= constant3 && abs(y(2,end)-constant2)<= constant3
Thank you very much.

댓글 수: 2

Can you write the constraint as a function of the variables? Then of course it involves the variables. Directly? What does directly mean here? You can write a function, so what does it matter how direct is the connection? Just write a function that does the call you need.
You were right! it worked.
Thanks again for your answer.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Stability Analysis에 대해 자세히 알아보기

질문:

2017년 8월 6일

댓글:

2017년 8월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by