How can I avoid trivial solution (norm(x) =0) for binary ga optimization?

Hi, I'm trying to do an optimization using binary ga and after 25 hours of processing, the best result of the algorithm was the trivial solution. How can I insert a constraint for norm(x)=0?

 採用された回答

Alan Weiss
Alan Weiss 2014 年 1 月 8 日

1 投票

If you have a vector of unknowns x(i) with each x(i) = 0 or 1, then include a linear constraint:
A*x <= -1
where A is a row vector of negative ones.
Alan Weiss
MATLAB mathematical toolbox documentation

3 件のコメント

Michelle Kuroda
Michelle Kuroda 2014 年 1 月 8 日
Thank you!
Michelle Kuroda
Michelle Kuroda 2014 年 1 月 8 日
Dear Alan,
Unfortunately, binary ga doesn't allow constraints.
I'll associate null solution with high value to avoid its choice. Thank you very much!
Alan Weiss
Alan Weiss 2014 年 1 月 8 日
Perhaps you are using the bitstring data type. Indeed, this data type does not allow for constraints.
However, you can formulate the problem for binary GA by using mixed integer optimization, and setting lower bounds of 0 and upper bounds of 1. You can use linear inequality constraints with mixed integer GA.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeOptimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by