global search problems.
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hi all, sorry for my bad english.
i have some problems with a global minimization:
A = [-1 0 0 0 ; 0 -1 0 0 ; 0 0 -1 0 ; 0 0 0 -1];
b = [0 0 0 0];
sf = @(x)sum(arrayfun(@(K)parameterfun(x,T(K),R(K)),1:length(T)));
opts = optimset('Algorithm','interior-point');
problem=createOptimProblem('fmincon','x0',[1 1 1 1] ,'Aineq',A,'bineq',b,'objective',sf,'options',opts);
gs = GlobalSearch;
x = run(gs,problem) %global search
Where parameterfun is a 4 positive variables function that i want minimize and T and R are input vectors.
When i run it i recive some errors i cant manage to resolve:
??? Error using ==> minus
Matrix dimensions must agree.
Error in ==> D:\Matlab
R2011a\toolbox\globaloptim\globaloptim\private\globalsearchnlp.p>i_calcConstrViolation
at 593
Error in ==> D:\Matlab
R2011a\toolbox\globaloptim\globaloptim\private\globalsearchnlp.p>i_calcPenalty at
627
Error in ==> D:\Matlab
R2011a\toolbox\globaloptim\globaloptim\private\globalsearchnlp.p>globalsearchnlp at
343
Error in ==> GlobalSearch>GlobalSearch.run at 330
[x,fval,exitflag,output] = ...
Error in ==> main at 32
x = run(gs,problem) %global search
any ideas ? maybe there is another algorithm to use instead of global search for my problem ? i had already tried with genetic algorithms without success : (
ty all.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Direct Search finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!