필터 지우기
필터 지우기

How to write syntax for ga(GA) when we put constraints on the objective function?

조회 수: 1 (최근 30일)
min f(x)=1.10471*x1^2*x2 + 0.04811*x3*x4(14+x2) f(x)<=6
subject to some inequality constraints
Then how to get the variables only when the min f(x) is less than equal to 6.

답변 (1개)

Matt J
Matt J 2022년 3월 7일
편집: Matt J 2022년 3월 7일
In your nonlcon function
function [c,ceq]=nonlcon(x)
ceq=[];
c=f(x)-6;
end

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by