Docsity

Metaheuristics and Constructive Heuristics, Exams of Design

Partial preview of the text

Download Metaheuristics and Constructive Heuristics and more Exams Design in PDF only on Docsity!

METAHEURISTICS

Constructive Heuristics

Neighborhood

Constructive Heuristics

๏ƒ˜ A type of heuristic method that refer to the process of

constructing an initial feasible solution from scratch.

๏ƒ˜ Starts with a scratch (empty solution).

๏ƒ˜ Used local heuristic to select the new element to be

included in the solution.

๏ƒ˜ Repeatedly extends the current solution until a complete

solution is obtained.

Easy to implement

But, usually, no optimality

Executes quickly

Simple to design

Nearest Neighbour algorithm

Creating an empty solution S; S ={}; Randomly select ๐‘’ S = S โˆช ๐‘’ ; Repeat Next nearest element selected from the set E (๐‘’๐‘–)

If Sโˆช ๐‘’๐‘– โˆˆ F Then /โˆ— test the feasibility of the solution , Fโˆˆsearch space โˆ—/

S = S โˆช ๐‘’๐‘– ;

Until Complete solution found

Random algorithm

Creating an empty solution S; S ={}; Randomly select ๐‘’ S = S โˆช ๐‘’ ; Repeat Next element is randomly selected from the set E (๐‘’๐‘–)

If Sโˆช ๐‘’๐‘– โˆˆ F Then /โˆ— test the feasibility of the solution , Fโˆˆsearch space โˆ—/

S = S โˆช ๐‘’๐‘– ;

Until Complete solution found

Example: Nearest Neighbour Algorithm - TSP

A

C

B

E

D

Solution: A-C-E-B-D-A

DISTANCE TABLE

A B C D E

A 0 2 1 7 5

B 0 2 4 3

C 0 6 2

D 0 4

E 0

Cost=1+2+3+4+5 Cost=

Example2: Random Algorithm

A C

B

E

D

Solution: A-C-E-D-B-A

Cost=1+10+23+3+

Cost=

Optimal Solution: A-C-D-B-E-A Cost=1+2+3+8+5 Cost=

Neighborhood

A neighborhood function N is a mapping N : ๐‘† โ†’ 2๐‘ ^ that

assigns to each solution s of S a set of solutions N(s) โŠ‚ S

๏ƒ˜ Plays a crucial role in the performance of metaheuristic.

๏ƒ˜ If the neighborhood structure is not adequate to the

problem, any metaheuristic will fail to solve the problem

A solution sโ€ฒ in the neighborhood of s (sโ€ฒ โˆˆ N( s )) is called a neighbor of s.

A neighbor is generated by the application of a move operator m that performs a small perturbation to the solution s.

Neighborhood

The main property that must characterize a neighborhood is

locality.

Locality is the effect on the solution when performing the move

(perturbation) in the representation.

When small changes are made in the representation (small effect on the solution, the neighborhood is said to have a strong locality.

Weak locality is characterized by a large effect on the solution when a small change is made in the representation.

Example: Move (Shift) neighborhood operator (VRP)

transfer one customer to the other route

Example: 2-opt star neighborhood operator (VRP)

randomly selects two routes from the current solution and swap the customers located at the end sections of selected routes