gamultiobj's options

조회 수: 3 (최근 30일)
Tony Cheng
Tony Cheng 2017년 1월 17일
댓글: Tony Cheng 2017년 2월 14일
Hi guys,
I am using a PC with 2014b and run the MOGA files. Now two questions appear:
The first is:
The option set for gamultiobj is
options_moga = gaoptimset(@gamultiobj) .
If the parameters in gamultiobj are set according to its syntax without options_moga , i.e., like this:
gamultiobj( AIM1 , 9 , ...
A_inequation , power_constraint , ...
AEQ_modify , BEQ_modify , ...
lower_bound , upper_bound , ...
nonliear_constraint );
the PC run the file for round 100 seconds and the results seem right, because they are quite similar to the those from fmincon.
But , if the parameters in gamultiobj are set according to its syntax with options_moga , i.e., like this:
gamultiobj( AIM1 , 9 , ...
A_inequation , power_constraint , ...
AEQ_modify , BEQ_modify , ...
lower_bound , upper_bound , ...
nonliear_constraint , options_moga ) ;
the PC run the file for round 20 seconds only and the results are not right, because they are quite far from those by fmincon.
Could u pls tell me why it behaves like this?
The second is:
the 9 unknowns set by gamultiobj is a 1*9 rank vector, but if they are used in fmincon, they are a 9*1 column vector. Is it right?
Thanks so much for these two questions!

채택된 답변

Alan Weiss
Alan Weiss 2017년 1월 18일
I do not understand at all what you are asking in your first question, sorry.
For the second question, ga and gamultiobj require population members to be row vectors. In contrast, fmincon does not care whether the x0 argument is a row vector, column vector, or array, as explained here.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 5
Tony Cheng
Tony Cheng 2017년 2월 13일
All right!
Thank you very much, Walter!
Tony Cheng
Tony Cheng 2017년 2월 14일
Hi Walter,
Could you tell me the time consumed in testing the settings with and without optimoptions(@gamultiobj)?
If optimoptions(@gamultiobj) is explicitly given in gamultiobj like this gamultiobj( AIM1 , 9 , ... A_inequation , power_constraint , ... AEQ_modify , BEQ_modify , ... lower_bound , upper_bound , ... nonliear_constraint , gaoptimset(@gamultiobj) ) ;
then it uses for about 15 seconds.
If gamultiobj( AIM1 , 9 , ... A_inequation , power_constraint , ... AEQ_modify , BEQ_modify , ... lower_bound , upper_bound , ... nonliear_constraint );
then it cost about 110 seconds to finish the codes.
The results from these two settings are quite different. The former setting produces smaller values which looks like wrong, while the latter produces larger ones which looks like right.
I am using 2014b.
Thanks man!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by