Euristic AND Etaheuristic Lgorithms: Operation Research and Supply Chain Unit V
Euristic AND Etaheuristic Lgorithms: Operation Research and Supply Chain Unit V
Euristic AND Etaheuristic Lgorithms: Operation Research and Supply Chain Unit V
Wikipedia says: In computer science, a heuristic is a technique designed to solve a problem that ignores whether the solution can be proven to be correct, but which usually produces a good solution or solves a simpler problem that contains or intersects with the solution of the more complex problem.
Heuristics are intended to gain computational performance or conceptual simplicity, potentially at the cost of accuracy or precision.
HUH?
Basically
heuristic algorithms solve really difficult problems reasonably well (which is pretty subjective) in a reasonable amount of time (also pretty subjective). Examples of problems that are tackled with heuristic algorithms
2D PACKING AN EXAMPLE
2D PACKING AN EXAMPLE
1 2 3 4 5
Sequence = 1,2,3,4,5
2D PACKING AN EXAMPLE
1 4 3 2 5
Sequence = 1, 4, 3, 2, 5
For 5 pieces there are 5 x 4 x 3 x 2 x 1 different orderings for the placement = 120 combinations Piece of cake for a computer to try each combination in (nearly) no time at all
(50 pieces)
pieces means 50 x 49 x..2 x 1 different orderings = 30414093201713378043612608166064768 844377641568960512000000000000 Thats quite a lot really. If a computer could evaluate 1000 orderings per second itd still take approximately: 96442456880115988215412887386050129 5166718720476931506 years! (and thats without being allowed to rotate the pieces)
HEURISTIC ALGORITHMS
Cast your mind all the way back to the second slide. Maybe a heuristic algorithm would be good for tackling this type of problem? (commonly known as a combinatorial optimization problem)
MY CURRENT RESEARCH
The 3-D strip packing problem Given a container (a big box, a lorry, an aeroplane cargo hold etc) and a number of boxes to load inside the container what is the best way to place them all so that they take up the shortest (height) space as possible?
Gap
1 Gap
Gap 1 X
2 1
Gap
X
2 1
3
X
Gap
Gap 2 1
X X
4 2 1
3 3
X X X
to the nature of the algorithm, towers may form. Towers are boxes with large height dimensions and lower width and length dimensions that are placed late on in the packing process, jutting out over the top of the profile. The tallest tower is removed from the packing, rotated so that it is effectively knocked down and placed back into the packing at the lowest point available. This is repeated until the solution is not improved any further.
Gap 9 12 10 6 11 4 3 7 5
8 32
1 9 12 10 6 11 4 3 7 5
8 32
9 12 10 6 11 4 3 7
8 32
5
1 9 12 10 6 11 4 3 7 5
8 32
old height
Improvement new height 1 9 12 10 6 11 4 3 7 5
8 32
A) 4 x 3 x 2 x 1 = 24 different orders
EXAMPLES OF METAHEURISTICS
Hill climbing / Greedy search Tabu search Simulated Annealing Genetic algorithms Ant colony optimisation many more
EXPLANATION PART 1
This means it doesnt actually know what the problem is its solving So it can be applied to many different types of problems
EXPLANATION PART 2
EXPLANATION PART 3
Advantage of metaheuristics:
Generally produce higher quality results (given enough time) than simple heuristics
They take a lot longer as they have to generate and evaluate many solutions rather than just one
Disadvantage:
So now we have g (the harder function to define in this case) lets define f
f() simply returns the highest location in the packing when placed in a bottom right way E.g. f([1,2,3,4]) = 6
4 2 1 3 6 units high
6)
7) 8) 9)
Iteration 2: g([1,2,5,4,3]) = [2,1,5,4,3] f([2,1,5,4,3]) = 13, worse than our current best so ignore this order Iteration 3: g([1,2,5,4,3]) = [1,4,5,2,3] f([1,4,5,2,3]) = 10, our best so far so we keep this Return [1,4,5,2,3] as our best solution
DEMONSTRATION/QUESTIONS?
http://www.cs.nott.ac.uk/~sda/viewer.zip