Hi everyone
I've some troubles with this code I've just written:
gs = GlobalSearch;
G1 = @(x)(x0(1).*((-96.19)+ log((x0(1))/(sum(x0)))))+(x0(2).*((-103.5765)+ log((x0(2))/(sum(x0)))))+(x0(3).*((-60.7612)+ log((x0(3))/(sum(x0)))))+(x0(4).*((-157.2666)+ log((x0(4))/(sum(x0)))))+(x0(5).*((-15.7762)+ log((x0(5))/(sum(x0)))))+(x0(6).*((-93.7912)+ log((x0(6))/(sum(x0)))))+(x0(7).*((-152.1869784261)+ log((x0(7))/(sum(x0)))))...
+(x0(8).*((-65.1308)+ log((x0(8))/(sum(x0)))))+(x0(9).*((-156.5081915685)+ log((x0(9))/(sum(x0)))));
opts = optimoptions(@fmincon,'Algorithm','interior-point','MaxFunEvals',1000000,'MaxIter',10000000,'TolCon',1e-12);
problem = createOptimProblem('fmincon','x0',[+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4],...
'objective',G1,'lb',[0 0 0 0 0 0 0 0 0],'Aeq',[1 1 1 2 0 1 2 1 2;4 2 0 0 2 6 4 2 2;1 0 1 1 0 2 2 1 1],'beq',[1;4;1],'options',opts);
[xmin,fmin,flag,outpt,allmins] = run(gs,problem);
I want to find the global minimum,but matlab output is :
Undefined function 'optimoptions' for input arguments of type 'function_handle'.
Error in globalresearch (line 9)
opts = optimoptions(@fmincon,'Algorithm','interior-point','MaxFunEvals',1000000,'MaxIter',10000000,'TolCon',1e-12);
I can't really find the problem, maybe fmincon is redundant?
I run matlab R2011b.
Thanks in advance for any answer!
I've some troubles with this code I've just written:
gs = GlobalSearch;
G1 = @(x)(x0(1).*((-96.19)+ log((x0(1))/(sum(x0)))))+(x0(2).*((-103.5765)+ log((x0(2))/(sum(x0)))))+(x0(3).*((-60.7612)+ log((x0(3))/(sum(x0)))))+(x0(4).*((-157.2666)+ log((x0(4))/(sum(x0)))))+(x0(5).*((-15.7762)+ log((x0(5))/(sum(x0)))))+(x0(6).*((-93.7912)+ log((x0(6))/(sum(x0)))))+(x0(7).*((-152.1869784261)+ log((x0(7))/(sum(x0)))))...
+(x0(8).*((-65.1308)+ log((x0(8))/(sum(x0)))))+(x0(9).*((-156.5081915685)+ log((x0(9))/(sum(x0)))));
opts = optimoptions(@fmincon,'Algorithm','interior-point','MaxFunEvals',1000000,'MaxIter',10000000,'TolCon',1e-12);
problem = createOptimProblem('fmincon','x0',[+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4,+1e-4],...
'objective',G1,'lb',[0 0 0 0 0 0 0 0 0],'Aeq',[1 1 1 2 0 1 2 1 2;4 2 0 0 2 6 4 2 2;1 0 1 1 0 2 2 1 1],'beq',[1;4;1],'options',opts);
[xmin,fmin,flag,outpt,allmins] = run(gs,problem);
I want to find the global minimum,but matlab output is :
Undefined function 'optimoptions' for input arguments of type 'function_handle'.
Error in globalresearch (line 9)
opts = optimoptions(@fmincon,'Algorithm','interior-point','MaxFunEvals',1000000,'MaxIter',10000000,'TolCon',1e-12);
I can't really find the problem, maybe fmincon is redundant?
I run matlab R2011b.
Thanks in advance for any answer!