global search problems.

10 次查看(过去 30 天)
Valerio Matteucci
Valerio Matteucci 2011-9-29
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 个)

类别

Help CenterFile Exchange 中查找有关 Direct Search 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by