how to define constraint on objective function in ga toolbox?
古いコメントを表示
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 件のコメント
Torsten
2022 年 10 月 4 日
Are lb and ub bounds on the efficiencies ? But you want to optimize the process - so why do you set upper bounds ?
And what value becomes greater than 1 ?
Hannah Mohebi
2022 年 10 月 4 日
Torsten
2022 年 10 月 4 日
And how do you get efficiency from your decision variables ? In other words: How does your objective function looks like ?
Hannah Mohebi
2022 年 10 月 4 日
Torsten
2022 年 10 月 4 日
Can the numerical values for the efficiencies you calculate in the objective function become greater than 1 ? If yes: return min(1,efficiency) to ga or use nonlcon to limit efficiencies to 1 by the nonlinear constraint c(d1,d2,d3) <= 1.
Hannah Mohebi
2022 年 10 月 4 日
Please answer the questions:
Does your objective function return efficiency as value to be maximized ?
o Yes o No
If yes, is it possible that the numerical value computed in the objective function for the efficiencies exceeds 1 ?
o Yes o No
If yes, define c(x) in function nonlcon such that efficiencies = c(x) <= 1.
Hannah Mohebi
2022 年 10 月 6 日
Torsten
2022 年 10 月 6 日
Just copy what you calculate in the objective function to the function nonlcon to define c(x). What's the problem ?
Hannah Mohebi
2022 年 10 月 6 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Surrogate Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!