can GA always find a smaller objective than SQP ?

1 visualización (últimos 30 días)
Stanley Cheng
Stanley Cheng el 29 de Dic. de 2014
Comentada: Alan Weiss el 5 de En. de 2015
Hi everyone,
These days I am using GA and SQP for optimization.
It is very strange that the result from SQP is smaller than GA, i.e., better results are from SQP.
I think my codes are all right, but I am not sure about the results.
It is said SQP can only find a local optimal result while GA can search for the global one.
But why this happens ?
Any help is greatly appreciated!
Cheers

Respuesta aceptada

Jan
Jan el 29 de Dic. de 2014
The SQP method starts from a specified point and moves (almost) along local gradient to smaller function values. If the start point is inside a valley, which does not contain the global minimum there is only a tiny chance that the surrounding mountains are exceeded by accident.
GA uses a set of start points and the crossing over exceeds the search area during the processing. Therefore there is a larger chance to find a global optimum.
  3 comentarios
Stanley Cheng
Stanley Cheng el 4 de En. de 2015
Dear Alan,
Happy New Year and wish you a good beginning of 2015!
These days I am trying to solve the problem first with SQP, then GA.
For SQP, the barrier puzzled me now is the long long time for computation.
In my problem, there are all together 13 variables X(1)~X(13), only one objective which is negative of the square of one variable as
aim=-(X(12))^2
However, I think due to the complexity of the problem, it takes long long time to deal with it, but still the answer is not available yet, just as the figure:
On the other hand, when I use GA to cope it with the default options set by the GA toolbox, the exitflag returned is -2, no solution can be found at these settings with GA.
Could you pls give me some constructions ?
Cheers
Alan Weiss
Alan Weiss el 5 de En. de 2015
It is difficult to know how to answer you. Your data shows about 125 function evaluations per second, and 5e6 total function evaluations. That is a lot of computing. You also said that GA returned exitflag -2, indicating that you have nonlinear constraints.
Assuming that your objective and nonlinear constraint functions are smooth, you might find some hints in the documentation of what to do when the solver fails or when the solver takes too long. After trying the suggestions you find there, you might want to ask here again, but please give some more detail about your nonlinear constraint functions.
Alan Weiss
MATLAB mathematical toolbox documentation

Iniciar sesión para comentar.

Más respuestas (1)

Stanley Cheng
Stanley Cheng el 29 de Dic. de 2014
Merry Xmas and happy new year!
THX so much for both of your answers! You are both right,
But in my project, I want to find the global min.
So my strategy is : aiming at the same objective, first GA is used to get solution A,
then SQP is used to get solution B, then A and B are compared. Ideally A should be smaller than B, proving the GA can find the global min while SQP finds the local min.
The reason for the aforementioned phenomenon is probably :
I just use the default gaoptimset, and some vital parameters like the populationsize, generation etc are not set according the practical situations.
I will set them to get better results!
THX very much!
Cheers

Categorías

Más información sobre Global or Multiple Starting Point Search en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by