How can I specify the variables which the genetic algorithm selects to be only whole numbers (using MatLab)?

5 ビュー (過去 30 日間)
In Matlab GA tool-box, I can set the lower and upper bound of my variables but is it possible to specify the variables that are selected by the tool to be only whole numbers within the lower and upper bound?

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 2 月 28 日
You put the information after the non-linear constraint function and before the options.
  2 件のコメント
Addis Addis
Addis Addis 2017 年 2 月 28 日
It's multi-objective genetic algorithm so I'm working on gamultiobj function, which is not allowing me to specify the integer values [x,fval] = gamultiobj(fitness,nvar,[],[],[],[],lb,ub,ConsFcn,options);
Walter Roberson
Walter Roberson 2017 年 2 月 28 日
In that case you will need to provide custom population function, custom crossover function, and custom mutation function that just happen to only create intregal members.

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

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by