Last change
on this file since 52 was 46, checked in by Rick van der Zwet, 15 years ago |
Report finished = sleep
|
-
Property svn:keywords
set to
Id
|
File size:
591 bytes
|
Rev | Line | |
---|
[32] | 1 | % Simulated Annealing low-autocorrelation program
|
---|
[28] | 2 | % BSDLicence
|
---|
| 3 | % Rick van der Zwet - 0433373 - <hvdzwet@liacs.nl>
|
---|
[42] | 4 | % $Id: sa-call.m 46 2009-12-18 01:43:33Z rick $
|
---|
[28] | 5 |
|
---|
[32] | 6 | %% Basic variables
|
---|
[45] | 7 | iterations = 10000;
|
---|
[46] | 8 | length = 222;
|
---|
[28] | 9 |
|
---|
[31] | 10 |
|
---|
[39] | 11 | % Always use the same innitial values
|
---|
| 12 | s = initseq(length);
|
---|
| 13 |
|
---|
[31] | 14 | % Plot the stuff
|
---|
[39] | 15 | [iteration_history, fitness_history] = sa(s,iterations);
|
---|
[31] | 16 |
|
---|
[38] | 17 | plot(iteration_history,fitness_history);
|
---|
[39] | 18 | title(sprintf('Simulated Annealing on Low-Corretation set'));
|
---|
[31] | 19 | ylabel('fitness');
|
---|
| 20 | xlabel('iterations');
|
---|
| 21 | grid on;
|
---|
| 22 | legend(sprintf('Length %i',length));
|
---|
[46] | 23 | print(sprintf('sa-fitness-%f.eps',max(fitness_history)),'-depsc2');
|
---|
| 24 | max(fitness_history)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.