Genetic Algorithms-Saving and using objective function values in later iterations
Mostra commenti meno recenti
Hi,
I want to solve an optimization problem and everything run perfect within MATLAB when using Genetic Algorithms commands.
In order me to reduce the time for the solving the optimization problem (with use og genetic algorithms) I want the solver to store and use the objective function values for specific values of the design variables, so in the new populations of i-th iteration, of possible solutions, the value of the objective function that already calculated with iteartion i-1 for design variables with similar value NOT to be calculated again but use the value as calculated in the previous iterations.
For example in a problem with one design variable X and oblective function F(X)
if in the first iteration in the genetic algorithms the algorithm will calculate that for X=2 then F(2)=105
then in the second iteartion of the genetic algorithm if the population will consist of X=2 the GA not to calculate the onjective finction again but use the value F(2)=105 as previously calculated (for not spending time for calculate the F(X) value.
Do you know how I can model it?
Thank you,
Constantine
Risposte (1)
Ameer Hamza
il 12 Giu 2020
Modificato: Ameer Hamza
il 12 Giu 2020
0 voti
3 Commenti
Constantine Michailides
il 12 Giu 2020
Ameer Hamza
il 12 Giu 2020
memorize() does not affect or care about the internal working of the objective function. It just creates a wrapper around your objective function and sees if it can use a cached result, or it needs to pass it to the objective function. memorize() object work, just like your original function. Therefore, if your objective function works correctly with GA, then memorize will work fine too.
Constantine Michailides
il 12 Giu 2020
Categorie
Scopri di più su Genetic Algorithm in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!