USING A GENETIC ALGORITHM TO SOLVE THE COURSES TIMETABLING CREATION PROBLEM

Creating of courses timetable is an extremely difficult, time-consuming task and usually takes a long time. In many educational institutions, the courses schedule is developed manually. Schedule theory includes problems that are actually less complex than problems in practice, but theoretical analysis provides a fundamental understanding of the complexity of the schedule. The logical result is that the schedule is very difficult to build in practice due to many constraints [1]. Scheduling courses is a planning problem. In 1996, the problem of scheduling was described as the allocation of some resources with restrictions on a limited number of time intervals and at the same time to satisfy the set of stated objectives [2]. This is a general statement and is a common description of the courses timetabling creation problem. Schedule of courses is an important administrative activity in most educational institutions. The timetable problem is the distribution of classes by available audiences and time intervals, taking into account the constraints. We usually distinguish between two types of constraints: hard and soft. Hard constraints are compulsorily fulfilled by the educational institution. Decisions that do not violate hard constraints are called possible solutions. With the development of the general theory of the schedule, the approaches to the formalization and solution of the courses timetabling creation problem in educational institutions also changed. Currently, the problem of automation of the courses timetabling creation remains relevant. The urgency of the problem is determined by the growing requirements for the quality of education, student work planning, rational use of the audiences, as well as taking into account additional optimization parameters. The task of finding the optimal schedule of courses in most cases belongs to the class of complex problems. If we take into account the real conditions, the problem is even more complicated, because the desired solutions must meet numerous constraints of production, organizational and psychophysiological nature, which contradict each other. The genetic algorithm helps to efficiently search for optimal solutions in spaces with a very large dimension.


Introduction
The problem of creation of the courses timetabling is an integral part of the work of any educational institution, including the institution of higher education. Schedule of the courses is the main final document of planning, which regulates the educational work of students, participants in the educational process (teachers) and the engineering and technical staff of the institution of higher education [3]. A possible solution to the planning problem may be the use of a genetic algorithm. A genetic algorithm is an optimization algorithm based on the mechanisms of Darwinian evolution that uses random mutations, crossovers, and selection procedures to obtain the best models or solutions from an initially random population or sample [4].

Analysis of literary data and problem statement
There are many classical methods for solving the problem of creating a schedule of courses. Scientists from many countries around the world have been working to automate the process of scheduling courses since the middle of the last century [2]. Each of the researchers offers his own approach to solving this problem. Some of the early methods used to timetabling are mathematical [5] and integer programming [6]. Constraint-based methods [7], Hungarian method [8] and methods based on graph theory [9], used for many years to solve the courses timetabling creation problems. In addition to these methods, there are several new and effective methods, such as a genetic algorithm [10], TABU-search [11], simulated annealing [12], neural networks [13] and evolutionary methods [14] used to solve the problem of creating a schedule. Recently, a combined optimization approach and heuristic, hypereuristic methods, neural network-based heuristics, computer network-based systems, and decision support systems have been proposed.
The problem and disadvantage of many of the proposed methods is the incompleteness of the adequacy of the presented schedule, significant complexity, which requires the participation of a qualified user, they are effective for the formation of -Volume 13, Issue 2 /2021 http://www.atbp.onaft.edu.ua/ only a small schedule. The possibility of using the developed system for the schedule of other institutions of higher education is limited, it is necessary to make significant changes in the algorithm with minor changes in institutions of higher education [15]. A common disadvantage of all existing methods is that they basically use an iterative procedure of finding or improving some initial approximation, where the search for a result takes place around this approximation and this means that the result directly depends on some initial approximation and there is a problem of its choice.
Researchers have made great efforts to develop a universal automated control system for scheduling. However, to date there is no perfect solution to this problem, because we have to take into account numerous parameters and constraints. None of the previously developed systems is universal and can't meet the needs of all higher education institutions. Most systems use a large amount of input information stored in databases. With the help of complex algorithms, based on the analysis of input information, a course schedule is compiled. However, the resulting schedule is not always perfect and may require a lot of resources and time. The timetable must satisfy the interests of all participants in the process. The interests of some participants may conflict with the interests of other participants in the process.

Purpose and objectives of the study
The main purpose of the study is to develop a method for solving the courses timetabling creation problem. It's must accomplish the following tasks to achieving the goal: -to analyze existing methods to solve the problem and determine the advantages of the genetic algorithm; -to determine the elements of the genetic algorithm; -to describe the operators of the genetic algorithm; -to describe the stages of the genetic algorithm.

Methods and materials of research
The study of the courses timetabling creation process is conducted on the basis of the Odesa National Academy of Food Technologies. One of the methods of researching the process observation, where the observer was included in the process creation of the courses timetabling as a participant. Observation is controlled by degree of formalization and conducted in real conditions. Regularity is not systematic namely participants in the process (researcher and staff) deal with unplanned phenomena and unexpected situations. Based on this method, a process analysis was performed.
The method of classification was used to describe the genetic algorithm. In order to organize and systematize the elements of the schedule is their conditional division into populations, individuals, genes and alleles. There is a hierarchical method of classification, which is characterized by the fact that the initial set of information elements is sequentially divided into groups of the first level of division, then -into groups of the next level, etc.

Research results
The use of the genetic algorithm is motivated by its advantages, such as: asynchrony -calculations of different populations and operators can be performed independently of each other, more work is done per unit of time than in non-parallel algorithms; migration allows different populations to obtain a genotype that they did not previously have or could not have, using selection operators; diversity of the algorithm for different populations and operators [16]. The genetic algorithm helps to efficiently search for optimal solutions in spaces with a very large dimension.
In the genetic algorithm, all possible solutions are represented by a "digital individual". The generation of an initial set of possible solutions is called a population, which is formed from a set of individuals. Sometimes individuals in a genetic algorithm are called chromosomes, and positions on a chromosome are called genes. The value that a gene takes on is called an allele or allelic value. Allele values can be changed by a predetermined set called allelic alphabet [17].
Let I -set of cr N chromosomes (individuals of the population I ). 0 I -randomly generated initial population, t I population at a time t . The population in the courses timetabling creation process is all admissible variants of the schedule of educational classes, where the individual of the population is an admissible variant of the schedule of educational classes. Individuals combine randomly to recombine genetic material.

Fig.1 -lesson in the form of a gene
Chromosomes are a dynamic array, each element of which is one lesson. For the courses timetabling creation problem, we propose to use genes from 4 parts (Fig. 1), which determine a specific lesson:

Fig.2 -graphic representation of the schedule of courses
Graphically, the schedule can be depicted as shown in Fig.2. The size of the cube will be static, because the number of study days and the number of pairs per day is a constant number, and the number of audiences is a value that will be taken from the database. Fields "Subgroup-Teacher-Discipline" -will be contained in the nodes of the parallelepiped.
To encode the gene, we present all the necessary data in encoded decimal form. Information about the participants of the educational process, student groups, disciplines and the audiences are encoded in decimal form when entering data into the database, writing their serial number in the table. The coding of the first part is given 3 characters -the number of days is in the range 365 ; 1 ; 1 character is assigned to the coding of the second part -the number of pairs is in the range 6 ; 1 ; the encoding of the third part is given a range of 9 characters (suppose that: characters. The suitability of individual schedule options is determined by the fitness function -it quantifies how good the schedule is. The fitness function is closely related to the target function. The courses timetabling creation problem can be interpreted as the task of finding the maximum of the target function (1).
i -a "weighting factor" that determines the significance of the i-th criterion. The "weighting factor" is determined by the operator, before creating a schedule based on their own considerations about the importance of each efficiency criteria. ifunctions, each of which optimizes one criterion for assessing the schedule of courses.
The first generation will be formed by chance. First, the algorithm selects a random day of the week and time, selects the audience, the capacity of which allows you to place a student group and that it corresponds to the type of lesson. It is checked whether there is another lesson in this audience, if not -a lesson is assigned, otherwise we look for another coordinate. Perform this procedure for each lesson. When all classes are placed in the coordinates -exit the cycle.
The genetic algorithm generates a new population from the previous one, using some genetic operators. Such operators are: -selection; -crossover; -mutation. Reproductions performed using the selection operator for individuals with the best value of the fitness function. Then the population is replenished with the help of crossover and mutation operators, in each new population we get new generated variants of the schedule with the best value of the fitness function.
The selecting process is as follows: a pair of chromosomes is selected from the initial population I cr 1 , I cr 2 , one of which with the best evaluation of the fitness function. These chromosomes can only be selected once, which allows you to replace the worst chromosomes with the best in subsequent populations.
A crossover operator (Fig. 3) is used for the selected pair of chromosomes. Let l N -the total number of lessons (genes) in the schedule (in the chromosome). We generate a random number n such that

The discussion of the results
The most common mistake in the application of genetic algorithms is the selection of genes. Often the solution itself is chosen as genes. The selection of genes is the most challenging and creative element in the creation of a genetic algorithm. In this case, the choice of genes must meet the following basic requirements: according to the set of genes, the solution to the desired problem must be constructed quickly and unambiguously; when crossing, the offspring must inherit the characteristics of the parents; the set of genes should give the entire set of (possibly optimal) solutions to the problem.
Optimizing the schedule of courses using a genetic algorithm is a non-trivial and time-consuming task. First of all, it is required to take into account and formalize all the requirements, to take them into account in the objective function. In addition, it is required to search for an adaptive genetic algorithm, new modified genetic operators, for example, to apply nonclassical methods of chromosome selection, to enter the quality coefficients of the compiled schedule, etc.
Scheduling with l N lessons using a genetic algorithm can be divided into 5 stages (Fig. 4): -generation of a number of arbitrary variants of the schedule (initial population); -assessment of the suitability of individuals; -generation of new variants of the schedule, applying to the existing operator of crossover and mutation; -assessment of the suitability of new individuals; -choosing the best chromosome as a solution.

Conclusions
The article describes the principle of operation and the feasibility of using a genetic algorithm to solve the courses timetabling creation problem. The advantages of the genetic algorithm over other existing methods of solving the problem were described. The genetic algorithm helps to efficiently search for optimal solutions in spaces with a very large dimension.
The main elements of the genetic algorithm for the process of creating a schedule are determined. Describes which elements of the schedule are population, individual and genes. The genetic algorithm generates a new population from the previous one, using some genetic operators, such as: selection, crossover and mutation. At first some variants of the schedule are formed. Then the best of them interbreed, forming a new better offspring. There is a mutation -a change in some genes. This procedure takes place until the best solution is found.
The results will be used in the development of an automated control system to create a schedule. In future research, this work will be finalized.