Global optimization toolbox - GA

When I run the GA solver, I got the following warning: What does it mean? What action should I take or I just ignore it?
Warning: Length of upper bounds is > length(x); ignoring extra bounds.

답변 (1개)

Matt J
Matt J 2012년 12월 3일

0 개 추천

You've specified more upper bounds than there are variables.

댓글 수: 5

Sata
Sata 2012년 12월 3일
Hi Matt J,
The lb and ub for all my variables are within 0 and 5 respectively. I am not very clear about your answer, can you please help to explain a bit more?
Walter Roberson
Walter Roberson 2012년 12월 3일
How many upper bounds did you specify? Not what values they are, but numel() of the array of upper bounds you passed in? Then, what is numel() of your x0 vector ? If the number of upper bounds is more than the number of elements in x0 then you get the warning.
Sata
Sata 2012년 12월 4일
편집: Sata 2012년 12월 4일
TQ Walter Roberson for your comments.
If we don't get rid of the warning messages, will it affect the results?
In the constrain option, if I don’t have any constraints, do I just put [] for both linear equalities and linear inequalities?
Walter Roberson
Walter Roberson 2012년 12월 4일
There will be no effect if you ignore the warning. However, warnings often indicate that you might not be passing in the values that you think you are passing in.
Yes, for ga() you can use [] if the constraint does not exist.
Matt J
Matt J 2012년 12월 4일
편집: Matt J 2012년 12월 4일
If we don't get rid of the warning messages, will it affect the results?
It sounds like it could affect the results and it doesn't make sense to accept the warnings whose apparent cause is so simple to solve.
If the unknown vector x is of length N, then ub and lb should be length N vectors as well. The warning is telling you that this is not the case. This could very well mean, as Walter intimated, that you are not applying bounds where you think you are.

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2012년 12월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by