GA for single variable
古いコメントを表示
Can I use genetic algorithm for single variable constrained optimization?
my function is f (x) = a/(x-log(x/t))
s.t. f(x) < 1
where a & t are constants
回答 (1 件)
Yes, you can. Howerver, no gurantee of the optimal solution (just like any other non-linear optimization approaches).
a = 1;
t = 1;
xopt = ga(@(x) min(a./(x-log(x/t)), 1), 1)
a./(xopt-log(xopt/t))
2 件のコメント
Swapnil Kavitkar
2021 年 7 月 23 日
Chunru
2021 年 7 月 23 日
"doc ga" to find out all the options available.
カテゴリ
ヘルプ センター および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!