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?

 채택된 답변

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

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!
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 Exchange에서 Optimization Toolbox에 대해 자세히 알아보기

질문:

2014년 1월 8일

댓글:

2014년 1월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by