fmincon function and discrete GA results

조회 수: 1 (최근 30일)
Itachi
Itachi 2013년 1월 6일
Hi guys,
I've used both of these methods to optimize a problem, but the final results that I got are the same. how can I be sure that the answer is the global minimum? I've made the constraint function like below:
function [c,ceq]=CONSTRAINT(xopt)
A=xopt; % replace the A values with the xopt
ANALYZER; % use the new A to analyze the system and get the values of Aa,Bb,...
c=[Aa,Bb,...];
ceq=[]
Please guys, could someone help me out? Thanks in advance.

채택된 답변

Matt J
Matt J 2013년 1월 6일
편집: Matt J 2013년 1월 6일
You wrote that "the final results are the same"? Did you really mean to write that they are not the same, but you expect them to be? Anyway...
If the function has a unique global minimum, you should expect the solutions to be the same.
If the function has sub-optimal local minima, there's no guarantee that 2 different algorithms will land on the same minimum, but sometimes they might.
Note also that GA is in the Global Optimization Toolbox, and so is supposed to do a better job of finding global minima than FMINCON. That's further reason for the results to differ if your function has multiple minima.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by