fmincon function and discrete GA results

1 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

Matt J
Matt J il 6 Gen 2013
Modificato: Matt J il 6 Gen 2013
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.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by