crc calaculation
2016-08-23
0 0 0
no vote
Other
Earn points
BEGIN
Select an initial temperature T;
Randomly generate a tour S
1
WHILE (TRUE) DO
BEGIN
with length L
1.
FOR i:=1 TO c DO /* define the number of changes at a constant temperature */
BEGIN
Create a new tour S
2
from tour S
1
by randomly swapping two
neighboring cities. Let L
2
IF L
2
< L
1
THEN
S
1 :=
S
2;
/* accept S
2
be the length of tour S
2.
as the new tour */
L
1 :=
L
2;
ELSE
Accept S
2
as the new tour S
1
with probability
P = e
-x
where x = (L
2
- L
1
)/kT /* k is Boltzmann constant */
&nb
Select an initial temperature T;
Randomly generate a tour S
1
WHILE (TRUE) DO
BEGIN
with length L
1.
FOR i:=1 TO c DO /* define the number of changes at a constant temperature */
BEGIN
Create a new tour S
2
from tour S
1
by randomly swapping two
neighboring cities. Let L
2
IF L
2
< L
1
THEN
S
1 :=
S
2;
/* accept S
2
be the length of tour S
2.
as the new tour */
L
1 :=
L
2;
ELSE
Accept S
2
as the new tour S
1
with probability
P = e
-x
where x = (L
2
- L
1
)/kT /* k is Boltzmann constant */
&nb
c++
crccalaculation
Related Source Codes
Local Path Planning Algorithm - DWA Algorithm
0
0
no vote
enDAQ-Shock-Data-Share-SRS-Blog
0
0
no vote
Calling chatGPT in a Windows application
0
0
no vote
Test Hello world
0
0
no vote
RCS calculation by one-way ray tracing
0
0
no vote
No comment