MATLAB Answers

andrea84
0

Saving intermediate population during GA

Asked by andrea84
on 17 Apr 2013
Latest activity Commented on by yusra asad on 8 Dec 2018 at 21:43
I need some help to find out a way to store the information related to every generation of the GA
(both the variable and the fitness values)
It could be both on an external file ( e.g. in a .txt file) or in a struct array.
Which one do you suggest? And how can I do it?
Thanks in advance

  0 Comments

Sign in to comment.

1 Answer

Answer by Alan Weiss
on 18 Apr 2013
 Accepted Answer

You can save whatever you like using an output function. For examples of output functions (using a different syntax, be careful, GA uses its own), see a MATLAB example, and an Optimization Toolbox example.
Alan Weiss
MATLAB mathematical toolbox documentation

  2 Comments

Reviewing the example gave me a clearer understanding of the problem.
Thank you!
It seems that the example gives only the values of the variables, I need the corresponding fval for each indiviual, did you get it?

Sign in to comment.