I am currently having a problem with a genetic algorithm code i am trying to run.
The following is my genetic algorithm, which calls a specific fitness function. The fitness function determines the fitness value according to the variables.
[v,fval,exitflag,output,population,scores]=ga(@FitnessFunktion,2,,,,,[0.5 2],[2.5 4],,options)
The fitness function is as follows: (i have taken out the parts irrelevant to the code) From generationsresults.txt we get the curve and time variables, which are then supplied to the Fitness Function.
I am able to produce the first generation without any problems but when the GA wants to move on forward with the second generation, i get the following error:
I do not know why I cannot create further generations. Any help would be much appreciated, thank you in advance!