Научная статья на тему 'Application of the hybrid metaheuristic solving problem densely placed nonconvex geometric objects'

Application of the hybrid metaheuristic solving problem densely placed nonconvex geometric objects Текст научной статьи по специальности «Математика»

CC BY
163
52
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
НЕРЕГУЛЯРНОЕ РАЗМЕЩЕНИЕ ГЕОМЕТРИЧЕСКИХ ОБЪЕКТОВ / ГОДОГРАФ ФУНКЦИИ ПЛОТНОГО РАЗМЕЩЕНИЯ / УСЛОВИЯ ВЗАИМНОГО НЕПЕРЕСЕЧЕНИЯ ДВУМЕРНЫХ ГЕОМЕТРИЧЕСКИХ ОБЪЕКТОВ / PACKING / NESTING / HODOGRAPH OF DENSE ALLOCATION FUNCTION / NO-FIT-POLYGON / SELF-NON-INTERSECTION CONDITIONS OF POLYGONS / IRREGULAR DENSE NESTING OF TWO-DIMENSIONAL GEOMETRIC OBJECTS

Аннотация научной статьи по математике, автор научной работы — Verkhoturova G. N., Lukjanov M. V.

О решении задачи нерегулярного размещения геометрических объектов на плоском материале на основе наклонных диаграмм. Среди множества задач, возникающих на практике, важное место занимают задачи, связанные с нерегулярным размещением двумерных геометрических объектов, например, раскрой листов на плоские заготовки, компоновка двумерных объектов в заданной области размещения. Все они являются задачами оптимизационного геометрического моделирования и, с точки зрения комбинаторной сложности, принадлежат к классу NP-трудных. Дополнительную геометрическую сложность при их решении составляет проблема соблюдения условий взаимного непересечения размещаемых объектов между собой и с границами зоны размещения. В работе рассматривается задача нерегулярного плотного размещения невыпуклых геометрических объектов, аппроксимированных многоугольниками, на полубесконечной полосе минимальной длины. Для её решения предложен внутренний алгоритм с применением годографа функции плотного размещения, основанный на анализе возможных точек занесения объекта в область упаковки и алгоритм внешней оптимизации с использованием гибридной метаэвриcтики.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Application of the hybrid metaheuristic solving problem densely placed nonconvex geometric objects

The basic stages solving 2D irregular-shaped nesting problem are considered. Algorithms of definition of conditions not overlap two-dimensional objects, modes of the organization of exterior procedure of optimization and comparison results of their work, are considers.

Текст научной работы на тему «Application of the hybrid metaheuristic solving problem densely placed nonconvex geometric objects»

ISSN 1992-6502 (Print)_TB&C/ftVH/U/IC ^¡jf/^Q^^lj _ISSN 2225-2789 (Online)

Vol. 18, no. 5 (66), pp. 42-47, 2014 http://journal.ugatu.ac.ru

UDC 004.7

Application of the hybrid metaheuristic solving problem

densely placed nonconvex geometric objects

1 2 g. n. Verkhoturova , m. v. Lukjanov

1 [email protected], 2 [email protected] Ufa State Aviation Technical University, Russia Submitted 2014, July 10

Abstract. The basic stages solving 2D irregular-shaped nesting problem are considered. Algorithms of definition of conditions not overlap two-dimensional objects, modes of the organization of exterior procedure of optimization and comparison results of their work, are considers.

Keywords: packing; nesting; hodograph of dense allocation function; no-fit-polygon; self-non-intersection conditions of polygons; irregular dense nesting of two-dimensional geometric objects.

1. INTRODUCTION

Among set of the problems, taking place in practice, the important place is occupied the problems, connected with the layout at strips and plates of two-dimensional geometrical objects, for example, uncover details of the various form on sheets.

The solving of irregular-shaped nesting problem has interest for such branches as the sewing, paper industry, shipbuilding, mechanical engineering, radio electronics, furniture manufactures.

2. PROBLEM STATEMENT

Are given: P = {p,p>,...pj: p ^r2,i =

- list of geometrical objects (GO), Q ^ R - layout strip (LS) width W.

Let's designate: Pt (u) - geometrical object P, with coordinate's vector of reference point u e R2; X (P (U)) - length of layout strip for P with nesting geometrical parameters U.

It is necessary:

To find such U, that X (P(U)) ^ min

At following conditions: int P fa)Rint p (wj) = 0, Vi = \n, Vj = ,i * j

p (u) n (r 2\ q)=0, vi=in

3. SOLUTION STRUCTURE

The structure of solving of this task corresponds its partition on the subtasks, presented on the diagram of methodology IDEF0 on Fig. 1.

3.1. Input data formats of two-dimensional GO

Data input about geometry GO can be present files of a certain format.

As a format of files for data storage one of widely used in CAD systems formats of an interchanging of the two-dimensional graphic information (DXF, DWG and est.) can be chosen or the format oriented for needs of given realized application.

In the given work two simplified formats of text files have been developed for data storage about geometry GO:

- File.sp - the text file containing the name of i - geometrical object, an amount of its vertices and their coordinates divided by a blank, in an index counter-clockwise in a local system co-ordinates.

- File.lp - the text file containing the similar information about some list GO.

3.2. Solving Approaches

2D irregular-shaped nesting problem can be considered as the problem of the mathematical programming defined on set of of feasible layouts of GO in layout strip (i. e. the layouts, satisfying to restrictions) [1].

One of applied modes for a solution of such problems is the method coordinate descent which leads to a partition of process solving on two parts:

1. Modeling of dense movement of GO in the strip layout - an interior part.

Fig. 1. Structure of solving 2D irregular-shaped nesting problem

2. Forming and a modification of sequence of objects to be place, and their orientation rather LS -an exterior (combinatorial) part.

Main purpose of interior procedure is determining the set of feasible locations that one GO may take with respect to another GO, such that geometrical objects do not overlap.

3.3. The review of methods modeling not overlap of two-dimensional geometrical objects

Methods of feasible layouts, i.e. layouts where the objects do not overlap and fit inside the strip layout are describe in paper [2].

In our paper, there is chosen the hodograph-oriented method or method, named no-fit-polygon (NFP), based on Minkowski sum [4], in view of following virtues :

- Simplicity of realisation for cases when placed GO is substituted by its convex hull, and already placed GO - non convex;

- A high speed of computation .

Consider algorithm of calculating the no-fitpolygon in more details.

Let are given:

Polygon A, established in strip layout and set by edges Ai (i = 1, 2, ..., n). Each edge of a polygon A has an sign - TurningPoint, accepting value true or false. The polygon edge is considered rotary (TurningPoint = true) if the interior angle at one of

vertices of an edge is less 180 and at another - it is more 180 °.

Convex polygon B or a convex hull of a non-convex polygon B, which is required to be established layout strip, such that the polygons do not overlap.

The algorithm consists of three stages:

• Sort all edges of polygons by slope into one list -

mergeList;

• Forming list of edges for no-fit-polygon - gList;

• Forming outer envelope from set of edges gList, received at the second stage - gives NFP [A,B] (see Fig. 2).

Forming merge list of edges of polygons -mergeList.

The edges of polygons are ordered anti-clockwise and their edges are indexed, since the left lower edge.

The polygon B is inverted, i. e. the polygon - B = B* (-1) with the coordinates of vertices received by multiplication on -1 of coordinates of all vertices B, or otherwise, on the base list of edges of a polygon B, oriented clockwise.

All edges of polygons A and - B are put into the list mergeList, and the list is sorted by increase of slope of edges to an abscissa axis.

Forming list of edges for no-fit-polygon - gList. 1. There is an empty list of edges gList.

2. The initial position p in the list mergelist is established:

3. p = index of edge AO of a polygon A;

4. i = 0, where i - the counter of edges of a polygon A;

5. Dir = 1, where Dir - a direction of reading list mergeList (1 - a direct direction, (-1) -an inverse direction);

6. Begin list reading.

7. If the edge mergeList [p] belongs to a polygon - B the edge is added in the list gList. And, the direction of added edge changes on opposite, if indication Dir =-1. We go to a step 12.

8. If the edge mergeList [p] belongs to a polygon A and its index is equal I, the edge is added in the list gList.

9. If the edge mergeList [p] has sign TurningPoint = true, Dir = Dir * (-1).

10. i = i+1.

11. p = p+Dir.

12. If i < = A.size ( size of array of edges of a polygon A, we go to a step 8.

13. We finish algorithm and exit.

Forming contour of no-fit-polygon from set of edges gList.

• From edges of gList we build a polygon (generally self-intersected).

Delete in the received polygon self-intersection and interior loops.

We do it in two stages:

a) we find all points of self-intersection of a polygon, include them as points of an exterior contour, and the edges which are between intersected edges it is deleted.

b) we find all points which are between points with identical coordinates, and it is deleted them.

• Under the received list of points we form a

contour which is NFP[A,B] - GAB. On Fig. 2 the example of calculation NFP of two polygons is presented by the above described method.

3.4. ALGORITHM OF DETERMINATION OPTIMUM LAYOUT OF A POLYGON

The set admissible for the arrangement of a polygon of points represents association of the areas limited various NFP (generally it can be inconsistent).

In the process of determination of an optimum point of place of next polygon Pj , from set of admissible points, we will consider points of local extreme. They can be found as a result of reviewing of following potential points of place (we will consider that numbers of polygons correspond to positions in the place list):

1. Vertices of NFP Gj next polygon to place Pj and any placed polygon Pi, i = 1, j — 1 ;

2. Vertices of NFP Gq next polygon to place Pj and strip layout Q;

3. Intersections of edges Gj among themselves;

4. Intersections of edges Gj and edges Gj

AS -3 MirgilHtof polYioiii A and-B Sloptdissrim

m rnergeLisl : {AGrAÎ, BÏ, Al> BO, A3, A4, fll, Bi)

gù'Q A f^

№ 80 < ->Afl 00 -4.......................

"^IX y

m « y^Sv

tl

Goih litt

gLisl: IAD, &3r Al, -Bï, Aî, BÎ, BO, A3r M, 61, iesuhim AFP

Û (M ii M

AO

Fig. 2. An example of calculation NFP of two polygons

Each potential point of the place moves on input of algorithm and is checked on an admissibility and an optimality.

Describe verbal exposition of algorithm.

1. Coordinates of a checked point are compared to co-ordinates of a current optimum point of place. That which satisfies to following conditions gets out of two points:

- if the layout direction is set to the right, with the minimum coordinate on OX, in case of coincidence x - with the minimum coordinate on OY;

- If the layout direction is set upwards, with the minimum coordinate on OY, in case of coincidence y - with the minimum coordinate on OX.

2. If the current optimum point, go to a step (an optimum point remained without modifications).

3. If the chosen point lies inside at least one of contours of NFP of the list { GiJ}, we finish algorithm work (the optimum point remained without modifications).

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

4. If the chosen point lies out of a contour of NFP Gqj, we finish algorithm work (the optimum point remained without modifications).

5. We do the chosen point by a new optimum point of the layout.

6. We finish algorithm and exit.

3.5. ALGORITHM OF DETERMINATION GRAVITY CENTER POINT TO BE PLACED POLYGON

Before the beginning of procedure of exterior optimisation for all GO in the task, calculate angle of rotation GO such, that the gravity center point of each of them had the minimum coordinate on axis OX (OY) depending on the set direction of layout. Such position GO is considered rational.

In case there are some positions GO with identical distance from a gravity center point to band bottom in what the distance from a gravity center point to the left (lower) band will be minimum gets out of them.

By search of gravity center point, GO rotate rather the own system co-ordinate anti-clockwise on 360 degrees with some step rotate. Rational coordinates of a gravity center point and an angle of rotation corresponding to them are defined.

4. METHODS OF SOLVING 2D IRREGULAR-SHAPED NESTING PROBLEM

In considered work for finding sequence of nesting GO following modes of the organization of exterior procedure of optimization have been realized:

• Algorithm «the First Fit with sorted GO by area in descending order» (FF).

• Genetic algorithm (GA).

• Hybrid metaheuristic algorithm (GA+TA), consisting of two stages of optimisation: genetic algorithm and algorithm of a threshold admissibil-ity. At such approach, at the initial stage (application of genetic algorithm), the majority of admissible layout is enveloped that, certainly, involves the positive moment. Then to each of "the good" solutions received on the previous step, the algorithm of a threshold admissibility is applied.

4.1. GENETIC ALGORITHM (GA)

The genetic algorithm differs that it does not use constructive (purposeful) operations in the process of finding of solutions. Genetic algorithm operates with set of random solutions which is called population. The genetic algorithm bears the collective beginning, there is the majority of admissible area of solutions , that allows to find the solutions near to the optimum is considered.

For adaptation GA on our task it is necessary:

1. To select a population of properties of the plant characterized in interior parameters and influencing its utility, i.e. to select set of operated parameters.

X = (X1, X2 Xn ) .

To present a vector X to the chromosome form.

As the method of consecutive single layout is chosen, as such set (chromosome) there can be a priority list (PL) GO, defining order of the layout, where Xi - GO, characterised by the identifier (by ordinal number in the initial entering list), geometrical parameters (coordinates in local system and a system concerning strip layout) and orientation.

2. To formulate a quantitative estimation of utility of variants of object (chromosome) — a utility function F . As such function minimisation of occupied part LS is chosen.

3. To make the mathematical model of the object representing algorithm of an evaluation F for the set vector X . As such model the model NFP of the dense layout of polygons in LS is chosen.

4. To choose algorithms of operators in GA.

- A choice of parents for crossing.

This operator imitates natural selection. As parents the next chromosome of population and the chromosome randomly chosen from current population which are distinct from first get out sequentially.

- A choice of an operator of a crossover.

The crossover consists in transmission parts of genes from parents to children. It is chosen two-point PMX (Partially Matched Crossover) crossover. Chromosomes of parents are broken off in two

positions identical to both parents, rupture places are generated randomly. Crossover PMX is adopted specially for tasks at which in a chromosome there should be all possible genes (GO), and only once. At an interchanging parts of genes of parents if in a chromosome - child the gene of one of parents meets repeatedly it is substituted with the interfaced gene of other parent.

- A choice of an operator of a mutation.

The operator of a mutation of a chromosome-descendant is fulfilled with the set probability. To some probability there is an interchanging of ordinal values of following GO in the priority list, chosen in a random way and rotate chosen GO on the set angle. Thanks to mutations the area of genetic search extends.

- A choice of an operator of selection.

After each iteration population of children is formed, the new generation joins the best chromosomes from parental population and population of children, that the principle elitism is used.

4.2. ALGORITHM OF A THRESHOLD ADMISSIBILITY

The algorithm "Threshold Accepting» TA is method modification «Simulated Annealing» and bears the individual beginning.

Method TA has that advantage before a method «Simulated Annealing» that it depends only on one parameter - particular threshold (T).

Irregular-shaped nesting problem using hodo-graph-oriented adaptation of this method is considered in [3].

As criterion of the termination and criterion of an equilibrium state we will accept an amount iterations as parameters of exterior optimization.

The threshold modification happens is multiplicative:

T = T

1 new 1 current ^ 5

where a - factor of lowering of a threshold (it is set in a range from 0 to 1).

In our case the algorithm of TA is applied to each chromosome (PL) the best population, received as a result of work GA. The next solution is formed by rotate randomly chosen GO on the set angle.

5. PARALLELIZATION IN THE PROGRAM

The multi-core processor allows to multi-sequencing part of operations in task.

Operations of cycle on population size, performed in parallel in realization of genetic algorithm. Library TPL (Task Parallel Library) parallelizing in.NET Framework is used. Parallelism of the

data is supported by means of method For (), defined in class Parallel.

For example, parallelization ensures reduction of computational time in 4 times , if size of population N = 30 and number iterations 10 at layout 17 non- convex geometric objects.

6. COMPUTATIONAL RESULTS

For an estimation of quality of the received solutions the factor of layout Kp which is defined by the ratio of the sum of areas of all GO, placed in LS to area of the rectangle limited to a width and length (height) of area of the layout is used.

P2 P]

P1 ^ i PS

AUf

P5 P7

P8

Fig. 3

b

Fig. 4. Best solutions GA+TA: a - example 1, b - example 2

a

For estimation of efficiency of the software realizing considered algorithms, the test data using 13 GO, 1 convex and 12 non-convex (Fig. 3) has been used.

Example 1. Input list of following GO: P1, P2, P3, P4, P8, P9, P10, P11, P13 on 1 unit; P5 on 7 units; P6 on 8 units; P7 on 2 units; P12 on 10 units. In total: 36 GO. The strip layout has a width 20.

Example 2. Input list of following GO: P1, P2, P4, P7, P8, P9, P10, P11, P12, P13 on 1 unit; P3 on 5 units; P6 on 15 units; P5 on 4 units. In total: 34 GO. The strip layout has a width 25.

The best solution for examples 1 and 2 is received by the algorithm at use of the hybrid scheme (GA+TA) - genetic algorithm + algorithm of a threshold accepting. The best solutions are presented in Fig. 4.

REFERENCES

1. Мухачева Э. А., Верхотуров М. А., Мартынов В. В.

Модели и методы расчета раскроя-упаковки геометрических объектов. Уфа: УГАТУ, 1998. 199 с. [ E. A. Mukhacheva, M. A. Verkhoturov, V. V. Martynov, Models and methods of calculation of raskroja-packing of geometrical plants, (in Russian). Ufa: USATU, 1998. ]

2. Верхотурова Г. Н. О способах моделирования условий взаимного непересечения трехмерных геометрических объектов // Принятие решений в условиях неопределенности: межвуз. сб. Уфа: УГАТУ, 1996. С. 41-49. [ G. N. Verkhoturova, "About modes of modelling of conditions not overlap three-dimensional geometrical plants," (in Russian), in Decision making in the conditions of uncertainty: the Interuniversity collection, p. 41-49. Ufa: USATU, 1996. ]

3. Burke E. K., Hellier R. S. R. et al. Complete and Robust No-Fit Polygon Generation for The Irregular Stock Cutting Problem. Jubilee Campus, Nottingham NG8 1BB, UK: University of Nottingham, School of Computer Science and IT. [ E. K. Burke, R. S. R. Hellier, et al., Complete and Robust No-Fit Polygon Generation for The Irregular Stock Cutting Problem. . Jubilee Campus, Nottingham NG8 1BB, UK: University of Nottingham, School of Computer Science and IT. ]

4. Dean H. T., Tu Y., Raffensperger J. F. An improved method for calculating the no-fit polygon // Computers and Operations Research, 33:1521-1539, 2006. [ H. T. Dean, Y. Tu, J. F. Raffensperger, "An improved method for calculating the no-fit polygon," Computers and Operations Research, 33:1521-1539, 2006. ]

ABOUT AUTHORS

VERKHOTUROVA, Galina Nikolayevna, assistant professor, Dept. of Automated Systems. Dipl. Engineer system analyst (UAI, 1983). Cand. of Tech. Sci. (UGATU, 1998). LUKJANOV, Maksim Viktorovich, Dipl. mathematician programmer (UGATU, 2014).

МЕТАДАННЫЕ

Название: О решении задачи нерегулярного размещения геометрических объектов на плоском материале на основе наклонных диаграмм.

Авторы: Г. Н. Верхотурова, М. В. Лукьянов.

Организация: ФГБОУ ВПО «Уфимский государственный авиационный технический университет», Россия.

Email: [email protected], [email protected]

Язык: английский.

Источник: Вестник УГАТУ. 2014. Т. 18, № 5 (66). С. 42-47. ISSN 2225-2789 (Online), ISSN 1992-6502 (Print).

Аннотация: Среди множества задач, возникающих на практике, важное место занимают задачи, связанные с нерегулярным размещением двумерных геометрических объектов, например, раскрой листов на плоские заготовки, компоновка двумерных объектов в заданной области размещения. Все они являются задачами оптимизационного геометрического моделирования и, с точки зрения комбинаторной сложности, принадлежат к классу WP-трудных. Дополнительную геометрическую сложность при их решении составляет проблема соблюдения условий взаимного непересечения размещаемых объектов между собой и с границами зоны размещения. В работе рассматривается задача нерегулярного плотного размещения невыпуклых геометрических объектов, аппроксимированных многоугольниками, на полубесконечной полосе минимальной длины. Для её решения предложен внутренний алгоритм с применением годографа функции плотного размещения, основанный на анализе возможных точек занесения объекта в область упаковки и алгоритм внешней оптимизации с использованием гибридной метаэвристики.

Ключевые слова: нерегулярное размещение геометрических объектов; годограф функции плотного размещения; условия взаимного непересечения двумерных геометрических объектов.

Об авторах:

ВЕРХОТУРОВА Галина Николаевна, доц. каф. выч. мат. и кибернетики УГАТУ. Дипл. инж.-с/техн. (УАИ, 1983). Канд. техн. наук по сист. автоматиз. проектир. Иссл. в обл. оптим. геометрического проектирования.

ЛУКЬЯНОВ Максим Викторович, Дипл. математик-программист (УГАТУ, 2014).

i Надоели баннеры? Вы всегда можете отключить рекламу.