how to define constraint on objective function in ga toolbox?

9 vues (au cours des 30 derniers jours)
Hannah Mohebi
Hannah Mohebi le 4 Oct 2022
Modifié(e) : Torsten le 6 Oct 2022
hi, this my optimization code:
lb=[0.01,0.0075,0.01];
ub=[0.2,0.07,0.07];
func=@efficiency;
[x,fvar]=gamultiobj(func,3,[],[],[],[],lb,ub);
plot(fvar(:,1),fvar(:,2),'o');
I have 3 decision variable sand two objective functions which are electrical and thermal efficiencies, so these efficiencies can not be higher that 100%, but ga calculated efficiencies higher than 100%. How can I define constraint (efficiencies <100%) on objective functions?
  11 commentaires
Hannah Mohebi
Hannah Mohebi le 6 Oct 2022
No problem Thanks.
Torsten
Torsten le 6 Oct 2022
Modifié(e) : Torsten le 6 Oct 2022
To avoid duplicate code: Write a function where you compute the values of the objective function(s) and call this function from your objective as well as from nonlcon.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Surrogate Optimization dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by