genetic algorithm simple problem
Show older comments
Hello ,
I have a simple problem to solve with the genetic algorithm in matlab
The fitness function is
that subject to
My question is how to apply these in matlab ga function?
2 Comments
Mark Sherstan
on 10 Dec 2018
Edited: Mark Sherstan
on 10 Dec 2018
Phoenix98
on 10 Dec 2018
Answers (1)
Walter Roberson
on 10 Dec 2018
0 votes
The item says 0 <= xi, i = 1, 2, 3. Therefore the entries are nonnegative. lb would be [0 0 0]. ub can be left empty or can be set to [inf inf inf]
2 Comments
Phoenix98
on 10 Dec 2018
Walter Roberson
on 10 Dec 2018
So? You are using ga and ga only tries to find a global minima.
Besides, you are not implementing the formula you were given. In MATLAB,
(3*x(1) + x(2) - 2*x(3)+0.8 \ 2*x(1)-x(2)+x(3))
is the same as
((3*x(1)) + x(2) - (2*x(3)) + ((0.8 \ 2) * x(1)) - x(2) + x(3))
which is the same as
((3*x(1)) + x(2) - (2*x(3)) + ((0.8 / 2) * x(1)) - x(2) + x(3))
The form
first sequence \ second sequence
is not the same as
(first sequence) / (second sequence)
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!