1

How can I implement Kreisselmeier Steinhauser (KS) function with Simulated Annealing optimization? My code for SA with KS func is as follows:

while (Gen < GenMax )
while    iter > 0 %PerturbIter 
    NewZ = PerturbZ(CurZ);
    NewX = lb + (ub-lb).*(sin(NewZ)).^2;
    x0 = NewX;
    NewFitness = KS(NewX,x0);
    Delta_Cost = NewFitness - CurFitness;
    if Delta_Cost <= 0
        CurZ = NewZ; CurX = NewX;
        CurCost = NewFitness;
        if NewFitness < BestFitness
            BestZ = NewZ; BestX = NewX;
            BestFitness = NewFitness;            
        end
   else
        if rand() < exp(-Delta_Cost/T)
            CurZ = NewZ; CurX = NewX;
            CurFitness = NewFitness;
        end
    end
    iter = iter - 1;        
    %x0 = BestX;
end

figure(1), hold on
plot(Gen,BestFitness,'-md','MarkerEdgeColor','b','MarkerFaceColor','b','MarkerSize',3)
T = Cooling(T);
Gen = Gen+1;
iter = PerturbIter;    

end

The KS function is implemented as followed:

function fun = ksfunc(x, x0, objfun, confun, rho)
obj = objfun(x);
[con,coneq] = confun(x);

[con0,coneq] = confun(x0);
temp = obj./objfun(x0) - 1 - max(con0);
temp = [temp; con];
fmax = max(temp);
summ = sum( exp( rho*(temp - fmax) ));

fun = fmax + log(summ)/rho;
Amro
  • 123,847
  • 25
  • 243
  • 454
Ravinder Singh
  • 300
  • 2
  • 8
  • Could you add an explanation of KS and SA to your question? (for us who don't remember) ;) – gary Jan 07 '11 at 00:44
  • 2
    what exactly is the problem here? – Amro Jan 07 '11 at 01:08
  • KS is short for of Kreisselmeier Steinhauser function which makes a constrained multiobjective minimization problem into a mono-objective unconstrained problem. – Ravinder Singh Jan 07 '11 at 01:17
  • SA is Simulated Annealing which is a global optimization techniques which finds the global minima of an unconstrained single valued function ( F = f(x1, x2, x3, .... , xn);) – Ravinder Singh Jan 07 '11 at 01:19
  • @Amro: The problem here I am discussing about constrained multiobjective minimization. That is to minimize {Fi(Xk)} subject to {Gj(Xk)} constraints, where i = 1,2,3...N, j = 1,2,3,..M k = 1,2,3,..K – Ravinder Singh Jan 07 '11 at 01:50

0 Answers0