Using MATLAB GA package for a experimental problem

8 ビュー (過去 30 日間)
Seyedmohamad Moosavi
Seyedmohamad Moosavi 2016 年 12 月 22 日
回答済み: Walter Roberson 2016 年 12 月 25 日
I want to use genetic algorithm toolbox in MATLAB to solve a problem. However, the objective function is not a mathematical equation that I code it and I do not know how to do it. I would like to:
1. initialize GA with a specific population 2. pass the scores of each individual to GA in a matrix format (HERE is the question, how?) 3. GA return me the next generation 4. I do the experiment on the new generation and evaluate them 5. pass the new scores to step 2 continue to reach convergence Thanks for your help!
  3 件のコメント
David Barry
David Barry 2016 年 12 月 22 日
Please upload your code and error message
Seyedmohamad Moosavi
Seyedmohamad Moosavi 2016 年 12 月 23 日
編集済み: Seyedmohamad Moosavi 2016 年 12 月 23 日
Ok, I think I have not been clear enough. There is no error. I want to use genetic algorithm toolbox in MATLAB to solve a problem. However, the objective function is not a matematical equation that I code it. I would like to: 1. initialize GA with a specific population 2. pass the scores of each individual to GA in a matrix format (HERE is the question, how?) 3. GA return me the next generation 4. I do the experiment on the new generation and evaluate them 5. pass the new scores to step 3 6. continue till I see convergence.
Sorry for not being clear.

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

採用された回答

Walter Roberson
Walter Roberson 2016 年 12 月 25 日
When you ask for integral constraints, ga allows uses its own crossover and mutation and initial population functions; it does that so that it can enforce that only integers can be created in the appropriate slots. Providing initial scores is not supported by those built-in integer constraint functions.
In order to combine integer constraints with initial scores, what you need to do is to do is to not tell ga that those positions are to be treated as integers, and to instead provide your own population and crossover and mutation functions that happen to never generate non-integers in the appropriate positions.

その他の回答 (0 件)

カテゴリ

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