How do I write inequality constraints within NSGA-II

5 visualizaciones (últimos 30 días)
Lily McIvor
Lily McIvor el 14 de Jun. de 2021
Respondida: Abhishek Gupta el 17 de Jun. de 2021
i need to add the constraint 1<x< 3 to my objectve functinos but dont know how to write it

Respuestas (1)

Abhishek Gupta
Abhishek Gupta el 17 de Jun. de 2021
Hi,
As per my understanding, you want to add a constraint to your function. You can do the same using "if, elseif, else" as follows: -
function my_objective()
...
if (1<=x) && (x<=3)
% <YOUR CODDE>
end
...
end

Categorías

Más información sobre Quadratic Programming and Cone Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by