7 variable in genetic algorithms

Hi i am working with genetic algorithms toll box in m file with 7 variable ,
options=gaoptimset('InitialPopulation',x0);
[x,fval]= ga(FitnessFunction,7,[],[],[],[],lb,ub,[],options);
i have a problems it gives me error below i dont know why , can any one help me
thank you
Error in createAnonymousFcn>@(x)fcn(x,FcnArgs{:}) (line 11)
fcn_handle = @(x) fcn(x,FcnArgs{:});
Error in fcnvectorizer (line 13)
y(i,:) = feval(fun,(pop(i,:)));
Error in stepGA (line 44)
nextScore = fcnvectorizer(nextPopulation,FitnessFcn,1,options.SerialUserFcn);
Error in galincon (line 62)
[score,population,state] =
stepGA(score,population,options,state,GenomeLength,FitnessFcn);
Error in ga (line 359)
[x,fval,exitFlag,output,population,scores] = galincon(FitnessFcn,nvars, ...

5 件のコメント

Walter Roberson
Walter Roberson 2016 年 2 月 3 日
We need to see your ga call and the code of whatever function handle you are passing in.
mohammed hussein
mohammed hussein 2016 年 2 月 3 日
thank you very much for your comment i have the connection with another program .the problem the genetic in every generation asking for licenses from another program which has limitation for asking . is there any way to stop genetic asking about licenses in every generation
Walter Roberson
Walter Roberson 2016 年 2 月 3 日
?? ga() does not ask for licenses . If you did not have the license for ga() it would just refuse to run entirely.
If you are calling upon another program using system() or something similar, then the method of satisfying its license is going to depend on what you are calling. We would need more information about that.
mohammed hussein
mohammed hussein 2016 年 2 月 4 日
thank you Walter Roberson for answering me . i have licences for MATLAB 2015b with optimization tool .i think because the GA connection with different program , that the reason for asking licences a lot of time . how can i reduce the number of times per second in genetic algorithms that may help me
Walter Roberson
Walter Roberson 2016 年 2 月 4 日
Please post a screen capture of one of the license requests.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2016 年 2 月 3 日

編集済み:

2016 年 2 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by