Extracting population generated in each generation of Genetic Algorithm (GA)

8 views (last 30 days)
Hello
To begin, in my case, function evaluation takes place in an external application being run in batch mode. Starting up this partucular application is very time consuming which means opening and closing it for every function evaluation would waste a lot of time.
So I would like to extract population of each generation and pass it to the external application in order to evaluate function for whole population in just a single session then return the computed results to the GA for the remaining tasks(creation of the new generation).
I would appreciate your help! Thank you!
  2 Comments
Star Strider
Star Strider on 21 Jul 2020
It is possible to get each generation (or selected individuals in each generation). The approach and discussion in How to save data from Genetic Algorithm in case MATLAB crashes? might provide some insight into what you need to do.
Hamidreza Mazloumi
Hamidreza Mazloumi on 21 Jul 2020
Edited: Hamidreza Mazloumi on 21 Jul 2020
Thanks to you, now I can extract population of each generation. Your helpe is invaluable. though I hava another problem.
In order to evaluate the function externally and before the iteration state, I think I have to turn the main objective(fitness) function into a 3rd external function wich recieves the population of the current generation, calculates the fitness at each point of population and stores it in a array or a table(fitness array). Now there has to exist an alternative objective function which only reads the fitness value from the fitness array.
I would appreciate your opinion on what I've mentioned above.

Sign in to comment.

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!