Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab help >> Simulated Annealing > temp_law_huang

# temp_law_huang

The Huang temperature decrease law for the simulated annealing

### Calling Sequence

`T_out = temp_law_huang(T_in,step_mean,step_var,temp_stage,n,param)`

### Arguments

T_in

the temperature at the current stage

step_mean

the mean value of the objective function computed during the current stage

step_var

the variance value of the objective function computed during the current stage

temp_stage

the index of the current temperature stage

n

the dimension of the decision variable (the x in f(x))

param

a float corresponding to the lambda parameter of the Huang temperature decrease law (0.01 by default)

T_out

the temperature for the temperature stage to come

### Description

• This function implements the Huang temperature decrease law for the simulated annealing.

### Examples

```function y=rastrigin(x)
y = x(1)^2+x(2)^2-cos(12*x(1))-cos(18*x(2));
endfunction

x0 = [-1, -1];
Proba_start = 0.8;
It_intern = 1000;
It_extern = 30;
It_Pre    = 100;

printf('SA: the Huang temperature decrease law\n');

T0 = compute_initial_temp(x0, rastrigin, Proba_start, It_Pre, neigh_func_default);
printf('Initial temperatore T0 = %f\n', T0);

[x_opt, f_opt, sa_mean_list, sa_var_list, temp_list] = optim_sa(x0, rastrigin, It_extern, It_intern, T0, Log = %T, temp_law_huang, neigh_func_default);

printf('optimal solution:\n'); disp(x_opt);
printf('value of the objective function = %f\n', f_opt);

scf();
subplot(2,1,1);
xtitle('Huang simulated annealing','Iteration','Mean / Variance');
t = 1:length(sa_mean_list);
plot(t,sa_mean_list,'r',t,sa_var_list,'g');
legend(['Mean','Variance']);
subplot(2,1,2);
xtitle('Temperature evolution','Iteration','Temperature');
plot(t,temp_list,'k-');```

### See Also

• optim_sa — A Simulated Annealing optimization method
• temp_law_csa — The classical temperature decrease law
• neigh_func_csa — The classical neighborhood relationship for the simulated annealing

### Authors

collette

Yann COLLETTE (ycollet@freesurf.fr)

### Comments

Add a comment:
Please login to comment this page.

 << temp_law_fsa Simulated Annealing temp_law_vfsa >>

 Scilab EnterprisesCopyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Thu May 12 11:44:25 CEST 2011