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!