A STUDY OF ELLIPSE PACKING IN THE HIGH-DIMENSIONALITY PROBLEMS

The problems of optimum ellipse packing belong to the class of NP-hard problems. The issues of development of efficient algorithms based on application of local and global optimization methods, construction of adequate mathematical models based on the analytical description of the ellipse interrelations taking into account their continuous translations and rotations are of vital importance. In this article, the problem of packing of sets of ellipses in a given region taking into account conditions of nonintersection and technological restraints which are concretized in the conditions of the applied problem is formulated. The model of packing of a set of ellipses in a rectangle of minimum dimensions is constructed. Continuous ellipse rotations and translations are allowed, the possibility of availability of minimum admissible distances between them is assumed. New quasi-phi-functions are constructed for modeling of the relations of ellipse nonintersection and to define belonging of an ellipse to the container. The algorithm of search for locally optimal solutions is modified. It consists of two stages: generation of the regions of feasibility which contain the starting point and local optimization in the constructed region of feasibility. Only the algorithm step concerning construction of quasi-phi-functions is subjected to modification. It is necessary to notice that the algorithm have shown its efficiency when the quantity of ellipses does not exceed the value of 400. The model of the individual-and-flow movement of individuals approximated by ellipses with specification of technological restraints is constructed. The method of local optimization is given. Examples of computer modeling of the problems assigned in the work are given.


Introduction
The cutting and packing problems, also known as the problems of optimum allocation [1,2], are the study subject in computational geometry and methods of their solution represent the new trend in the operations research theory.This class of problems has a wide range of scientific and practical applications.The class of problems connected with packing of given ellipse sets into a rectangular region of minimum dimensions is considered.Such problems arise in powder metallurgy when movement of loose substances is modeled and in logistics when modeling optimum packs of cylindrical objects with elliptic bases.

Literature review and problem statement
One of today's issues is organization of a managed people evacuation from buildings in the required time calculated by the building space and planning.A necessity of calculation of people flow parameters has produced a particular interest in such geographic information systems as the crowd simulators, which enable measurement, optimization and visualization of people flows in the course of their evacuation.Analysis results [3] show lack of a model of individual-and-flow people movement adequate to the real flows.The interest in this model is based on the need of close attention to evacuation of people with limited mobile abilities amidst mixed-structure flows within public buildings belonging to a rather extensive nomenclature of functional flammability risk classes.When modeling movement of people approximated by a set of ellipses, a problem of their close packing at varied local densities arises.Such difference in crowd densities arises due to the difference in the permissible minimum distances between the ellipses, which have to be taken into account.Observance of minimum distances is necessitated by consideration of a number of limitations of which people movement at different speeds can be specially distinguished as well as consideration of people maneuverability, comfort etc.
The problems of optimum ellipse packing belong to the NP-difficult problem class.As a rule, heuristic algorithms are used to solve the problems of such class.Therefore, an issue arises in cases of development of efficient algorithms based on the application of methods of local optimization of a multitude of ellipses.These methods are based on the analytical description of the relations between ellipses with consideration of their continuous translations and rotations.
In view of complexity of mathematical modeling of the ellipse relations, circles were considered for a long time as simplified mathematical models.However, the obtained models differed significantly from real data.
A normalized phi-function describing positional relationship between a nonoriented ellipse and a half-plane was found in an explicit form in paper [4].
Mathematical model for packing two ellipses was studied in paper [6].An efficient numerical algorithm for establishment of the fact of ellipse intersection was given in article [7] where effect of ellipse dimensions on packing density was studied as well.
Authors of study [8] consider the problem of circle packing into an ellipse.This problem is formulated as a nonlinear programming problem [9].The multistart method is used to find approximations to the global extremum of the problem.
Overview of publications [6,7] on this subject makes it possible to draw a conclusion that the method of solution of the problem of packing true ellipses (with no approximations) allowing for rotations with the use of modern NLP solvers available in GAMS was only stated in the recently published paper [10].This paper provides for a rather complete overview of literature on the problems of ellipse packing.For analytical description of conditions of nonoriented ellipse nonintersection, the work applies a concept of a "dividing straight line".This idea was proposed in article [11] and then used for modeling relations between circles and convex polygons.A global solution for a small (N≤4) number of ellipses was obtained in work [10], however, authors did not manage to get a feasible solution at N>14.Thereupon, authors propose a heuristic polylithic algorithm for placement of a larger (up to 100) number of ellipses in a rectangular region of a fixed width and variable length.
The problem of optimum ellipse packing permitting continuous ellipse rotations was considered in [12].For analytical description of the main placement restraints, radical-free quasi-phi-functions and pseudo-normalized quasi-phi-functions were used [13].In these papers, a mathematical model in the form of a nonlinear programming problem was constructed.Efficient algorithms for local extrema search were proposed.The approach stated in articles [12,13] makes it possible to represent the problem of optimum ellipse packing taking into account admissible distances in the form of a nonlinear programming problem while getting locally optimal solutions for ≤ N 120.Authors of study [13] have managed to improve results in respect of time and value of the target function for many test examples given in article [10].Quasi-phi-functions for 2D and 3D objects were introduced in article [14] and paper [15] considered issues of packing convex objects based on the quasi-phi-functions.
In the fundamental investigation [16], issues of packing both ellipses and ellipsoids in various convex regions were considered.When modeling conditions of nonintersection of objects, two approaches were studied: the first one was based on the idea of a dividing straight line (plane) [10], and the second was based on the use of affine space transformations R n , n=2,3.When using the second approach, affine space transformations result in a transformation of one of the ellipses (ellipsoids) into a circle (sphere), and the other one into a certain ellipse (ellipsoid).Followed the aforementioned transformations, the idea of the method developed in [8] for modeling geometrical relations of a circle and an ellipse was used to formalize conditions of nonintersection of the obtained objects.Generation of "good" starting points and application of the Algencan solver [17] in solution of nonlinear programming problems allowed the authors of paper [16] to improve the majority of results of study [10].
However, analytical notation of conditions of nonintersection of each pair of ellipses in the listed works is quite cumbersome and/or is made by means of a system of nonlinear inequalities.With the growth in quantity of the ellipses to be placed, dimensionality and time of the problem solution increase considerably which makes inapplicable approaches stated above.

The aim and tasks of the study
The purpose of present work consists in the development of effective algorithms for construction of new functions from the class of quasi-phi-functions and solution of the problem on optimum packing of a large number of ellipses for their use in the solution of actual applied problems.
Main objectives of the research are as follows: -construction of a new function from the class of quasi-phi-functions; -development of an algorithm of searching for a locally optimal solution of the problem of ellipse packing in a rectangle of minimum dimensions with use of the new quasi-phi-function; -development of a mathematical model and an algorithm of the individual-and-flow movement of people who are approximated by ellipses.

Problem statement and solution. Development of efficient means to simulate conditions of nonintersection of ellipses and algorithms for their locally close packing
This paper's object of research is the packing problem in the following statement.Specify region Ω and a set of ellipses E i , iÎ{1, 2, …, N)=I N to be placed in region Ω.Assume that the coordinate system of region Ω is fixed and coincides with the global coordinate system.Each ellipse E i is specified by а major semiaxis a i and a minor semiaxis b i.The ellipse E i center coincides with the origin of its own coordinate system.Position of the ellipse E i is characterized by the vector of variable object allocation parameters t i =(x i , y i , q i ) where (x i , y i ) is the translation vector, q i is the angle of rotation.Designate E i (t i ) for the ellipse E i rotated by angle q i and translated by vector (x i , y i ).
Restraints for minimal admissible distances r ij can be specified between ellipses E i and E j , and restraints for minimal admissible distances r i can be specified between ellipse E i and the container boundary Ω.
The problem of ellipse packing.Place a set of ellipses E i (t i ), iÎJ N in the region Ω taking into account restraints for conditions of nonintersection and conditions of placement with observance of specified minimal admissible distances and taking into account a number of technological restraints in order that the quality criterion would have taken on an extreme value.
Similar to papers [13,14], this study offers utilization of a function from the class of quasi-phi-functions as an efficient means of mathematical modeling of relations of nonintersection of a pair of ellipses taking into account admissible distances.
According to the definition, the name of quasi-phi-function Ф ¢EiEj (t i , t j , t ij ) for objects E i (t i ) and E j (t j ) is given to a total nondiscontinuous for all variables function for which function is phi-function of objects E i (t i ) and E j (t j ).Here t ij denotes the vector of auxiliary variables belonging to some subset U of space R m (as it will be shown below, in this case m=1 and U coincides with R 1 ).Below, the following important characteristic of the quasi-phi-function is used: if Ф ¢EiEj (t i , t j , t ij )≥0 is performed for a certain t ij , then . Article [18] proved the statement which has served as the basis for obtaining a quasi-phi-function for ellipses E i (t i ) and E j (t j ).
Statement.If convex objects are not intersected, then there is such straight line passing through the origin of coordinates that the object projections to this straight line do not intersect.
Let ellipses E i (t i ) and E j (t j ) have no common internal points (Fig. 1).Projections of sets E i (t i ) and E j (t j ) to any straight line perpendicular to L ij (the dividing straight line) do not intersect, i. e. they have no common internal points in R 1 .Denote with L ij ┴ a straight line perpendicular to L ij and passing through the coordinate origin; denote with t ij the angle between the straight line L ij ┴ and the axis OX.Turn the straight line L ij ┴ together with projections of ellipses E ij and E ji (with their centers at points t ij and t ji respectively) around the point O by angle (-t ij ) and obtain projections of ellipses E ij ′ and E ji ′ with their centers at points x ij ′ and x ji ′.
Thus, the condition of nonintersection of ellipses E i (t i ) and E j (t j ) is equivalent to the following condition: Taking into account the aforesaid, the conditions of nonintersection of ellipses can be described by inequality: where the quasi-phi-function Ф ¢EiEj can be written down as or, taking into account (1)-( 5): Corollary 1.If the i-th object is a circle С i (t i ) of radius R i and the j-th object is an ellipse E j (t j ), then the quasi-phi-function Ф ¢CiEj can be written down as Corollary 2. If the i-th and the j-th objects are circles С i (t i ) and C j (t j ) of radii R i , R j respectively, then the quasi-phi-function Ф ¢CiCj can be written down as It should be noted that quasi-phi-function ( 6) is normalized, i. e.: is the normalized phi-function of objects E i (t i ) and E j (t j ) and by its value coincides with the distance r ij between objects E i (t i ) and E j (t j ), i. e.: The degree of normalization of quasi-phi-function ( 6) means that accomplishment of conditions of observance of minimum admissible distances between ellipses E i (t i ) and E j (t j ) is ensured by satisfying the inequality: To formalize conditions of belonging of the ellipse E i (t i ) to region Ω, use the normalized phi-function Ф EiΩ* (t i ) describing conditions of nonintersection of objects E i (t i ) and Ω * =R 2 \int Ω.It is proposed to construct function Ф EiΩ* (t i ) based on analytical description of the conditions of belonging of projections E i (t i ) on the axis of the global coordinate system to region Ω (Fig. 2).
For example, the ellipse E i (t i ) belongs to a rectangular region with dimensions L×W if the phi-function is not negative:

Fig. 2. Formalization of conditions of ellipse placement in the region
Thus, taking into account quasi-phi-functions, mathematical model for the problem of packing ellipses into a rectangular container Ω={(x,y)Î R 2 :0≤x≤L, 0≤y≤W} of a minimal area can be formulated as follows: are the quasi-phi-functions of type ( 6), (7).
It should be noted that though radicals occur in the inequalities describing the feasible region Q, radicands are strictly positive over the entire definitional domain.
The problem of conditional optimization (8), ( 9) is an NP-hard problem in nonlinear programming.The feasible region Q is of a complex structure: generally speaking, this is an unconnected set, and each component of connectivity of Q is multiply connected, the boundary of Q consists of nonlinear surfaces with ravines.Matrix of the system of inequalities specifying Q is strongly sparse and has a block structure.
The problem (8), ( 9) represents an accurate formulation of the ellipse packing problem.The constructed model de-scribes a nonconvex and continuous problem of nonlinear programming.The domain of definition Q contains all optimal solutions.It is possible, at least theoretically, to use global solvers of nonlinear programming problems to solve such problem and obtain a solution which is an optimum packing.
However, in practice models contain a large number of variables and inequalities.When the problem of the type (8), ( 9) is being solved, the search for a locally optimal solution becomes a hardly realized task for NLP solvers at a large (>20) number of ellipses.For an example, authors of work [10] did not manage to obtain a feasible problem solution when using BARON, LindoGlobal and GloMIQO solvers at N>14.An approach has been developed to search for a "rather good" locally optimal ellipse package in a reasonable computation time [14,15].This approach enables a material increase in probability of finding the local extremum of the problem at a simultaneously considerable reduction of computational resource consumption.
According to the technique developed in [12,13,19], the strategy of solution of problem ( 8), ( 9) consists of the following steps: Step 1.A set of starting points from the feasible region Q for problems (8), ( 9) is generated by modifying SPA algorithm from [12].In this way, just the algorithm step related to the search for admissible values of additional variables for the quasi-phi-function is changed.
Step 2. Search for the local minimum of the target function F(t) from the problem (8), ( 9) is performed, starting from the points obtained at step 1 with the use of the LOF-RT procedure for local optimization described in [12] with transformation of the feasible region.
In the problem under consideration, O(N 2 ) pairs of ellipses are analyzed.The proposed approach makes it possible to operate with O(N) pairs at each stage because only conditions of nonintersection with the closest neighbors are checked for each ellipse.
Step 3. As an approach to optimal solution of the problem ( 8), ( 9), the best local solution is chosen from the options obtained at step 2.
The LOFRT procedure is an important part of the approach to the problem solution proposed in [12].It allows shortening of the computational resource consumption.Shortening the computational resource consumption is realized by reducing the problem ( 8), ( 9) to a sequence of subproblems of a lower dimensionality and with a smaller number of restraints.
A number of computing experiments have been conducted.For example, for the test example TC50 which was solved for the first time in [10], application of the new quasi-phi-function has led to reduction (~2.5 times) of an average time (301.25 s) spent for getting a single local extremum.At the same time, an all-time high value (152,602) of the target function was obtained in the course of testing.
For the example with 300 objects (six data sets from the problem TC50), the average time of search for one local extremum was ~4 hours.For the example with 400 objects (eight data sets from the problem TC50), one local extremum was found during testing.Solution time was 25.5 hours.The achieved result is given in Fig. 3.The indirect evidence of reliability of the obtained results consists in that the packing density for the problems with 300 and 400 objects was ~1.5 percent higher than the all-time high packing density for the problem TC50.
Computing experiments were carried out with the use of AMD Athlon 64x2 Dual 5200+.Solution of subproblems of nonlinear programming is performed by means of IPOPT program developed based on the interior point method described in [20].
Thus, the proposed strategy of solution of the problem ( 8), ( 9) allows to obtain locally optimal solutions at N≤400.For the problems with a large number of ellipses, solution is possible but at high rates of computational resource consumption.
It should be pointed out that the LOFRT procedure represents an implementation of the compaction-algorithm and can be used directly in improvement of approximate solutions obtained by other authors and with other methods applied.

Fig. 3. Local extremum of the problem of packing 400 ellipses
Consider the problem of modeling of individual-and-flow movement of the people crowd.Restraints for conditions of nonintersection of individuals and for the condition of their placement in the region with an account for admissible minimum distances are the main restraints.Minimum distances are defined proceeding from technological restraints such as account for maneuverability, comfort of individuals etc.Let the source data of the paths of movement of individuals be set in the form shown in Fig. 4.
The path is divided into the regions numbered, respectively, 1, 2,…, m (m=5 for this example) and restrained with dividers a 1 ,a 2 ,…, a m+1 .Each region is characterized by the same law of formation of the main movement direction and by the type of movement of the people who entered into it.Two types of movement are considered: straight movement (regions 1-3, 5) and movement along the circular arch (region 4).To determine the main direction of movement, designate the m-th region by Ω m .Divider a m provides translation for the regions with a rectilinear type of movement or it moves with rotation for the regions with a circular type of movement so that the analyzed points were in its possession.In the event of an even change of the corridor width in the region, the length of the divider piece changes accordingly.
Consider regions with a rectilinear movement.In these regions, movement from the analyzed point is presented by a vector connecting this point with the point at the corresponding divider (taking into account coefficient of homothety).Determination of the basic direction of movement for this case is illustrated in Fig. 4 at the second region.To determine the main direction of movement in the region Ω 4 , the abovementioned divider points are connected by circular arcs.
Without losing the generality of reasoning, suppose that each individual is presented in a form of ellipse the major semiaxis of which is perpendicular to the direction of movement.The main direction and type of movement are defined for each of individuals at each their step (with a set time interval Δt, for example, 1 sec.).After determination of above listed characteristics, small individual changes are made (speed, direction, acceleration, etc.).The angle of ellipse rotation is defined between the perpendicular to the major semiaxis and the vector of main movement direction.
Consider mathematical model of the individual-and-flow movement of people by the use of an example of the evacuation problem.
Let the region of evacuation has no circular sections (for simplification of calculations).Assume that an N k person with location parameters is at the k-th iteration in the evacuation region Ω m .

= q =
ki ki ki ki k u (x ,y , ), i 1,2, ..., N , where (x ki , y ki ) are location coordinates of the local coordinate system origin (the current point), and q ki is the angle of rotation of the i-th ellipse E i with dimensions of its semiaxes (a i , b i ) serving as a model of the i-th person.Also, characteristics of speed v i (in meters per second) and maneuverability m i , m i <1 (in meters) are attributed to the object E i .Vector of the main movement direction (x ,y , ,x ,y , ,t ) r 0, 0 : (x ,y , ) r 0, are the quasi-phi-functions of the type ( 6), (7), Δt i is relative step by the time of movement of the i-th person, ∧ ∧ Δ = q − q q ki ki ki ki , is the ellipse rotation angle at the point: By its construction method, the feasible region W k can be presented as a union h (h is some large number depending on the quantity and type of the objects) of subregions of the following form: where W k is described by a system of inequalities with smooth functions in the left part [19].
Representation of the feasible region as a union of subregions (12) allows us to reduce the search for the local problem extremum (10), (11) to the solution of a sequence of problems of nonlinear programming by means of the following algorithm.
Step 2. Take the starting point u l coordinates and generate a subregion W ks(l) from ( 12) containing this point.If all such regions were studied earlier, the process of solution is finished.
Step 3. Starting from point u l , find the local minimum F(u) in the region W ks(l) .Designate the obtained point of the local extremum by u l+1 .
Step 4. Take l=l+1 and pass to step 2. As the possible movements of the ellipses are defined by the average person movement speed in a second, they are comparable with the ellipse dimensions.Therefore, the number of subregions which is sufficient to be studied is many orders less than the theoretical value of quantity h.It is also should be considered that it is the problem of modeling of the flow movement that is the original problem but not the problem of obtaining of the local extremum accurate within 10 -8 .Practical studies have shown that in solving the problem two or three iterations of the above algorithm will be quite enough.
Computer modeling of the individual-and-flow movement has been performed (Fig. 5).At the initial period, random placement of individuals (ellipses) in the corridor and behind the doors of the adjacent rooms is performed.Exits from the rooms are shown by breakage in the continuous lines representing the corridor border and rectangles designate regions prohibited for movement.Six fragments of the movement process are shown in Fig. 5.

Fig. 5. Computer simulation of the individual-and-flow movement
It should be noted that the individual characteristics are generated using the normal distribution law.As it is apparent from the figure, in the process of individuals movement, different minimum distances are maintained as defined both proceeding from the different movement speeds and by accounting maneuverability and comfort of individuals.

Discussion of the results obtained in the study of the problem of locally close ellipse packing and the issues of its use in the solution of actual applied problems
The new quasi-phi-function, which enabled the formalization of conditions of nonintersection of ellipses and the conditions of their placement in the region, is proposed in present work.Based on the new function, mathematical model of ellipse packing in a rectangle of the minimum dimensions was constructed.The algorithm of search for locally close ellipse packing was modified.The modification consists in the use of the proposed new function.As the algorithm of construction of the proposed quasi-phi-function requires small labor input, this property has made it possible to solve the problem of ellipse packing for ellipses of high dimensionality (400 ellipses as shown in Fig. 3).For today, this result is the best result for the class of problems on optimum ellipse packing.
Small labor input of the algorithm of construction of the quasi-phi-function ensured solution of the practical problem of the individual-and-line movement of people who are approximated by ellipses.The solved problem is of actuality for the solution of the issues arising during evacuation of people from buildings.The offered approach makes it possible to model movement of people with limited mobile abilities in the mixed-structure flows in an extensive nomenclature of public buildings belonging to various classes of functional fire risk.
Distinctive feature of this work is that the developed mathematical apparatus for formalization of the ellipse inter-relations can be used for the solution of a number of important practical problems of a rather high dimensionality.The problems of modeling movement of particles in the problems taking place in filtering and powder metallurgy, in packing goods having cylindrical form and elliptic bases and logistics problems, etc. can be taken as examples.

Conclusions
1. New quasi-phi-functions analytically describing conditions of nonintersection of ellipses and their placement conditions in a given region were obtained.The main feature of the new quasi-phi-functions is low labor intensity for their construction, which is vital in solving the problems of high dimensionality.
2. The approach to modeling of ellipse placement in a rectangle of minimum dimensions consisting in the model and the solution method modification was further improved due to the use of the proposed functions.The result of computer modeling for packing 50 ellipses from the example solved for the first time in [10] has enabled not only a 2.5 times shorter average time required for getting one local extremum but also to obtain an all-time high value of the target function.For the example with 400 ellipses, the local extremum was obtained for the first time in the testing process.Thus, the proposed in this work approach to modeling of ellipse packing ensured locally optimal solution of the problems of high dimensionality.
3. Efficiency of the mathematical apparatus developed in the work was demonstrated on the example of solution of the vital practical problem of individual-and-line movement of people who are represented by ellipses.The analysis of numerical experiments has shown that the proposed approach in addition to a higher speed has a number of advantages in comparison with [3]: this is the possibility of modeling of movements taking place in buildings with a complex infrastructure and accountability for size differences between individuals.

Fig. 1 .
Fig. 1.Illustration to the construction of quasi-phi-functtion Φ¢ i j E E