필터 지우기
필터 지우기

GA for single variable

조회 수: 2 (최근 30일)
Swapnil Kavitkar
Swapnil Kavitkar 2021년 7월 23일
댓글: Chunru 2021년 7월 23일
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개)

Chunru
Chunru 2021년 7월 23일
편집: Chunru 2021년 7월 23일
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)
Optimization terminated: stall generations limit exceeded.
xopt = -555.4795
a./(xopt-log(xopt/t))
ans = -0.0018 + 0.0000i
  댓글 수: 2
Swapnil Kavitkar
Swapnil Kavitkar 2021년 7월 23일
what about population, mutation ,crossover?? GA options
Chunru
Chunru 2021년 7월 23일
"doc ga" to find out all the options available.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by