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

1 vue (au cours des 30 derniers jours)
Danishtah Quamar
Danishtah Quamar le 7 Mar 2022
Modifié(e) : Matt J le 7 Mar 2022
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.

Réponses (1)

Matt J
Matt J le 7 Mar 2022
Modifié(e) : Matt J le 7 Mar 2022
In your nonlcon function
function [c,ceq]=nonlcon(x)
ceq=[];
c=f(x)-6;
end

Community Treasure Hunt

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

Start Hunting!

Translated by