Genetic Algorithms-Saving and using objective function values in later iterations

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

Answers (1)

3 Comments

Ηi, thank you very much.
This function works with Genetic Algorithms?
For the evaluation of the objective function I am calling a third software, perform analysis, open the output files and then calculate the objective function.
Do you know if there exists a command specific for GA operations?
Thank you again.
Constantine
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!