Geometrical Models and Algorithms for Irregular Shapes Placement Problems
Total Page:16
File Type:pdf, Size:1020Kb
!D 2014 GEOMETRICAL MODELS AND ALGORITHMS FOR IRREGULAR SHAPES PLACEMENT PROBLEMS PEDRO FILIPE MONTEIRO ROCHA TESE DE DOUTORAMENTO APRESENTADA À FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO EM ENGENHARIA INFORMÁTICA FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO Geometrical Models and Algorithms for Irregular Shapes Placement Problems Pedro Filipe Monteiro Rocha Doctoral Program in Informatics Engineering Supervisor: A. Miguel Gomes Co-Supervisor: Rui Rodrigues Julho de 2014 c Pedro Filipe Monteiro Rocha, 2014 Geometrical Models and Algorithms for Irregular Shapes Placement Problems Pedro Filipe Monteiro Rocha Doctoral Program in Informatics Engineering Julho de 2014 Abstract This thesis addresses the Irregular Piece Placement problem, also known as Nesting problem, while focusing on the resolution of real world instances with continuous rotations. The real world instances are considered very large instances containing many pieces with very complex outlines, where continuous rotations may be desired. The Nesting problem is presented, with a description of its characteristics, identifying the main challenges, and related problems. This is done through a literature review, considering the geometric representations and common solution approaches that are normally used, in order to identify possible paths to explore, and confirm its inherent difficulty in being efficiently tackled, specially when dealing with continuous rotations. The geometric component of the Nesting problems is addressed by using a novel algorithm that generates Circle Covering representations based on the Medial Axis skeleton of a piece. This iterative algorithm enables control over the approximation error, which allows managing the trade- off between the quality of circle covering representation and the total number of circles. This algorithm allows producing coverings with different levels of quality, and with different types of covering, depending on the characteristics of the Nesting problem where they will be used, which have a significant impact on the feasibility of the final solution and in the tightness of the layout. The solution approach is based on Non-Linear Programming models, from which several for- mulations were made, taking into account the size of the problem being addressed. These models fully support continuous rotations, and can produce feasible solutions with an acceptable com- putational cost. In order to tackle large instances, extensions to the NLP models are done, by aggregating constraints by type, and implementing other tweaks to reduce computational cost. In order to address issues with high computational cost, layout solutions with insufficient qual- ity, and very large instances, three approaches are proposed. The first uses a two-step compaction process, where the NLP model uses low resolution in the first step, and high resolution in the second. The second approach uses a two-phase compaction process, where in the first phase big pieces are compacted, considering certain parameters, and holes are created between the pieces, and in the second phase, the small pieces remaining are assigned and placed in the holes created in the first phase, and all compacted together. The last approach uses a multi-step approach, where pieces are separated in groups, and compacted into the layout in a sequential order, forming layers of pieces. These approaches show very promising results, being able to address the Nesting prob- lem with continuous rotations, considering their purpose. If these approaches are combined they can be used to improve results of currently existing approaches. i Resumo Esta tese aborda o problema de Posicionamento de Peças Irregulares, também conhecido como problema de Nesting, focado na resolução de instâncias reais destes problemas, considerando rotações contínuas. O problema de Nesting é apresentado com uma descrição das suas caracterís- ticas, identificando os desafios principais e problemas relacionados. Isto é feito através de uma revisão da literatura actual, considerando representações geométricas e métodos de resolução mais utilizados, com o objectivo de identificar possíveis oportunidades que possam ser exploradas de forma a abordar o problema de Nesting com rotações livres de forma mais eficiente. A componente geométrica do problema de Nesting é abordado com recurso a um novo algo- ritmo que cria uma representação baseada em cobertura por círculos, feita a partir de um esqueleto topológico de cada peça. Este algoritmo iterativo permite ter controlo sobre o erro de aproximação da peça, permitindo lidar com o compromisso entre a qualidade de representação e o número total de círculos produzido. Este algoritmo permite também produzir coberturas com níveis de qual- idade distintos, assim como tipos de cobertura de círculos diferentes, orientados para problemas específicos de Nesting, produzindo um impacto significativo na admissibilidade da solução final e na qualidade de compactação. O método de resolução utiliza modelos de programação não-linear, que foram obtidos através de diferentes formulações matemáticas do problema, tendo em conta o tamanho do problema a ser abordado. Estes modelos matemáticos suportam rotações livres, conseguindo produzir soluções admissíveis com um custo computacional razoável. De forma a poder lidar com instâncias de Nesting de grande tamanho, foram feitas extensões aos modelos matemáticos para reduzir o custo computacional, através da agregação de restrições. Para poder lidar com vários problemas relacionados com alto custo computacional, soluções com qualidade insuficiente e instâncias de tamanho muito grande, foram propostas três aborda- gens. A primeira utiliza um processo de compactação baseado em duas etapas, que utiliza res- olução baixa na primeira etapa, e uma resolução alta na segunda, de forma a compactar depressa, e ajustar as peças com qualidade. A segunda abordagem usa duas fases, compactando as peças grandes na primeira fase, criando buracos no espaço entre as peças grandes. Na segunda fase, as peças pequenas são atribuídas e colocadas nos buracos, sendo todas as peças compactadas de seguida. A terceira, e última abordagem utiliza várias etapas, separando inicialmente as peças em grupos distintos, e compactando-as numa ordem sequencial, formando camadas de peças, per- mitindo compactar grandes problemas, com custo computacional reduzido. Estas abordagens apresentam resultados muito promissores, conseguindo abordar problemas de Nesting com rotações contínuas, tendo em conta as suas vantagens individuais. Combinando estas abordagens, ou aplicando-as de uma forma específica, pode melhorar os resultados de abor- dagens existentes. iii Acknowledgements First an foremost, I would like to give thanks to Prof. António Miguel Gomes, my scientific supervisor, for his great support and encouragement during the duration of this Thesis. I also would like to thank all professors, colleagues and friends at the workplace, especially Prof. Franklina Toledo, Prof. Marina Andretta, and to my co-supervisor, Prof. Rui Rodrigues for their support. I must also thank everyone who gave their input on this Thesis and its contents. The final thanks will go to my family, and close friends, for their dedication and full support during the progression of this Thesis. Pedro Filipe Monteiro Rocha v Contents 1 Introduction 1 1.1 Research Questions . 2 1.2 Objectives and Contributions . 3 1.3 Thesis Outline . 4 2 The Problem of Nesting Irregular Shapes with Continuous Rotations 7 2.1 Nesting and Other Cutting and Packing Problems . 8 2.2 Geometrical Representations for the Nesting Problem . 13 2.2.1 Grid Representation . 14 2.2.2 Polygonal Representation . 16 2.2.3 Phi-Function Representation . 20 2.2.4 Circle Covering Representation . 22 2.3 Modeling the Nesting Problem . 27 2.3.1 Models derived from No-Fit-Polygon . 28 2.3.2 Models derived from Phi-Function . 31 2.3.3 Models derived from Circle Covering . 33 2.4 Solution Approaches to the Nesting Problem . 34 2.4.1 Mathematical Solvers . 35 2.4.2 Constructive Algorithms . 35 2.4.3 Improvement Algorithms . 40 2.5 Specific Geometric Algorithms for the Nesting Problem . 45 2.5.1 Spatial Partition Algorithms . 46 2.5.2 Collision Handling . 47 2.5.3 Convex Decomposition . 52 2.5.4 No-Fit-Polygon construction . 54 2.5.5 Medial Axis Construction . 60 2.6 Concluding Remarks . 64 3 Geometric Representation based on Circle Covering 69 3.1 Types of Circle Covering . 70 3.2 Hierarchical Circle Covering Approach . 70 3.3 Complete Circle Covering Approach . 72 3.3.1 Medial Axis Algorithm . 72 3.3.2 CCC-MA Algorithm . 73 3.3.3 Results and Discussion . 75 3.4 Partial and Inner Circle Covering Approaches . 78 3.4.1 kCC-MA Algorithm . 79 3.4.2 Coverings Simplifications . 81 vii viii CONTENTS 3.4.3 Tip Covering Correction . 82 3.4.4 Results and Discussion . 83 3.5 High and Low Resolution Coverings . 86 3.6 Concluding Remarks . 87 4 Non-Linear Programming Approach 91 4.1 Non-Linear Mathematical Model . 92 4.1.1 Model based on Circles . 92 4.1.2 Model based on Pieces . 94 4.2 Constraints Aggregation . 95 4.2.1 Aggregating Non-Overlapping Constraints . 96 4.2.2 Aggregating Containment Constraints . 97 4.2.3 Aggregating Piece Integrity Constraints . 98 4.2.4 Hierarchical Overlap Method . 99 4.2.5 Model Variants . 100 4.3 Layout Post-Optimization . 101 4.4 Results and Discussion . 103 4.4.1 Nesting Instances, Setup Configuration and Initial Solutions . 105 4.4.2 Testing the Model Variants . 107 4.4.3 Testing the High and Low Resolution Coverings . 111 4.4.4 Layout Post-Optimization Computational Experiments . 114 4.4.5 Testing the Circle Covering Types . 120 4.4.6 Non-Linear Programming Approach Evaluation . 122 4.5 Concluding Remarks . 126 5 Extended Non-Linear Approaches 131 5.1 Multi-Resolution Approach . 132 5.1.1 Multi-Resolution Algorithm . 132 5.1.2 Results and Discussion . 133 5.2 Two-Phase Approach . 135 5.2.1 Two-Phase Approach Overall Description . 137 5.2.2 Non-Linear Programming Model Extension for the First Phase . 140 5.2.3 Second Phase Hole Fill and Layout Compaction . 143 5.2.4 Results and Discussion . 145 5.3 Tweaking Normal Optimization for Layout Feasibility in Post-Optimization .