Minimizing geometric tests in CAAP-systems

The article is devoted to modeling geometric obstacles in the assembly of complex products. The problem of minimizing the number of geometric tests is considered. Two assertions about geometric inheritance in the assembly of technical systems are introduced. Based on these assertions, a game-theoretic model has been developed. The model made it possible to minimize the number of geometric tests. It is a game of decision-maker and nature by coloring the vertices of an ordered set in two colors. A classification of ordered sets is proposed. The computational experiment on coloring of ordered sets of each class using different criteria is carried out. The experiment made it possible to determine the optimal criteria for the coloring ordered sets of each class. The use of these criteria allows minimizing the labor intensity of geometric analysis in computer-aided assembly planning.


Introduction
When designing the assembly process of a complex technical system, it is necessary to take into account the geometric obstacles. In publications on computer-aided assembly planning (CAAP), this essential condition for the existence of an assembly operation and an assembly process is called geometric solvability [1]. To solve this problem various approaches based on collision detection methods are proposed [2]- [5]. In this paradigm, mobile and stationary parts of the scene are set. Their shape is approximated using simple geometric shapes: spheres, parallelepipeds, convex hulls, polytopes, and so on. A trajectory of the mobile object is specified. In the process of movement, the intersection of the mobile and stationary shells is checked [2].
This approach is widely used in computer games, CAD-systems and geometric modeling systems. Experience has shown that it is ineffective for the analysis of obstacles in the assembly of complex products. Parts of machines and mechanical devices can have a rather complex shape. The approximation does not allow obtaining the high accuracy often required during assembly. The methods of collision detection can be used as auxiliary means. They are often used to model assembly processes in virtual reality systems [6]- [8].
The application of motion planning methods in CAAP is discussed in the papers [9]- [13]. In these articles, synthesis of a possible assembly plan is set as the problem of holonomic motion planning. The mounting part is represented by the point in the configuration space of assembled product. Search for a possible path of the point in multidimensional space is carried out, mainly, by means of probabilistic methods (Probabilistic roadmap method, PRM and Rapidly-exploring random trees, RRT). The methods of this group do not take into account the structural constraints (connections and mating) of assembly operations. All project alternatives are considered acceptable. In general, the number of geometric tests is (n-1)!, where n is the number of parts. Methods for analyzing geometric obstacles based on projections of parts are described in [14] and [15]. If the projections do not intersect, the parts do not create a mutual obstacle in the direction that is perpendicular to the selected projection plane. Otherwise, you must select another plane and repeat this geometric test. This approach takes into account only the straight-line movements of the assembly elements and the position of the projection planes must be selected by the expert. The most severe restrictions on the movement of a part are imposed on the parts that are in close proximity to it. Various methods of modeling local geometric obstacles are offered in articles [16]- [19]. In this group it is necessary to note the method of db-graphs. It was offered in [18]. This method is used in several CAAP-systems, for example STAAT. The methods of local obstacle analysis give only necessary conditions of geometric solvability. They make it possible to identify obviously irrelevant design alternatives.
In several CAAP methods, the function of the geometrical solver is performed by an expert [21]- [24]. In the classic article [21] a method based on ordering the mechanical connections of a product is proposed. This information is provided by an expert, who should take into account the geometric constraints on the movement of parts. Various variants of rational organization of the expertise are described in papers [22], [23]. In article [24] the expert should choose a direction of disassembly and determine the geometric obstacles in the given direction of disassembly. Any procedures of geometrical solvability based on expertise are characterized by high labor intensity and low reliability.
The considered methods of geometric obstacles analysis have two main disadvantages: 1.
The mechanical structure of a product (connections and matings) imposes strict constraints on the possible assembly sequences. In the models considered above, these limitations are not taken into account.
2. The problem of minimization of geometric tests is not considered.
Let us consider a model free of the specified lacks.

Game-theoretic model of geometric solvability. Problem statement
We introduce the necessary definitions and notations. We denote by 1 {} n ii Xx   the set of parts of a product X. Definition 1. A connected subset of parts YX  is called an s-set if Y can be assembled independently.
The author's works [25], [26] propose a constructive way of generating s-sets. S-sets serve as a mathematical description of the connected and geometrically defined (coordinated) sets of parts, which can be assembled independently.
The g-situation is a mathematical description of the product fragment for which a geometric test gives interpreted results.
Yx The situation is called unresolved, otherwise. In fact, if A has geometric obstacles that prohibit movement of the part x, then s-set B contains these obstacles. It means that there is no movement of part x which implements s-set Denote GS(x) -the set of all g-situations in a product X related to the mounting of a part x. We introduce a non-strict order on GS(x) by the following relation ( , ) ( , ) .  We represent the set   ( ), GS x  using the Hasse diagram. The vertices of the diagram representing the unresolved g-situations will be shown in black. The vertices corresponding to the resolved gsituations will be shown in white. We denote this game by Г(GS). In meaningful terms, the vertex is a test configuration; the color of the vertex is the result of testing this configuration for geometric solvability. Obviously, a rational strategy in the game Г(GS) will minimize the number of necessary geometric tests.

The game Г(GS) as a decision-making problem
The optimal game solution for arbitrary ordered sets seems to be a very difficult, hardly solvable, problem. We will consider the game Г(GS) as a decision-making problem under conditions of uncertainty. Let the decision-maker have no a priori information about the possible colors of the vertices of an ordered set GS. Therefore, at every step of the game, we consider the answers of nature to be equally probable. We represent the game in the form of a payment matrix (table 1).
x 2n In this table X stands for the decision-maker (the first player), Y represents nature.

Classification of ordered sets
To find a rational strategy in game Г(GS) we divide the class of ordered sets into 13 subclasses, whose representatives are fundamentally different in their structural characteristics. Figure 3 shows the classification of ordered sets (OS).  The height h(P) of an ordered set P is the length of the maximum chain in P [27]. Definition 5. The width w(P) of an ordered set P is the maximum cardinality of an antichain in P [27]. Definition 6. An ordered set is said to be dense if in the Hasse diagram of this set, the number of edges r is much greater than the number of vertices n, that is, r >> n. If r << n, then the ordered set is sparse.
Definition 7. An ordered set P is called high if h(P) >> w(P). The ordered set P is called wide if h(P) << w(P). The ordered set P is called balanced if ( ) ( ) h P w P  . Definition 8. An ordered set is called pseudo-lattice if it has the greatest and least elements. Definition 9. A connected ordered set P is called a pseudo-chain if most of the vertices of this set belong to the maximal chain, that is ( ) | | h P P  . Examples of pseudo-chains are shown in figure 4 (d).

Decision-making criteria
In each of the subclasses of the main criteria for decision-making under uncertainty were tested [28].
The Wald criterion (WLD). For the payment matrix of a general form it is given by the expression  is a priori confidence coefficient.

Computational experiment
We have developed special software to implement the computational experiment. The program creates an ordered set of random structure in a given subclass ( figure 4) and implements a game session on the coloring of the created ordered set in two colors using the specified criterion. For this purpose, the best unpainted vertex is selected. If there are several vertices with the same criterion value, any of them is selected with equal probability. With the probability 1 2 this vertex is assigned a color: white or black.
After the choice of a color the program paints unpainted vertices of the ordered set by the rules of game Г(GS). The given sequence of actions repeats until all vertices of the ordered set are painted. One coloring session is performed with the help of one criterion. The program remembers the number of selected vertices. The computational experiment was performed on a computer system with the following characteristics: Windows 7, CPU Core i5 with a clock speed of 2700 MHz, RAM 16GB and hard disk 1TB.
Tests were performed for the following criteria: WLD, BL, SVG, MP, HL and HW. Three values of the reliability coefficient were selected for HL 1

 
The computational experiment was performed for all criteria in each of the subclasses of . For each subclass in the category of sparse ordered sets is made 100,000 sessions of game Г(GS). In the category of dense ordered sets -60,000. This is due to the fact that the coloring dense ordered sets required large computational resources. 200,000 tests were performed for pseudo chains.
The program remembers the number of vertices (N i ) that the criterion selected to color the entire ordered set in each test. After the tests were completed, these numbers were averaged The results for the subclass of dense balanced ordered sets are shown in table 2 and figure 5. H t is the height of the ordered set. The best results correspond to lower Navr values.  Figure 5. The results of the computational experiment in the subclass of dense balanced ordered sets.
The computational experiment has shown that in all subclasses of ordered sets, except for pseudo chains, the best results are given by the criteria of Hurwitz and Savage criteria were the most ineffective. The difference between the best and worst results grows as a low-degree polynom depending on the height of the ordered set. For pseudo chains, the results of all the criteria were approximately equal.

Conclusion
The article deals with the modeling of geometric obstacles in the assembly of complex products. The analysis of modern publications on CAAP is performed. It is shown that the problem of minimizing the number of geometric tests is not discussed in these papers. A game model of geometric solvability is proposed. It is a non-antagonistic game with nature to color the vertices of an ordered set. A rational strategy in this game makes it possible to minimize the number of necessary geometric tests in the computer aided design of assembly processes. The game is set as a problem of decision-making in conditions of uncertainty. The computational experiment was performed to determine the best coloring criterion for ordered sets. The special program has been developed that creates a random ordered set and colors it using a given criterion. The experiment showed that the best results are given by Hurwitz and Bayes-Laplace criteria. Using these criteria can significantly reduce the complexity of geometric modeling in CAAP systems.