ш
нлты
ЫКРА1НИ L «bjHTÜ» ;
»imieft®
Науковий BicHMK Н/1ТУ УкраУни Scientific Bulletin of UNFU http://nv.nltu.edu.ua
https://doi.org/10.15421/40280328
Article received 20.04.2018 р. Article accepted 26.04.2018 р.
УДК 004.023
ISSN 1994-7836 (print) ISSN 2519-2477 (online)
@ El Correspondence author O. V. Sinkevych [email protected]
O. V. Sinkevych1,1. Ya. Sokolovskyy2
1 Ukrainian National Forestry University, Lviv, Ukraine
2 Ivan Franko National University of Lviv, Lviv, Ukraine
SOFTWARE AND ALGORITHMIC PROVIDED FOR WORK WITH CELLULAR AUTOMATES
In this paper, the system of initial theoretical positions is considered, which is the basis of the research search for variants of cellular automata for the study of thermal and mechanical processes in 3D objects of SolidWorks, through their representation in 2D von Neumann neighborhood of the first order. The execution of this work also involves the creation of initial rules for changing the investigated system, which are necessary for the direct use of cellular automata. As a result of the verification of these rules, it was found that their number may not be enough to address specific tasks in the field of 3D research. Because of this, it was left possible to create new rules for changing the system, or changes already existing. In addition, in the process of performing this work, all the processes of scientific research, as well as the proposed initial provisions have been repeatedly tested, developed and adjusted if necessary. For successful experiments, the 3D model under study was divided into 3D cubes of the same size. The number of these 3D cubes depends on the density of the section that the user specifies manually using the appropriate item of the developed software. In addition, in this paper describes the establishment of the relationship between the faces of created 3D cubes. These dependencies were presented in the form of an appropriate relationship scheme, which is then used in the design and configuration of the corresponding system classes, which are closely related to each word, both logically and functionally. Based on the developed system classes, appropriate software was created, which is the basis of the use of cellular automata in the study of tasks in the field of 3D modeling. In addition, in this paper a graphical representation of the interrelationships between the developed classes was presented. For a better understanding of the mechanism of the class system operation, a sequence diagram was developed. With this diagram, you can see not only how the classes interact with each other but also in what sequence this interaction takes place. In the future, this work involves expanding the capabilities of the software developed, as well as filling it with mathematical functions that would allow it to be used in the study of the mechanical and mechanical processes of various 3D objects.
Keywords: CAD; Von Neumann neighborhood; SolidWorks API.
Introduction. The cellular automata is a discrete model, which is described by a set of a number of cells that forms a periodic lattice. This lattice allows you to determine the state of each of its cells at a specific time, and allows you to determine the state of its neighboring cells, the distance to which does not exceed the permissible limits (Wolfram, 2002; Sokolovskyy & Sinkevych, 2016).
Currently, cellular automata are often used in problems of modeling hydro and gas dynamic, evolutionary, behavioral, or different vibrational probabilistic processes, which in turn caused the comparative ease of implementation, which in turn gives better prospects for their future use. The main direction of the research of cellular automata is the algorithmic solving of individual problems, which in one way or another use a two-dimensional coordinate system (Toffo-li & Margolus, 1991; Sokolovskyy & Sinkevych, 2017).
The result of this work will be the development of the concept of the use of cellular automata for the study of three-dimensional objects, as well as the creation of appropriate software, which will allow the use of this concept in conducting various types of experiments (Sokolovskyy et al., 2017).
Formulation of the problem. At the beginning of this work, we have a 3D model of fixed-sized piles of stakes that were assembled in the SolidWorks.
• This 3D model has the following initial parameters:
• Height, length and width of the stack;
• Number of lumber in the stack;
• The distance between lumber and wood species;
• Dimensions of the pallet and gaskets;
• Temperature and moisture values (not necessarily the same).
In addition to the initial parameters of the loaded 3D model, it is necessary to specify the size of the drying space, which is filled with air mass. These sizes can be specified through the volume or through the values of its height, length and width. It is also necessary to indicate the initial temperature and humidity of the drying space. You also need to specify a mathematical model that will allow you to change these values when changing time. In carrying out this work is necessary to solve a number of problems, including:
• Calculate and determine the number of 3D cubes of the same size that can be diving through the model under investigation using the developed application software and the SolidWorks API;
1нформащя про aBTopiB:
Сшкевич Олексш Вячеславович, мапстр з комп'ютерних наук, здобувач, асистент кафедри IT. Email: [email protected] Соколовський 1ван Ярославович, мапстрант. Email: [email protected]
Цитування за ДСТУ: Sinkevych O. V., Sokolovskyy I. Ya. Software and Algorithmic Provided for Work With Cellular Automates.
Науковий вкник НЛТУ УкраТни. 2018, т. 28, № 3. С. 137-141. Citation APA: Sinkevych, O. V., & Sokolovskyy, I. Ya. (2018). Software and Algorithmic Provided for Work With Cellular Automates. Scientific Bulletin of UNFU, 28(3), 137-141. https://doi.org/10.15421/40280328
• Convert each 3D cube to 2D neighborhood von Neumann 1 st order and establish certain relationships between the faces of these 3D cubes using the above-mentioned dividing process;
• Visually present the established interconnections between the facets in the form of a corresponding scheme;
• Develop a set of rules that could use cellular automata to change the numerical values of temperature and humidity on the edges of developed 3D cubes;
• To develop classes with which we can implement the proposed layout of lumber of fixed size;
• It is necessary to develop a sequence diagram that will better understand the essence of the developed system classes. Execution of all the above-mentioned tasks will allow
all users to obtain the tools by which it will be possible to use the theory of cellular automata in determining the thermal and mechanical processes in the developed integrated CAD.
Distribution of the researched object. The primary objective of this work is the allocation of a fixed size timber on 3D cubes, which then will be used for distribution in 2D neighborhood von Neumann. For the distribution of lumber, it is necessary to take into account a number of rules, among which:
• It is necessary to divide the stack on a certain number of lumber, which will be divided into 3D cubes of the same size.
• The number of 3D cubes is limited and is determined by the cutoff density that is given in advance.
• The cut density should be sufficiently small to ensure that there are enough 3D cubes in the depth of the lumber.
In order to comply with these rules it was decided to make lumber section in accordance with the scheme, which is shown in Figure 1. The selected lumber has the following dimensions: height and width of 100 mm, and length 1 m.
Figure 1. View of the lumber separation scheme
Further, according to the developed software application, the form of which is shown in Figure 2, the calculation of the number and size of 3D cubes was performed. Consequently, with such dimensions of the lumber can be built 3D cubes, which can have 15 different sizes of external facet. If we take the largest dimension of the facet, which is 100 mm, then we will have only 10 cubes.
software application that uses capabilities of the SolidWorks API.
It is clear that in the process of cutting the timber there is a minimal indentation between the facet of the created 3D cubes, which is usually 0.001 mm. This indentation is very small in size, which avoids significant errors when calculating the temperature and humidity values in the lumber during experiments.
An enlarged view of some created 3D cubes is shown in Figure 3. It is worth noting that in fact, the distance between the 3D cubes is much smaller, but it has been significantly enhanced to better visualization the partitioning process.
Figure 2. Software that is used to calculate the number of required 3D cubes
When selecting the size of facet at 0.25 mm, we get 640 million 3D cubes, the calculation of which, even on powerful computers take long. That is why it was decided to select 3D cubes, the outer edges of which have a size of 20 mm. With such dimensions of external facet, the total number of 3D cubes will be 1250 pieces (Sokolovskyy & Sinkevych, 2017; Hrytsiuk, & Zhabych, 2018).
After calculation of the required 3D cubes were made the timber section of a given size. This process is fully automated. This automation was achieved by using developed
Figure 3. Visualization of the partition process
When we get 3D cubes, we need to assign them the value of the initial parameters of the stack. Assuming that the distance between the lumbers in the stack should be filled with airspace. Next, we divide the initial parameters into two categories, one of which will be assigned to the airspace, and other formed 3D cubes (Wolfram, 2002; Soko-lovskyy & Sinkevych, 2016; Sinkevych, 2017).
The following parameters that will be assigned to 3D cubes include:
• Height, length and width are given according to the size of created 3D cubes, for example, 20 mm;
• Wood species;
• Initial temperature and humidity. If they are different, then it is necessary to uniform distribution along the length of a given timber. The rest of the initial parameters are transmitted to the
airspace surrounding the stack. Air space similarly will be presented as an array of 3D cubes of the same size. This representation will allow us to calculate a mathematical model that serves to change the parameters of the drying agent in space and time.
Conversion of 3D cubes and install dependencies between its facets. Consequently, when we having 3D cubes, it is necessary to make their transformation in order to represent them in the form of 2D squares. This step is very important and necessary, because with this transformation we will be able to use cellular automata to determine the thermal and mechanical processes in the object under study. In general, one 3D cube has six facet, the numbering of which is shown in Figure 4.
Figure 4. Numbering of 3D cube facet
To represent cellular automata, we can use one of the two most popular 2D nodes, namely 2D Moore's area and 2D Von Neumann Fields. If we talk about the Moore countryside then it represents a set of eight cells on a square parquet, having a common vertex with this cell.
In turn, the von Neumann occipital represents a set of four cells on a square parquet, having a common side with this cell. Their appearance is shown in Figure 5.
a) 6)
Figure 5. View (a) 2D Von Neumann Fields in 1 st and 2nd order, (b) 2D Moore's area in 1st and 2nd order
It is clear that in order to accomplish this task, the 2D field of von Neumann is best suited to the 1st order. According numbering of 3D cube facet and 2D neighborhood von Neumann in 1st order, we can get a graphical relationship facet of 3D cubes, which are shown in Figure 6.
Figure 6. 3D cube relationship facet by using 2D Von Neumann Fields in 1st order
Figure 7. General scheme for the internal and external facet of the created 3D cubes
In Figure 6, we can see how one 3D cube facet can affect to another. Based on these relations was developed a general scheme for the internal and external facet of the created 3D cubes. The form of this schema is shown in Fi-
gure 7. It should be noted that the values of X (Wolfram, 2002; Von Neumann, 1966; Sokolovskyy & Sinkevych, 2017) are the own facet of the selected 3D cube, and the value Y is the facet of the outer 3D cube that is adjacent to the selected one.
Consequently, each facet of the selected 3D cube can have a relation with only one facet of the outer 3D cube. Visual representation of the principle of the scheme relationship between the external facets of 3D cubes, are shown in Figure 8.
Figure 8. Visual representation of the relationship scheme between the faces of different 3D cubes
Developing the rules of conduct based on cellular automates. Therefore, to accomplish the task by using cellular automata, it is necessary to develop some rules of behavior that should not violate the three basic components necessary for using of cellular automata, namely:
• The parallelism by which cell renewal occurs simultaneously and independently of one another;
• The locality in which the new cell value depends only on its previous value and the values of its cells around;
• Homogeneity, in which the cells must always be changed according to the same rules.
To construct own rules for changing the values of the formed cells, we used: the relationship scheme, which is shown in Figure 6, the software application, the form of which is shown in Figure 2 and the three main components of the use of cellular automata. In general, developed several rules, including:
• All 3D cubes must have faces of the same size, which in future will be prevent the presence of 2D cells of different sizes;
• All cells have their own initial values, which don't necessarily have the same numeric values (e.g. temperature or humidity);
• The faces of one 3D cube can only affect those faces of their own 3D cube, which are shown in Figure 3;
• Each facet of one 3D cube can directly affect only one facet of another 3D cube;
• Each 3D cube of the air environment can affect other faces of the same environment, or on the outer edges of those 3D cubes of lumber that are in direct contact with this environment;
• The value of the temperature and humidity of each face may vary according to the laws of thermodynamics, energy conservation laws, and the mathematical models developed and indicated in advance;
• The result of cellular automata can be mentioned desired temperature or humidity, or the passage of a specified time simulation. Development class and sequence diagram. To solve this problem, it is necessary to develop several basic classes. With these classes, you can implement a scheme of interconnections between the faces of 3D cubes. The graphical relationship between the above-described classes is shown in Figure 9.
Figure 9. Graphic interrelation between developed classes
The first class is called "Cube". This class contains information for each of the six faces of one cube (Soko-lovskyy et al., 2017; Hrytsiuk, & Zhabych, 2018). This information includes the numerical value of temperature, humidity and the general condition of each face. By itself, the state of the face allows us to know whether it is necessary to change its numerical value in the next iteration. In general, we can say that this class represents one of the smallest parts of the object being studied (Sokolovskyy & Sin-kevych, 2017; Sinkevych, 2017). The second class is called "Level". This class is a two-dimensional array, which consists the elements of class "Cube". In essence, this class is an array of 3D cubes of the same level. If we recall the initial section of the object under study then it turns out this class has a dimension of 5x50 equal 250 cubes.
The third class is called "Lumber". This class is one solid timber. It is clear that this class is a one-dimensional array, which consists the elements of class "Level". Again, if we recall the initial section of the investigated object, then this class will have a dimension of 5, and this is 5x250, which is equal to 1250 cubes.
The next class is called "Stack". It is clear that this class is a stack of lumber. This class is a two-dimensional array, which consists the elements of class "Lumber". Class "3D_Model" serves to download the original 3D model and its further use in the partition process. The "Find" class is needed to find the lumber in the downloaded 3D model. This class gives us the ability to identify all possible section variants of the 3D model. The next class is called "Cut" is required for the 3D model partition according to a given schema by using SolidWorks API.
Figure 10. View of the developed sequence diagram
The last class "Calculation" serves for calculating numerical values on the edges of created 3D cubes However, before describing these classes, it is worth considering the
sequence diagram, which is shown in Figure 10. This diagram serves to better understand the sequence of use the developed classes.
Conclusion. As a result of this work, was developed a concept for using the cellular automata for the study of three-dimensional objects. In addition, was created a software with which you can download a 3D model of lumber piles and instantly calculate the number of possible variants of cutting each of the lumber into 3D cubes of the same size. The cutting process itself takes place using the SolidWorks API. The resulting 3D cubes were presented in the form of 2D neighborhood of von Neumann 1st order. With this view, a relationship scheme was created for the inner and outer sides of the created 3D cubes. On the basis of established relationships was created, a certain set of rules for changing the numeric values that apply to the edges of 3D cubes. Another important task that was accomplished in this work is the development of system classes, their further description, and a description of their interactions. As a visual representation of this was given a sequence diagram of the developed classes. In general, in this work, we examined the possibilities of using the theory of cellular automata in studying models presented in a three-dimensional coordinate system. To study this concept, by conducting various types of experiments, was created an appropriate software.
nepe^iK BHKopHeraHHx g»epe.n
Sinkevych, O. V. (2017). Rozroblennia prohramnoi systemy dlia roz-rakhunku parametriv ahentu sushinnia derevyny u prostori ta chasi.
Advanced computer information technologies: mater. Vseukr. konf. z mizhnarodnoiu uchastiu, (pp. 178-179), (ASIT2017), 1920.05.2017 r., m. Temopil, Ukraina. Temopil: TNEU. [In Ukrainian].
Sokolovskyy, Ya., & Sinkevych, O. (2016). Software for Automatic Calculation and Construction of Chamber Drying Wood and its Components. Materials of the XII International Conference, (pp. 209-213), (MEMSTECH 2016), 20-24.04.2016., Lviv, Ukraine. Publisher Lviv Polytechnic.
Sokolovskyy, Ya., & Sinkevych, O. (2017). Calculation of the Drying Agent in Drying Chambers. The Experience of Designing and Application of CAD Systems in Microelectronics: Materials of the XIVth International Scientific and Technical Conference "Experience in the Development and Application of CAD in Microelectronics", (pp. 27-31), (CADSM-2017)", 21-25 February 2017 p., Pol-yana, Ukraine. Publisher PE "Vezha i Ko".
Sokolovskyy, Ya., Sinkevych, O., Kroshnyi, I., & Mokrytska, O. (2017). Information system of automation modelingprocess of con-vective drying of wood. Forestry and wood technology, 99, 88-97.
Hrytsiuk, Yu. I., & Zhabych, M. R. (2018). Risk Management of Implementation of Program Projects. Scientific Bulletin of UNFU, 28(1), 150-162. https://doi.org/10.15421/40280130. [In Ukrainian].
Toffoli, T., & Margolus, N. (1991). A Cellular Automata Machine. World. 280 p.
Von Neumann, J. (1966). Theory of Self-Reproducing Automata. Urbana, London, Univ. Illinois Press. 742 p.
Wolfram, S. (2002). A New Kind of Science. Champaign, Wolfram Media. 1264 p.
Wolfram, S. (2002). A Science of Complexity. Moscow: Wolfram Research. 1197 p.
О. В. Снкевич1,1. Я. Соколовський2
1 Нацюнальний лкотехтчний утверситет Украши, м. Львiв, Украша 2 Львiвський нацюнальний утверситет iM. 1вана Франка, м. Львiв, Украша
ПРОГРАМНЕ ТА АЛГОРИТМ1ЧНЕ ЗАБЕЗПЕЧЕННЯ ДЛЯ РОБОТИ З КЛ1ТИННИМИ АВТОМАТАМИ
Розглянуто систему початкових теоретичних положень, яка е основою до^дницького пошуку BapiaHTiB використання клгтинних автомата для дослщження тепломехашчних процеав у тpивимipних об'ектах SolidWorks, шляхом !хнього пред-ставлення у 2D околах фон Неймана 1-го порядку. Виконання ще! роботи також передбачае створення початкових правил змгни дослщжувано! системи, як по^бш для безпосереднього використання клгтинних автомата За результатами пеpевip-ки цих правил з'ясовано, що !хньо! кшькост може бути недостатньо для виршення специфiчних завдань в обласл 3D досль дження. Через це було залишено мехашзми створення нових правил змгни системи, або ж змгни вже наявних. Ок^м цього, пiд час виконання ще! роботи, усi процеси наукового пошуку, а також запропоноваш початюж положення неодноразово пе-pевipяли, розвивали, та за потреби коригували. Також описано встановлеш зaлежностi мiж гранями створених 3D кубiв. Цi залежноста представлено у виглядi вiдповiдно! схеми спiввiдношення, яка нaдaлi використовуеться тд час розроблення та налаштування вiдповiдних клaсiв системи, якi до того ж т1сно взaемопов'язaнi мiж собою, як лопчно, так i функщонально. На основi розроблених клaсiв системи створено вдаовдае програмне забезпечення, яке е фундаментом використання кль тинних aвтомaтiв у дослiдженнi задач в облай! 3D моделювання.
Ключовi слова: САПР; окш фон Неймана; SolidWorks API.
О. В. Синкевич1, И. Я. Соколовский2
1 Национальный лесотехнический университет Украины, г. Львов, Украина 2 Львовский национальный университет им. Ивана Франко, г. Львов, Украина
ПРОГРАММНОЕ И АЛГОРИТМИЧЕСКОЕ ОБЕСПЕЧЕНИЕ ДЛЯ РАБОТЫ С КЛЕТОЧНЫМИ АВТОМАТАМИ
Рассмотрена система исходных теоретических положений, которые являются основой исследовательского поиска вариантов использования клеточных автоматов для исследования тепломеханических процессов в трехмерных объектах SolidWorks, путем их представления в 2D окрестностях фон Неймана 1-го порядка. Выполнение данной работы также предусматривает создание начальных правил изменения исследуемой системы, которые необходимы для непосредственного использования клеточных автоматов. В результате проверки данных правил выяснено, что их количества может быть недостаточно для решения специфических задач в области 3D исследования. Поэтому были оставлены механизмы создания новых правил изменения системы, или же изменения уже существующих. Кроме этого, при выполнении данной работы, все процессы научного поиска, а также предложенные исходные положения неоднократно проверялись, развивались, и при необходимости корректировались. Также описаны установленные зависимости между гранями созданных 3D кубов. Данные зависимости представлены в виде соответствующей схемы соотношения, которая в дальнейшем используется при разработке и настройке соответствующих классов системы, которые к тому же тесно взаимосвязаны между собой, как логично, так и функционально. На основе разработанных классов системы создано соответствующее программное обеспечение, которое является фундаментом использования клеточных автоматов при исследовании задач в области 3D моделирования.
Ключевые слова: САПР; окрестность фон Неймана; SolidWorks API.