Parallel Simulated Annealing with Adaptive Temperature

Download Report

Transcript Parallel Simulated Annealing with Adaptive Temperature

Adaptive Temperature Schedule
Determined by Genetic Algorithm
for Parallel Simulated Annealing
Doshisha University, Kyoto, JAPAN
Mitsunori MIKI,
Tomoyuki HIROYASU,
Jun’ya WAKO,
Takeshi YOSHIDA
CEC2003
Doshisha Univ., Kyoto, Japan
Background
• Optimization :
Find values of the variables that minimize or maximize
the objective function while satisfying the constraints.
• Optimization Problem
– Combinatorial Optimization Problem
• Traveling Salesman Problems(TSPs)
• Job shop Scheduling Problems(JSPs)
– Continuous Opitimization Problem
CEC2003
Doshisha Univ., Kyoto, Japan
Traveling Salesman Problems
(TSPs)
• Typical combinatorial optimization problem.
• Finding a minimum tour to round all cities.
TSP
Σd(vπ(i),vπ(i+1)+d(vπ(N), vπ(1))
v(i) : i-th city π : tour
N : city size
d(v(i),v(j)) : distance between two point
CEC2003
Num.
Optimum
of City
eil101
101
629
kroA200
200
29368
lin318
318
42029
pr439
439
107217
rat575
575
6773
d657
657
48912
from TSPLIB
Doshisha Univ., Kyoto, Japan
Job shop Scheduling Problems(JSPs)
• Job shop Scheduleing Problems(JSPs)
• Given:
– n jobs × m machines (resources)
– each job consists of a sequence of operations
processed in a given order
• Objective:
– schedule that minimizes the makespan
CEC2003
Doshisha Univ., Kyoto, Japan
Background
• Optimization :
Find values of the variables that minimize or maximize
the objective function while satisfying the constraints.
• Optimization Problem
– Combinatorial Optimization Problem
• Traveling Salesman Problems(TSPs)
• Job shop Scheduling Problems(JSPs)
– Continuous Opitimization Problem
• Heuristic search methods
– Simulated Annealing(SA)
– Genetic Algorithm(GA)
CEC2003
Doshisha Univ., Kyoto, Japan
Simulated Annealing (SA)
• An effective algorithm to solve combinational optimization problems.
• Algorithm
1.
2.
Move of a solution
Judging acceptance by the “Energy”, Ecurrent. and “next Energy”, Enext
Decreased
Increased
P  exp
3.
Always accept.
Accepted in a certain probability, “P”.
High temperature
(E next  E current )
Temperature
“Temperature” is decreased.
Low temperature
Local
minimum

• Cooling
Schedule : The procedures
for updating temperature.
Disadvantages :
Global minimum
(1) High computational costs.
(2) The difficult determination of a proper cooling schedule.
CEC2003
Doshisha Univ., Kyoto, Japan
Temperature in SA
Max Temperature
Conventional cooling schedule
Temperature
• A proportional cooling schedule
Tn1 Tn where 1.0
Important Temperature Region
Min Temperature
Time
• A specific constant temperature in SA
yields good solutions for TSPs.[Mark00]
Experiments to determine the region
Temperature
• many SAs with various constant
temperatures are performed.
• comparing the qualities
of the solutions obtained.
• Objective problem is
Traveling Salesman Problems (TSPs).
Max Temperature
Min Temperature
Time
CEC2003
Doshisha Univ., Kyoto, Japan
Important Temperature Region in TSPs
- eil101 TSP
Optimum
eil101
629
Topt region
1.1 ~ 2.5
kroA200
29368
26.8 ~ 52.7
lin318
42029
19.5 ~ 39.0
pr439
107217
44.3 ~ 72.3
rat575
6773
1.7 ~ 3.9
48912
13.5 ~ 26.8
d657
Constant temperature
• There is the important temperature region for each problem.
• The values and ranges of
important temperature region are problem-dipendent.
CEC2003
Doshisha Univ., Kyoto, Japan
Purpose of this study
•
Adaptive cooling schedule
– The mechanisum which specifies
the important temperature region automatically by Genetic Algorithm
– uses parallel SA
Parallel SA
+
GA to Temperature
Parallel SA with Adaptive Temperature
determined by Genetic Algorithm (PSA/AT(GA))
Feature of PSA/AT(GA)
-The cooling schedule of PSA/AT(GA) is automatically determined by GA,
and the temperature on each SA converges on the important temperature region.
CEC2003
Doshisha Univ., Kyoto, Japan
PSA / AT(GA)
1 SA + evaluate Fitness
2 GA to temperature
SA
3 Set new temperature
SA
SA
Solution
Temperature
(individual)
SA
GA operation
L
L
L : temperature change interval
• PSA/AT(GA) is based on Parallel SA.
• The different solutions and temperatures are assigned to different processors.
• Sequential SA and evaluating “fitness” are performed on each processor.
• The “fitness” isn’t Energy, but the value which evaluates the move of solution.
CEC2003
Doshisha Univ., Kyoto, Japan
Characteristics of the transition of the solution
- eil101 -
• The characteristics of the important temperature
– good solution
– relatively medium fluctuations
• It is able to judge goodness of the solution by temperature.
• “Fitness” in PSA/AT(GA) is designed by this idea.
CEC2003
Doshisha Univ., Kyoto, Japan
Evaluate “Fitness”
• Fitness value is defined by the summation of
the difference between a baseline and the energy value.
L
Fitness  ( E  E k )
L: temperature change interval
k 1
Energy
•calculated only when the solution is accepted,
Solution
and the energy dips from the baseline.
•repeats till the syncronous interval, L.
•E is an average of the energies of
all SA processes performed in parallel.
Average
Annealing Steps: k
CEC2003
Doshisha Univ., Kyoto, Japan
Effectiveness of “fitness”
• The temperature is concerned with the fluctuations of the solution.
• The fitness value is used to evaluate the fluctuations of the solution.
Energy
Low temperature
Energy
Important temperature
Energy
High temperature
Baseline
Baseline
Baseline
Steps
Fitness : low
Steps
Steps
Fitness : high
Fitness : low
• Searching at a important temperature, the fitness value is high.
•
SA processes with important temperatures are probably selected by GA.
CEC2003
Doshisha Univ., Kyoto, Japan
PSA / AT(GA)
1 SA + evaluate Fitness
2 GA to temperature
SA
3 Set new temperature
SA
SA
Solution
Temperature
(individual)
SA
GA operation
L
L
L : temperature change interval
• Sequential SA and evaluating fitness are
performed on each processor for synchronous interval, L .
• All temperatures are adjusted by GA synchronously.
CEC2003
Doshisha Univ., Kyoto, Japan
PSA / AT(GA)
1 SA + evaluate Fitness
2 GA to temperature
SA
3 Set new temperature
SA
SA
Solution
Temperature
(individual)
SA
GA operation
Selection
Crossover
• In selection, individuals
with a high fitness value would be selected.
• In crossover & mutation, various individuals
of temperature would be generated.
Mutation
CEC2003
Doshisha Univ., Kyoto, Japan
PSA / AT(GA)
1 SA + evaluate Fitness
2 GA to temperature
3 Set new temperature
Solution
Temperature
(individual)
GA operation
n
n
n : synchronous interval
• PSA/AT(GA) repeats this cycle to end.
• All temperatures of processors
would be automatically adjusted to important temperature region.
CEC2003
Doshisha Univ., Kyoto, Japan
Experiments
• Objective Problem
– TSPs (Traveling Salesman Problems)
– JSPs (Job shop Scheduling Problems)
• Compared method
– TPSA (Temperature Parallel SA) [Konishi, 95]
CEC2003
Doshisha Univ., Kyoto, Japan
Temperature Parallel SA(TPSA)
• Algorithm
High T
SA
TPSA
Low T
• The different temperatures are assigned to different processors.
• Each processor performs on sequential SA with a constant temperature.
• Two solutions with adjacent temperatures are exchanged.
• The features of TPSA
(1) Automatic determination of a cooling schedules
(2) A good fit for parallel processing
CEC2003
Doshisha Univ., Kyoto, Japan
Parameters used in the experiments for TSPs
Algorithm
PSA/AT(GA)
TPSA
Number of Processes
32
City size × 5
Temperature change interval
Annealing steps on each process
Maximum temperature
Minimum temperature
(City size × 5) × 160
The maximum energy of uphill move
is accepted at a rate of 50%.
One uphill move of solution is accepted
for the temperature change interval.
2-opt
Neighborhood Structure
Chromosome length
Crossover method
Crossover ratio
Mutation ratio
CEC2003
10
-
Roulette
-
0.3
-
0.01
-
Doshisha Univ., Kyoto, Japan
Experimental results (Error Rate) in TSPs
2
Error Rate (%)
PSA/AT(GA)
1.5
TPSA
1
0.5
0
eil101
kroA200 lin318
pr439
rat575
d657
TSP Problems
PSA/AT(GA) provides better results than TPSA.
CEC2003
Doshisha Univ., Kyoto, Japan
Cooling schedule (eil101)
- PSA/AT(GA) -
- TPSA 100
Temperature
Temperature
100
10
1
0.1
10
1
0.1
0
20000
40000
60000
Num. of annealing steps
80000
0
20000
40000
60000
80000
Num. of annealing steps
A line : a cooling schedule on one SA.
PSA/AT(GA) : Convergence on the important temperature region
TPSA
: All processes can’t always have good search.
The cooling schedule of PSA/AT(GA) is more proper than TPSA’s.
CEC2003
Doshisha Univ., Kyoto, Japan
Parameters used in the experiments for JSPs
Algorithm
PSA/AT(GA)
TPSA
Number of Processes
32
Temperature change interval
200
Annealing steps on each process
Maximum temperature
Minimum temperature
Neighborhood Structure
Modification of solution
Chromosome length
Crossover method
Crossover ratio
Mutation ratio
CEC2003
32000
The maximum energy of uphill move
is accepted at a rate of 50%.
One uphill move of solution is accepted
for the temperature change interval.
Critical Block Neighborhood [Yamada, ‘94]
GT Method [Giffler and Tompson, ‘60 ]
10
-
Tournament (size=2)
-
0.3
-
0.01
-
Doshisha Univ., Kyoto, Japan
Experimental results (Error Rate) in JSPs
3.5
Error Rate (%)
3
2.5
PSA/AT(GA)
TPSA
2
1.5
1
0.5
0
FT10
FT20
ORB1
ORB3
LA21
LA40
JSP Problems
PSA/AT(GA) provides better results than TPSA.
CEC2003
Doshisha Univ., Kyoto, Japan
Cooling schedule (ft10)
- PSA/AT(GA) -
- TPSA 100
Temperature
Temperature
100
10
1
0.1
10
1
0.1
0
20000
40000
60000
Num. of annealing steps
80000
0
20000
40000
60000
80000
Num. of annealing steps
A line : a cooling schedule on one SA.
PSA/AT(GA) : Convergence on the important temperature region
TPSA
: All processes can’t always have good search.
The cooling schedule of PSA/AT(GA) is more proper than TPSA’s.
CEC2003
Doshisha Univ., Kyoto, Japan
Conclusions
This study proposes a new hybrid method,
Parallel Simulated Annealing with Adaptive Temperature
determined by Genetic Algorithm(PSA/AT(GA)).
PSA/AT(GA)
• is based on Parallel SA.
• uses GA to determine temperature on each SA.
• automatically converges important temperature region on SA
Applying PSA/AT(GA) to TSPs and JSPs
• PSA/AT(GA) has better searching ability than TPSA.
CEC2003
Doshisha Univ., Kyoto, Japan
Fin
CEC2003
Doshisha Univ., Kyoto, Japan
Important temperature region in JSPs
- ft10 TSP
Optimum
Topt region
ft10
930
5.8 ~ 14.2
ft20
1165
3.1 ~ 9.7
orb1
1059
7.5 ~ 14.2
orb3
1005
7.5 ~ 16.0
la21
1046
3.5 ~ 12.5
la40
1222
2.7 ~ 12.5
• There is the important temperature region for each problem in JSP,too.
• The values and ranges of
important temperature region are problem-dipendent.
CEC2003
Doshisha Univ., Kyoto, Japan
Coding of temperature
• PSA/AT(GA) uses GA to optimize the cooling schedule.
• Individual : Temperature on each processor
• Design variable : The exponent of temperature function, X
Real Value
Bit Array
Encoding
Temperature = 10 X
X
Decoding
• The expression of temperature in
PSA/AT(GA) is suitable for the exponential
cooling schedule in SA.
CEC2003
SA cooling method
Tn1  Tn (  1.0)
Doshisha Univ., Kyoto, Japan
Genetic Algorithm (GA)
• Optimization method based on
the mechanism of natural selection and natural genetics.
• Searching points : Individuals
• The new searching points are generated by GA operator.
GA operator
Individual
Selection
Crossover
Population
CEC2003
Mutation
Individuals with
high fitness survive.
Perform direct
information exchange
between Individuals.
Change information
of individuals.
Doshisha Univ., Kyoto, Japan
Temperature Parallel SA(TPSA)
• Algorithm
- The different temperatures are
assigned to different processors.
- Each SA searches solution with
a constant temperature.
- Exchanging solution.
High T
T  E  0
1

P
T  E
exp(

) otherwise

T T '

Low T
SA
TPSA
Feature of TPSA
- Automatic determination of a
cooling schedules
- A good fit for parallel processing
CEC2003
Doshisha Univ., Kyoto, Japan
The execution time
The execution time [sec] (speedup)
Problems
PSA/AT(GA)
TPSA
Sequential SA
eil101
21.8(9.3)
10.1(20.0)
202(1.0)
kroA200
54.9(19.0)
41.5(25.1)
1043(1.0)
lin318
89.8(22.5)
76.0(26.6)
2025(1.0)
• The execution time of PSA/AT(GA) is a little longer than TPSA.
• The speedup for PSA/AT(GA) and TPSA
increases as the problem size become longer.
• PSA/AT(GA) shows high parallel efficiency.
CEC2003
Doshisha Univ., Kyoto, Japan
Energy histories
※The values are the average of 20 trials.
• TPSA shows a good convergence at the beginning.
• PSA/AT(GA) shows a better performance at the later stage.
PSA/AT(GA) has a better performance
in searching global optimum than TPSA.
CEC2003
Doshisha Univ., Kyoto, Japan
Error Rate (%)
Experimental results2 (Error Rate)
TSP Problem
PSA/AT provides the best result in the whole problems.
CEC2003
Doshisha Univ., Kyoto, Japan
GA operator
1 Send Information
Individuals of temperature
and fitness are gathered to
one processor.
2 Selection of individuals
Individuals with higher fitness survive.
Individuals of a proper temperature for
searching probably survive.
3 Crossover &
Mutation
4 Update temperature
CEC2003
Various individuals of
temperature are generated.
Doshisha Univ., Kyoto, Japan