global search problems.
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Direct Search 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!