Simulated annealing for optimization error msg

조회 수: 1 (최근 30일)
Mingcheng Tsai
Mingcheng Tsai 2019년 10월 18일
I would like to apply SA but I get the error msg with Optimization terminated: change in best function value less than options.FunctionTolerance.
p0=[0.5 0.5];
lb = [0 1];
ub = [0 1];
ObjectiveFunction = @sumrate;
rng default % For reproducibility
[p,fval,exitFlag,output] = simulannealbnd(ObjectiveFunction,p0,lb,ub);
Below is obj function
function r=sumrate(p)
bw = 20e6; %total bandwidth
p1=p(1);
p2=p(2);
sigma=noise(bw);
r=par.bw*( log2(1+p1*par.g(1)/(p2*par.g(2)+sigma))+log2(p2*par.g(2)/sigma) );
end
By the way, I also want to know how to set the constraint in the SA. Since the allocation for p1 and p2 should sum to 1.
And also have some Quality of service constraint for each users after calculating the optimal power from SA.
Thank you so much in advance.
MT

답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by