Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Design and Analysis of Algorithms

Heuristics Technique
Dr. Lê Nguyên Khôi
The VNU University of Engineering and Technology
Contents

 Exact method
 Heuristics technique
 Optimization problems
 Class of heuristics

Design and Analysis of Algorithms 1


Exact Method

 Optimal solution could be found


 Long search time
 Not suitable for complex problems
 Due to long search time
 Real-world problems
 Search time plays an important role

Design and Analysis of Algorithms 2


Heuristics Technique

 A practical method
 Based on trial and error
 Run within a reasonable time
 Suitable for:
 Complex problems
 Real-world problems
Finding feasible solutions is sufficient

Design and Analysis of Algorithms 3


Optimization Problem

 Find optimal solution within feasible solutions


 Feasible solutions:
 Satisfy all hard constraints
 Feasible solution evaluation:
 Optimize violations on soft constraints
 Based on objective functions

Design and Analysis of Algorithms 4


Heuristics Technique for
Optimization Problem

 Feasible solution construction:


 From an empty solution to satisfy hard constraints
 From random solution to repair hard constraints
 Feasible solution evaluation:
 Based on objective function value
 To compare feasible solutions
 Near-optimal solution estimation
 Search time
 Objective function value
 Improvement on objective function value

Design and Analysis of Algorithms 5


Optimization Problems

 Timetabling
 Job shop scheduling
 Bin packing
 Employee scheduling
 Vehicle Routing
 Logistics

Design and Analysis of Algorithms 6


Timetabling

 Find suitable slots to allocate courses


 Limited resource / Constraints
 Lecturers availability
 Classroom constraints
 Time slot constraints
 Course constraints
 02 types
 Curriculum-based course timetabling
 Examination timetabling

Design and Analysis of Algorithms 7


Job Shop Scheduling

 Determine a sequence of jobs


 Each job could contain sub-jobs
 Sub-jobs must be performed in order
 Sub-jobs could require machine tools
 Sub-jobs / Jobs could be performed in parallel
 Objective:
 Optimize the production process
 Optimize the part storage (completed jobs)

Design and Analysis of Algorithms 8


Bin Packing

 Determine a set of item to be packed


 Each item has weight (or volume)
 Container has maximum weight (or volume)
 Objective
 Maximize the total weight (or volume) of the
container
 Example: Knapsack problem

Design and Analysis of Algorithms 9


Employee Scheduling

 Construct a schedule for employees (3 shifts


per day, 7 days per week)
 Factory
 Hospital
 Typical constraints
 Shift constraint
 Work regulation
 Personnel qualification
 Personnel preference

Design and Analysis of Algorithms 10


Vehicle Routing

 Determine efficient routes for vehicle transport


to serve customer needs
 Typical constraints
 Customer requirement
 Vehicle availability / constraint
 Objective:
 Satisfy all customer needs
 Minimize the total cost of transportation

Design and Analysis of Algorithms 11


Logistics

 Consumer goods produced by factories


 Based on demands, consumer goods are
delivered to general warehouses
 At general warehouse, consumer goods are
packed and delivered to distribution points
 Combination of:
 Job shop scheduling
 Bin packing
 Employee scheduling
 Vehicle routing
Design and Analysis of Algorithms 12
Heuristics Technique

 Estimate near-optimal solutions due to


 Huge data, many constraints, limited search time
 Heuristics
 Design to solve a specific problem
 Could not be applied for other problems
 Metaheuristics
 Design to solve general optimization problems
 Could be applied for different problems
 Hyperheuristics
 Design to solve a class of problems
Design and Analysis of Algorithms 13
Heuristics

 Algorithm design based on


 Study the set of constraints
 Techniques to satisfy constraints
 Order to apply techniques
 Advantage
 Find solution quickly
 High solution quality
 Disadvantage
 Could not be applied for other problems

Design and Analysis of Algorithms 14


Metaheuristics

 Algorithm design based on


 Construct acceptable quality solutions
 Optimize solution quality
based on objective function values
 Advantage
 Could be applied for different problems
 Disadvantage
 Low quality solutions

Design and Analysis of Algorithms 15


Metaheuristics

 Local search
 Tabu Search
 Simulated Annealing
 Neighborhood Search
 Learning mechanism
 Ant Colony Optimization
 Neural Network
 Population-based
 Genetic Algorithm
 Swarm Optimization

Design and Analysis of Algorithms 16


Hyperheuristics

 Algorithm design based on


 Study a set of problems
 Study heuristics to solve these problems
 Method to combine these heuristics
 Method to evaluate these heuristics
 Categories
 Heuristic to choose heuristics
 Heuristic to create heuristics

Design and Analysis of Algorithms 17


Other Issues

 Multiobjective
 Satisfying constraints is not simple
 Evaluate violation of constraints as objective
functions
 Evaluate objective functions
In parallel
In sequential order

Design and Analysis of Algorithms 18


Other Issues

 Phenotype – Genotype
 Phenotype:
 Determine better solutions based on objective
function values
 Provide less information about solution

 Genotype:
 Determine better solutions based on the structure
of solutions
 Provide more information about solution

Design and Analysis of Algorithms 19


Other Issues

 Real-time data
 The need to find optimal solution
 New data intake could change recently found
solutions
 Re-optimization

Design and Analysis of Algorithms 20

You might also like