The Task Assignment of Vehicles for a Production Company

: The article investigates the problem of task assignment of vehicles for a production company. The presented problem is a complex decision-making issue which has not been analyzed in the literature before. Two stages must be passed through in order to solve the task assignment problem of the vehicles for the production company. The ﬁrst stage is to designate the tasks, the other one is to determine the number of the vehicles that is needed to perform these tasks. The task in the analyzed problem is deﬁned as transporting the cargo from the suppliers to the warehouses and from the warehouses to the production company. The number of the tasks depends on the type of the vehicle which carries out a given task. In order to solve the presented problem, the mathematical model has been developed, i.e., decision variables, constraints, and criterion functions. There are three types of decision variables occurring in the model, which means that this problem is quite complex. The ﬁrst type of the decision variables determines the volume of the cargo which ﬂows among the facilities on a given working day, the second type of the decision variables determines the use of a given type of the vehicle in the task, and the third type of the decision variables determines the number of the vehicles which perform the task. The criterion functions take the following form: the fuel consumption costs, the transition costs of the cargo via the warehouses, the purchase costs of the cargo, and the task completion time. In order to solve the task assignment problem of the vehicles, a genetic algorithm has been developed. The proposed method of task assignment solution is unique due to the coding method of individuals and related recombination procedures. The construction stages of this algorithm are presented. The algorithm has been veriﬁed by the use of the real input data. The developed model and method of its solution are unique in the application to the service of manufacturing enterprises. Due to the high efﬁciency and multi-aspect approach, it can be applied in enterprises of various industries as support for decision-makers in the optimization of resources.


Introduction
The process of assigning vehicles to tasks is a two-stage process. Firstly, the tasks must be designated. Secondly, the number of the vehicles which carry out these tasks must be determined. The task can be defined as loading and forwarding the cargo from a supplier to a warehouse or from a warehouse to a production company. Depending on the volume of the cargo and the capacity of the vehicle which performs a given carriage, the number of the tasks among these objects may be different. The optimal flows of the cargo among the logistic network facilities designate the transportation tasks for the production company. The designated streams will also indicate the suppliers from the set of the potential suppliers offering the cargo. The optimal flows depend on After designating the tasks (optimal flows among the objects of the network) one can assign the vehicles to the tasks. It should be noted that the full consumption cost depends on the type of the vehicle. Therefore, in the process of designating the tasks, the type of the vehicle for each task must be determined. Additionally, the capacity of the vehicles decides about the number of the tasks. One can say that the tasks are designated when the volume of the cargo flowing between the network objects and the types of the vehicles on a given relation are known.
The aim of the assignment is to determine the number of the vehicles which perform the tasks in such a way that the route in which the tasks are carried out should be minimal in the context of the completion time. It should be noted that the number of the vehicles which carry out the tasks influences the time needed for this route.
The stages of the assignment problem, i.e., the stage in which the tasks are determined and the stage in which the number of the vehicles is appointed, are closely connected with each other and cannot be analyzed separately. The type of the vehicle, e.g., the capacity of the vehicle, influences the number of the tasks which are determined in the first stage of this process. Vice versa, the number of the tasks decides about the number of the vehicles that are determined in the second stage. The complexity of the problem is underlined by the fact that the problem is a multi-stage problem, which means the results of the first stage influence the results generated in the second stage. Moreover, the problem is considered in the context of multi-criterion optimization. The decision variables in the mathematical model are of different types, which requires developing a new algorithm suitable for the presented problem. The current multi-criterion optimization algorithms [1] cannot be used in this problem due to the specific character of the problem, e.g., different types of the decision variables. It should be emphasized that the multi-criterion methods, which are available in the literature, cannot be applied in the presented problem, therefore they cannot be compared with the proposed algorithm. Of course, there are many different effective methods. Interesting solutions concern the use of e.g., PSO (particle swarm optimization) or artificial neural networks [2]. All After designating the tasks (optimal flows among the objects of the network) one can assign the vehicles to the tasks. It should be noted that the full consumption cost depends on the type of the vehicle. Therefore, in the process of designating the tasks, the type of the vehicle for each task must be determined. Additionally, the capacity of the vehicles decides about the number of the tasks. One can say that the tasks are designated when the volume of the cargo flowing between the network objects and the types of the vehicles on a given relation are known.
The aim of the assignment is to determine the number of the vehicles which perform the tasks in such a way that the route in which the tasks are carried out should be minimal in the context of the completion time. It should be noted that the number of the vehicles which carry out the tasks influences the time needed for this route.
The stages of the assignment problem, i.e., the stage in which the tasks are determined and the stage in which the number of the vehicles is appointed, are closely connected with each other and cannot be analyzed separately. The type of the vehicle, e.g., the capacity of the vehicle, influences the number of the tasks which are determined in the first stage of this process. Vice versa, the number of the tasks decides about the number of the vehicles that are determined in the second stage. The complexity of the problem is underlined by the fact that the problem is a multi-stage problem, which means the results of the first stage influence the results generated in the second stage. Moreover, the problem is considered in the context of multi-criterion optimization. The decision variables in the mathematical model are of different types, which requires developing a new algorithm suitable for the presented problem. The current multi-criterion optimization algorithms [1] cannot be used in this problem due to the specific character of the problem, e.g., different types of the decision variables. It should be emphasized that the multi-criterion methods, which are available in the literature, cannot be applied in the presented problem, therefore they cannot be compared with the proposed algorithm. Of course, there are many different effective methods. Interesting solutions concern the use of e.g., PSO (particle swarm optimization) or artificial neural networks [2]. All metaheuristics, due to their universality, are widely used in task assignment in various functionalities. Genetic algorithms are particularly useful due to the large recognition of the functioning of these methods, the variety of mechanisms that allow increasing the efficiency of searching the solution space and relatively easy implementation. In addition, additional reasons for using such methods are outlined in Section 4.
In consequence a genetic algorithm has been developed in order to solve the task assignment of the vehicles for the production company. The additional feature that underlines the practical application of the selected algorithm is its high speed of generating the result, which is desired in the process of designating the assignment. As this process depends on numerous factors, for example the capacity of the vehicles and the distance among the facilities of the network, the algorithms for designating this type of the problem must be adapted to frequent changes of these factors and they must generate the solutions in a quick way. Therefore, the speed of generating the solution by the algorithm plays the most important role. The genetic algorithm generates the results in a quick way, and therefore, it was selected for this problem. Although the genetic algorithms, which belong to a group of heuristic algorithms, do not guarantee the optimal solution, they are enabled to close on the optimal solutions so-called suboptimal ones. Despite this inconvenience, the genetic algorithms are a practical tool for optimization and they are used in a variety of complex decision making problems, e.g., vehicles routing problems [3,4]. It must be stressed the complexity of the problem of assigning the vehicles to the tasks limits the use of accurate methods to find optimal solutions. However, it allows to accept sub-optimal solutions.
One can underline that the authors of this publication have not found the analyzed problem in the literature. The presented mathematical model and the genetic algorithm are an innovative solution in the field of the task assignment of the vehicles for the production company. Additionally, the authors of the publication have not come across any mathematical models determining the task assignment of the vehicles for any manufacturing enterprise. The developed model is a primary model on the basis of which after introducing its additional modifications it is possible to analyze various aspects of functioning a production enterprise, e.g., the flow of the cargo among the warehouses. The aim of the work is to initiate the problem of vehicle assignment, taking into account the basic assumptions of the production company. Further modifications of the model are an appropriate direction of subsequent scientific research in the discussed topic.
The article contains an introduction to the subject matter and justification for conducting research in this direction. The next section presents the analysis of literature, which allowed to systematize the current state of knowledge within the problem of task assignment. The next points, i.e., the model and the algorithm, are the theoretical elements of the work introducing a new approach in the aspect of servicing production enterprises. The last part of the article is the presentation of computational simulations for a real example and a discussion of results. The scheme of the article and the effects of each section is shown in Figure 2.

Literature Analysis
The classical problem of the task assignment of resources is a well-known issue, widely described in one of the branches of mathematics and computer science, namely in Graph Theory [5][6][7]. The main aim of this problem is to assign the vehicles and the people to the tasks according to a given criterion function, e.g., minimal transportation cost or completion time. The number of the

Literature Analysis
The classical problem of the task assignment of resources is a well-known issue, widely described in one of the branches of mathematics and computer science, namely in Graph Theory [5][6][7]. The main aim of this problem is to assign the vehicles and the people to the tasks according to a given criterion function, e.g., minimal transportation cost or completion time. The number of the vehicles, the people, and the tasks are known. This problem can be modified and can take different forms, e.g., the number of the vehicles is equal to the number of the tasks, or the number of the vehicles is smaller or bigger than the number of the tasks. In terms of a graph theory, the problem of the assignment is presented as a bipartite matching problem, a network flow problem, and a set covering a problem.
The issue of assigning the resources to the tasks is often used in practical applications and in a variety of scientific disciplines, including logistics, transport, or construction.
The classical problem of the task assignment of resources is a personal problem [8][9][10][11]. The contractors of the tasks are distinguished by certain skills and features due to which they are able to accomplish particular tasks. The solution of the problem is to appoint suitable contractors for the tasks so that the contractors could perform the tasks in the optimal way (maximum profit, minimal loss).
The basic issue of the classical assignment problem, in which it is possible to assign one employee, a vehicle or a device to many tasks, is the general issue of the assignment called General Assignment Problem [12][13][14][15][16][17]. In this model, as in the classical assignment problem, it is assumed that each task can be assigned to one agent (a device, a vehicle, etc.), while each agent can be assigned to more than one task, taking into account the degree of the agents' ability to perform tasks, e.g., load the capacity of the vehicles.
An issue related to the assignment problem is Work Schedule Problem. Scheduling can be defined as the allocation of the resources for the tasks at the time [18,19]. The scheduling sense consists in determining such an order of tasks and assigning them to the task contractors (i.e., employees, devices), so that these contractors could perform these tasks in the minimum amount of time. In the transport company, the scheduling process can be treated as the process of determining the driver's work plan (i.e., timetable) [20][21][22]. The scheduling problems in transport issues such as Bus Driver Scheduling Problems, Crew Scheduling Problems are presented widely in References [7,23].
In air transport, the application of the assignment issue for determining flight plans, crew allocation to a given flight or the type of an aircraft for a given route is provided in [24][25][26][27][28][29]. The problem is to set flight plan schedules so that all the routes are completed in the minimum time.
In transport issues, the assignment problem also plays a key role in determining transport routes [7]. In the literature, this problem is called as Vehicle Scheduling Problem. The problem concerns air, rail, and road transport, where there is a certain set of trips/transport routes/cruises that must be carried out. In addition, each vehicle must be assigned to routes in the right order, so that the total cost of driving will be minimal. Depending on the type of a company and the introduced restrictions, this problem may be modified, but the main task is to assign the minimum number of available resources, e.g., vehicles, aircrafts to designated routes. The detailed description of the problem is presented in the References [23,[30][31][32][33][34][35][36].
The assignment is considered in a variety of situations like the assignment of the gates at vehicle transshipment terminals [37] and setting up class schedules [38][39][40].
In the literature the assignment problem is presented in the context of single or multi-criteria decision problems [7,48]. The algorithms and methods which solve the analyzed problem refer to the discrete optimization. The decision variables take the binary form. It emphasizes the fact that the current optimization algorithms cannot be used in the assignment problem of vehicles to tasks in the production company in view of specific character of the problem, e.g., different types of the decision variables.
The aim of the literature analysis is to present various aspects of the assignment problem depending on the analyzed research area. What should be emphasized is that the problem of the task assignment of the vehicles for a production company has not been examined in the literature yet. The assignment problem in a production company analyzed in this paper is considered in the context of the classical assignment issue (the tasks are assigned to the vehicles). After designating the routes of the vehicles, the classical assignment issue is modified to the vehicle scheduling problem.
According to the literature, the classical assignment problem is a combinatorial problem belonging to NP-complete problems [7]. In terms of graph theory, the assignment problem is also presented as the problem of finding flow in the graphs (the network flow problem) or the optimal set overage problem. The presented assignment problem in this paper refers to the network flow problem, which is also NP-complete problem [7].
It should be noted that all the presented methods in the literature relate to single and multi-criterion discrete optimization [48], so it is not possible to compare them with the developed method in this publication according to the different types of decision variables. Although the problem described is NP-complete problem, the multi-criteria aspect of this issue and the complexity of the mathematical model makes it impossible to indicate the accurate calculation algorithm.

The Mathematical Model of the Assignment Problem
The article discusses the problem of allocating resources to tasks, which is unique, i.e., it was not considered in this perspective. To present it in a mathematical form, a number of assumptions were made. The assumption of the model:

-
The production company starts the production process in the case when all the cargo has been gathered in the warehouses. It means that the cargo is transported from the warehouses to the production company. The relation: suppliers and a production company does not exist. All the cargo which is necessary for the production must be stored in the warehouses. This situation is to ensure the continuity of the production process. - The amount of the cargo which is offered by all the suppliers is bigger than the demand of the production company. - The organization of transport is on the side of the productize the total costs which result from transporting the on company. The aim of the production company is to minimalicargo from the suppliers to the production company. - The model assumes that the distances between the suppliers and the warehouses and the warehouses and the production company are the same as between the warehouses and the suppliers, and the production company and the warehouses. - The warehouses belong only to the production company. This situation lets the production company know the capacity of the warehouses.
Taking into account the above, for the purposes of the model formulation, was defined, that all nodes V = {v: v = 1, 2, . . . , v', . . . , V} of the transport network with has interpretation of (are subset of V): suppliers DS = {v: α(v) = 0 for v ∈ V}, warehouses, MS = {v: α(v) = 1 for v ∈ V}, for which defined capacity CAP = [cap(v): cap(v) ∈ R + , v ∈ MS], and also production companies (recipients), P = {v: α(v) = 2 for v ∈ V}. The volume of deliveries is also associated with suppliers The The implementation of deliveries is related to the spatial distribution of network elements, which has been defined as a distance matrix in the relations suppliers-warehouses, . Time matrices includes for example traffic jams in cities.
Rational planning of resource allocation to tasks requires determining the minimum volume that can be moved Formulating the task assignment, and the way of organizing deliveries in the planned system requires defining decision variables. Three types of variables were adopted in the formulated model. The first variables X = [X1, X2], determine the quantity of cargo flow between suppliers-warehouses The second type of the decision variable Y = [Y1, Y2], determines the use of the given type of the vehicle in the task and takes the following form (1-a given type is used in the relation): The solution requires determining the values of decision variables in the way that the formulated functions reach the extreme. Two criteria functions were formulated. One F1 (1) containing costs and the second task execution time F2 (6).
The total criterion function F1 (1) consists of two parts: the fuel consumption costs among the facilities of the logistic network F1a (2) and the transition costs of the cargo via the warehouses and the purchase costs of the cargo F1b (3). Relation (4) has an interpretation of the number of tasks in a given relation, in turn (5) has an interpretation of the number of the courses in which all the tasks on a given relation are performed. The criterion function F2 (6) determines the time needed to perform the tasks takes. The solutions to be included in the permissible set must meet a number of defined constraints: (7) the production capacity of the suppliers cannot be exceeded-the suppliers can provide the cargo to the warehouses, (8) the recipients' demands must be met-the cargo can flow to the recipients from the warehouses, (9) the warehouse capacities cannot be exceeded-the cargo can flow to the warehouses from the suppliers, (10) the cargo flowing out from the warehouse is equal to the cargo flowing into the warehouse, (11) the minimal stream of the cargo flowing into the warehouses decides about the choice of the warehouses to the supply network for the production company, (12) and (13) many types of vehicles can exist on a given relation, (14) the number of the vehicles must be met. For the above model, a unique algorithm was developed which allows effective solution determination.

Main Assumptions
The solution of complex optimization problems requires the use of algorithms adequate to the complexity of the decision problem. These algorithms can be divided into traditional algorithms and heuristic algorithms, including metaheuristic ones [49,50]. For simple problems, traditional (accurate) algorithms are used to determine optimal solutions. In the case of complex decision problems, the calculation time is very long and such algorithms are ineffective. In such cases, a frequent solution is the use of metaheuristic algorithms. Among the many heuristic algorithms, ant algorithms [51] and genetic algorithms [49,50] are often used to solve decision problems. The results generated by these algorithms are satisfactory in terms of the quality of the solution and calculation time. The main limitation of the ant algorithm is that it belongs to discrete optimization algorithms. In this algorithm decision variables take the binary form. Taking into account the following issues: the multi-criteria aspect of the problem, the variety of decision variables and the possibility of designating them by one optimization algorithm, the constraints of other algorithms, the genetic algorithm has been selected to solve the presented assignment problem. Moreover, the chromosome which is processed by the genetic algorithm can be presented as a matrix. This form of the chromosome is known in the literature [50] and used in complex optimization problems. The matrix structure allows us to save all decision variables in one form, what is more important in analysed problem.
Genetic algorithms are algorithms based on mechanisms of natural selection and heredity. In the literature these algorithms are presented as a practical optimization tool in complex decision problems [52][53][54]. The basic advantages of genetic algorithms dominating over other optimization algorithms is to search for the optimal point not from a single place, but from many points. The genetic algorithm works based on information determined by the adaptation function, not derivatives. Relying on the values of the objective function is a valuable advantage of genetic algorithms The genetic algorithm has been used to solve the multi-criterion assignment problem of the vehicles to the tasks. By the use of this algorithm the volume of the cargo which flows among particular facilities (the first type of decision variables), the type of the vehicles (the second type of decision variables), and the number of the vehicles which are assigned to the tasks (the third type of decision variables) are determined. On the basis of these variables taking into account the constraints (7)- (14) and the criterion functions (1,6), the assignment problem will be solved.
Forming the genetic algorithm is advisable to define the chromosome structure, the adaptation function, the cross-linking process, and the mutation [50]. The crossover process and the mutation are reiterated a given number of times, until the stop condition has been achieved. The stop condition for the developed algorithm is the fixed iteration number. In the selection process, the roulette method was adopted, while the cross-linking process and the mutation occur with a defined likelihood set at the beginning of functioning the algorithm. The linear scaling was used in order to prevent the early convergence of the algorithm [49]. The algorithm scheme is shown in the Figure 3. The algorithm checks the parity of chromosomes selected to crossover process. are reiterated a given number of times, until the stop condition has been achieved. The stop condition for the developed algorithm is the fixed iteration number. In the selection process, the roulette method was adopted, while the cross-linking process and the mutation occur with a defined likelihood set at the beginning of functioning the algorithm. The linear scaling was used in order to prevent the early convergence of the algorithm [49]. The algorithm scheme is shown in the Figure 3.
The algorithm checks the parity of chromosomes selected to crossover process.

The Structure of the Genetic Algorithm
The structure of the input data was presented as the matrix M(t,k), which shows the flow of the cargo among the particular elements of the transport network (Part I), the type of the vehicles (Part II and Part III or more parts depend on the number of the types of the vehicles), the number of the vehicles (the Part IV for the first type of the vehicles and Part V for the second type of the vehicles) in t-th iteration, k-th structure in the population, Figure 4. The lines and the columns of this matrix in each part define the facilities of the transport network structure. In order to determine the flow of the cargo, the lines were defined as the starting points from which the cargo flows out to the other facilities. The matrix cells are located in the following sequence: the suppliers (D1-D2), the warehouses (MS1-MS4) and the production company (P1). The tasks are designated in Part I, II and III, while the task assignment of the vehicles is carried out in Part IV and V.

The Structure of the Genetic Algorithm
The structure of the input data was presented as the matrix M(t,k), which shows the flow of the cargo among the particular elements of the transport network (Part I), the type of the vehicles (Part II and Part III or more parts depend on the number of the types of the vehicles), the number of the vehicles (the Part IV for the first type of the vehicles and Part V for the second type of the vehicles) in t-th iteration, k-th structure in the population, Figure 4. The lines and the columns of this matrix in each part define the facilities of the transport network structure. In order to determine the flow of the cargo, the lines were defined as the starting points from which the cargo flows out to the other facilities. The matrix cells are located in the following sequence: the suppliers (D1-D2), the warehouses The key issue is to determine the correct structure processed by the algorithm that would meet the limitations of the mathematical model. The steps of the procedure which designates the initial structure can be presented as follows: -Step 1: Setting the values of all the cells of the matrix to 0. This value determines, e.g., the connections for which it is not possible to transport the cargo, e.g., among the suppliers. . The values in these cells must meet the limits: the production capacity of the suppliers (7), the warehouse capacity (9), the minimal stream of the cargo flowing into the warehouses (11). It should be underlined that the sum of the cargo flowing out from the suppliers must be equal the demand of the production company. The cells which do not meet these limits take the value 0. In the case when the demand of the production company is met, other cells which were not designated take the value 0 as well. In the case when the demand is not fulfilled and all the cells from D1, MS1-D2, MS4 are designated, the cells are selected in a random way and their values are increased until the moment when the demand is met. -Step 3: Setting the cells of the matrix: MS1, P1-MS4, P1. It should be remembered that the cargo flowing out from the warehouse is equal to the cargo flowing into the warehouse (10) and the recipients' demands must be met (8). -Step 4: Setting the cells of the matrix in the Part II and III. In the presented matrix two types of the vehicles were considered (the first type of the vehicles-Part II and the second type of the vehicles-Part III). These cells are designated in a random way and take the value 1 or 0. 1-a given type of vehicles is used on the connection, 0-otherwise. In this step the limits: many types of the vehicles can exist on a given relation (12), (13) must be met. -Step 5: Setting the cells of the matrix in the Part IV and V in a random way. It should be remembered that the number of the vehicles must be met (14).

The Adaptation Function
On the basis of the adaptation function, the genetic algorithms designate the final solution. What is more, the genetic algorithms look for the maximal solution. In order to take into account the mentioned aspect and different criterion functions the adaptation function for k-the structure of the matrix M(t,k) must take the following form (K = {1 (15) All the decision variables can be read with the structure. In order to be able to add the values of all criterion functions the adaptation function needs to be presented as the sum of quotients where e.g.,: F1min(t) determines the minimum value of the structure calculated according to the first The key issue is to determine the correct structure processed by the algorithm that would meet the limitations of the mathematical model. The steps of the procedure which designates the initial structure can be presented as follows:

FF F FF
- Step 1: Setting the values of all the cells of the matrix to 0. This value determines, e.g., the connections for which it is not possible to transport the cargo, e.g., among the suppliers. - Step 2: Setting the cells of the structure (Part I): D1, MS1-D2, MS4 in a random way (the relation: the suppliers-the warehouses). The values in these cells must meet the limits: the production capacity of the suppliers (7), the warehouse capacity (9), the minimal stream of the cargo flowing into the warehouses (11). It should be underlined that the sum of the cargo flowing out from the suppliers must be equal the demand of the production company. The cells which do not meet these limits take the value 0. In the case when the demand of the production company is met, other cells which were not designated take the value 0 as well. In the case when the demand is not fulfilled and all the cells from D1, MS1-D2, MS4 are designated, the cells are selected in a random way and their values are increased until the moment when the demand is met. - Step 3: Setting the cells of the matrix: MS1, P1-MS4, P1. It should be remembered that the cargo flowing out from the warehouse is equal to the cargo flowing into the warehouse (10) and the recipients' demands must be met (8). - Step 4: Setting the cells of the matrix in the Part II and III. In the presented matrix two types of the vehicles were considered (the first type of the vehicles-Part II and the second type of the vehicles-Part III). These cells are designated in a random way and take the value 1 or 0. 1-a given type of vehicles is used on the connection, 0-otherwise. In this step the limits: many types of the vehicles can exist on a given relation (12), (13) must be met. - Step 5: Setting the cells of the matrix in the Part IV and V in a random way. It should be remembered that the number of the vehicles must be met (14).

The Adaptation Function
On the basis of the adaptation function, the genetic algorithms designate the final solution. What is more, the genetic algorithms look for the maximal solution. In order to take into account the mentioned aspect and different criterion functions the adaptation function for k-the structure of the matrix M(t,k) must take the following form (K = {1, . . . , k, . . . , K}-the set of the structures M(t,k) in the population, t-iteration): All the decision variables can be read with the structure. In order to be able to add the values of all criterion functions the adaptation function needs to be presented as the sum of quotients where e.g.,: F1min(t) determines the minimum value of the structure calculated according to the first criterion function (1) from the whole population in a given iteration of algorithm, F1(k,t) determines the value of criterion function (1) for k-the structure of the matrix M(t,k), F2min(t) determines the minimum value of the structure calculated according to the second criterion function (6) from the whole population in a given iteration of the algorithm. The function F(k,t) for k-the structure of the matrix M(t,k) will reach the maximum value in the case when each function, e.g., F1(k,t) reaches F1min, F2(k,t) reaches F2min and so on. The structure of maximal value of the function F(k,t) after all iterations is the solution of the algorithm.

The Crossover Process
In this process two chromosomes are selected in a random way. The crossover process is different for each part of the chromosome. The crossover process for the parts I, IV, and V takes the following form. To implement the crossover process, two matrices are developed: DIV which comprise rounded up average values from both parents, and the matrix REM containing the information whether the rounding up was indeed necessary. Assuming that the value of the matrices M1 and M2 (parents) in all the cells assume determination m 1 v,v , m 2 v,v , the values of the elements of the matrices DIV and REM are calculated from the following dependencies: The full description of the crossover operator process was presented in [49] and presented in a graphical way in   F(k,t) for k-the structure of the matrix M(t,k) will reach the maximum value in the case when each function, e.g. , F1(k,t) reaches F1min, F2(k,t) reaches F2min and so on. The structure of maximal value of the function F(k,t) after all iterations is the solution of the algorithm.

The Crossover Process
In this process two chromosomes are selected in a random way. The crossover process is different for each part of the chromosome. The crossover process for the parts I, IV, and V takes the following form. To implement the crossover process, two matrices are developed: DIV which comprise rounded up average values from both parents, and the matrix REM containing the information whether the rounding up was indeed necessary. Assuming that the value of the matrices M1 and M2 (parents) in all the cells assume determination The full description of the crossover operator process was presented in [49] and presented in a graphical way in      F(k,t) for k-the structure of the matrix M(t,k) will reach the maximum value in the case when each function, e.g. , F1(k,t) reaches F1min, F2(k,t) reaches F2min and so on. The structure of maximal value of the function F(k,t) after all iterations is the solution of the algorithm.

The Crossover Process
In this process two chromosomes are selected in a random way. The crossover process is different for each part of the chromosome. The crossover process for the parts I, IV, and V takes the following form. To implement the crossover process, two matrices are developed: DIV which comprise rounded up average values from both parents, and the matrix REM containing the information whether the rounding up was indeed necessary. Assuming that the value of the matrices M1 and M2 (parents) in all the cells assume determination The full description of the crossover operator process was presented in [49] and presented in a graphical way in     The crossover process for the Part II or III takes the following form: Figures 8 and 9. The first step is to select in a random way the sub-matrix of the substructure (Part II or Part III) in each chromosome intended for the crossover process. The next step is to exchange this substructure between the chromosomes.   The crossover process for the Part II or III takes the following form: Figures 8 and 9. The first step is to select in a random way the sub-matrix of the substructure (Part II or Part III) in each chromosome intended for the crossover process. The next step is to exchange this substructure between the chromosomes.

The Mutation Process
In this process, the matrix is selected in a random way. The mutation process for the parts I, IV, and V takes the following form. The operation rule of a mutation operator consists of the sampling of two figures p and q from the range: 2 ≤ p ≤ k and 2 ≤ q ≤ n, which determine the number of lines and columns of a sub-matrix with dimensions p × q (k-the number of the lines in the substructure e.g., the part I, n-the number of the columns in this substructure). The generated matrix is modified in such a way that the total value in the columns and the lines before and after the modification process is not changed. The mutation process has been outlined in Reference [50] and in a graphical way it is presented in Figure 10. The mutation process for the Parts II or III takes the following form, Figure 11. The first step is to select the cell in a random way, and the second step is to change the value of this cell from 1 to 0 or from 0 to 1. The crossover process for the Part II or III takes the following form: Figures 8 and 9. The first step is to select in a random way the sub-matrix of the substructure (Part II or Part III) in each chromosome intended for the crossover process. The next step is to exchange this substructure between the chromosomes.

The Mutation Process
In this process, the matrix is selected in a random way. The mutation process for the parts I, IV, and V takes the following form. The operation rule of a mutation operator consists of the sampling of two figures p and q from the range: 2 ≤ p ≤ k and 2 ≤ q ≤ n, which determine the number of lines and columns of a sub-matrix with dimensions p × q (k-the number of the lines in the substructure e.g., the part I, n-the number of the columns in this substructure). The generated matrix is modified in such a way that the total value in the columns and the lines before and after the modification process is not changed. The mutation process has been outlined in Reference [50] and in a graphical way it is presented in Figure 10. The mutation process for the Parts II or III takes the following form, Figure 11. The first step is to select the cell in a random way, and the second step is to change the value of this cell from 1 to 0 or from 0 to 1.

The Mutation Process
In this process, the matrix is selected in a random way. The mutation process for the parts I, IV, and V takes the following form. The operation rule of a mutation operator consists of the sampling of two figures p and q from the range: 2 ≤ p ≤ k and 2 ≤ q ≤ n, which determine the number of lines and columns of a sub-matrix with dimensions p × q (k-the number of the lines in the substructure e.g., the part I, n-the number of the columns in this substructure). The generated matrix is modified in such a way that the total value in the columns and the lines before and after the modification process is not changed. The mutation process has been outlined in Reference [50] and in a graphical way it is presented in Figure 10. The crossover process for the Part II or III takes the following form: Figures 8 and 9. The first step is to select in a random way the sub-matrix of the substructure (Part II or Part III) in each chromosome intended for the crossover process. The next step is to exchange this substructure between the chromosomes.

The Mutation Process
In this process, the matrix is selected in a random way. The mutation process for the parts I, IV, and V takes the following form. The operation rule of a mutation operator consists of the sampling of two figures p and q from the range: 2 ≤ p ≤ k and 2 ≤ q ≤ n, which determine the number of lines and columns of a sub-matrix with dimensions p × q (k-the number of the lines in the substructure e.g., the part I, n-the number of the columns in this substructure). The generated matrix is modified in such a way that the total value in the columns and the lines before and after the modification process is not changed. The mutation process has been outlined in Reference [50] and in a graphical way it is presented in Figure 10. The mutation process for the Parts II or III takes the following form, Figure 11. The first step is to select the cell in a random way, and the second step is to change the value of this cell from 1 to 0 or from 0 to 1. The mutation process for the Parts II or III takes the following form, Figure 11. The first step is to select the cell in a random way, and the second step is to change the value of this cell from 1 to 0 or from 0 to 1.  Figure 11. The mutation process for Part II of the chromosome.

The Results and Discussion
The algorithm was implemented by the use of the real input data in the C# programming language, Table 1. The sensitivity analysis of the algorithm was carried out based on a change of the distances between the suppliers and the warehouses and the driving time between them (e.g., 50/70/130/90-distance/distance/driving time/driving time, the variant 1-50/70, the variant 2-130/90). The additional input data: the first type of the vehicle, the capacity of 30 pallets, the fuel consumption cost-4 PLN/km, the number of the vehicles-16, the second type of the vehicle, the capacity of 20 pallets, the fuel consumption cost-3 PLN/km, the number of the vehicles-8, the permissible speed 80 km/h. The first step of the implementation of the genetic algorithm is to find the set of the best parameters which characterize this algorithm. The following combinations of the parameters were analyzed: pcross-crossover parameter, pmut-mutation parameter ( Table 2). The number of the iterations was set to 100. The linear scaling factor for the genetic algorithm accordance with the recommendations of the literature [49] assumes the value 2.0. The results of all the tests for the parameters for two variants arre presented in Table 3. The graphical presentation of work of the genetic algorithm is shown in Figure 12 (pcross = 0.8, pmut = 0.03). Figure 11. The mutation process for Part II of the chromosome.

The Results and Discussion
The algorithm was implemented by the use of the real input data in the C# programming language, Table 1. The sensitivity analysis of the algorithm was carried out based on a change of the distances between the suppliers and the warehouses and the driving time between them (e.g., 50/70/130/90-distance/distance/driving time/driving time, the variant 1-50/70, the variant 2-130/90). The additional input data: the first type of the vehicle, the capacity of 30 pallets, the fuel consumption cost-4 PLN/km, the number of the vehicles-16, the second type of the vehicle, the capacity of 20 pallets, the fuel consumption cost-3 PLN/km, the number of the vehicles-8, the permissible speed 80 km/h. The first step of the implementation of the genetic algorithm is to find the set of the best parameters which characterize this algorithm. The following combinations of the parameters were analyzed: p cross -crossover parameter, p mut -mutation parameter ( Table 2). The number of the iterations was set to 100. The linear scaling factor for the genetic algorithm accordance with the recommendations of the literature [49] assumes the value 2.0. The results of all the tests for the parameters for two variants arre presented in Table 3. The graphical presentation of work of the genetic algorithm is shown in Figure 12 (p cross = 0.8, p mut = 0.03).   In the Figure 9 it can be noticed that the convergence of the algorithm for the variants with the linear scaling occurs after 40 iterations, whereas after 30 iterations without scaling. This result underlines a huge role of the scaling process in finding the best solution. However, considering the complexity of the assignment problem, the solution is accepted from a practical point of view. The assignment for the variant 1 is presented in Figures 13 and 14.  In the Figure 9 it can be noticed that the convergence of the algorithm for the variants with the linear scaling occurs after 40 iterations, whereas after 30 iterations without scaling. This result underlines a huge role of the scaling process in finding the best solution. However, considering the complexity of the assignment problem, the solution is accepted from a practical point of view. The assignment for the variant 1 is presented in Figures 13 and 14   In the Figure 9 it can be noticed that the convergence of the algorithm for the variants with the linear scaling occurs after 40 iterations, whereas after 30 iterations without scaling. This result underlines a huge role of the scaling process in finding the best solution. However, considering the complexity of the assignment problem, the solution is accepted from a practical point of view. The assignment for the variant 1 is presented in Figures 13 and 14.  The presented approach to the implementation of the genetic algorithm was not used in the allocation issues. Genetic algorithms were chosen for the solution due to their high popularity and usefulness in solving this type of issues. However, to prove the legitimacy of using this type of metaheuristics it is necessary to present a comparison with other methods. Due to the complexity of the problem, the comparison was made with other metaheuristic algorithms. The presented approach to the implementation of the genetic algorithm was not used in the allocation issues. Genetic algorithms were chosen for the solution due to their high popularity and usefulness in solving this type of issues. However, to prove the legitimacy of using this type of metaheuristics it is necessary to present a comparison with other methods. Due to the complexity of the problem, the comparison was made with other metaheuristic algorithms.
For the comparison, PSO (particle swarm optimization) and SA (simulated annealing) which are popular in problems of routing and allocation were chosen. The PSO implementation was carried out according to the procedures presented in Reference [55], and for the SA algorithm in Reference [56]. Due to the specific nature of the implemented genetic algorithm and a multicriteria approach, a comparison for the selected example is presented. Fifty simulations of calculations were made for testing. Table 4 presents the maximum found and average values for the adaptation function and average calculation time. The number of iterations of 20, 50, and 500 was assumed as the stop condition. The search of the solution space for the adaptation function is shown in Figure 15 and the convergence of the algorithms is shown in Figure 16 for one of the test variants.
The parameters adopted for genetic algorithm (GA) were selected according to test 9 ( Table 2). In turn, for the SA and PSO algorithm they were adopted according to the work presented by Reference [57] in which tests were performed comparing parameters of various methods. Based on the work indicated, an initial temperature of 20 was assumed for SA, a cooling rate of 0.6. For PSO, acceleration coefficients were assumed to be 1.1 and 0.01. The assessment function is identical to the adaptation function for the genetic algorithm (19). Table 4. Comparison of results obtained with different methods (variant 2) repeated 50 times using the genetic algorithm (GA), simulated annealing (SA), and particle swarm optimization (PSO) methods.  For the comparison, PSO (particle swarm optimization) and SA (simulated annealing) which are popular in problems of routing and allocation were chosen. The PSO implementation was carried out according to the procedures presented in Reference [55], and for the SA algorithm in Reference [56]. Due to the specific nature of the implemented genetic algorithm and a multicriteria approach, a comparison for the selected example is presented. Fifty simulations of calculations were made for testing. Table 4 presents the maximum found and average values for the adaptation function and average calculation time. The number of iterations of 20, 50, and 500 was assumed as the stop condition. The search of the solution space for the adaptation function is shown in Figure 15 and the convergence of the algorithms is shown in Figure 16 for one of the test variants. Table 4. Comparison of results obtained with different methods (variant 2) repeated 50 times using the genetic algorithm (GA), simulated annealing (SA), and particle swarm optimization (PSO) methods.     Implementation of various methods allows not only to verify the correctness of their implementation, but also to assess them in terms of the quality of the solution returned, time of solution determination, and convergence. The solution generated by the algorithms for complex decision problems is a sub-optimal solution, which Table 4 confirms.

Number of Iterations
The solutions found by the developed method are qualitatively similar to those determined by other metaheuristic methods. It can be noticed that the genetic algorithm returns the best solution;, however, the time of obtaining solutions is much longer than in the case of other algorithms. The convergence of the SA algorithm is slower than GA and PSO in which it has a similar character. This means that the PSO is better for resource utilization. Genetic algorithm, in turn, returns the best solutions. Simulated annealing has a quick calculation time, but slower convergence and returns worse solutions in terms of the solution space searching. Nevertheless, all methods returned similar results within acceptable limits in the context of the problem taken under consideration. In the light of such a comparison, it should be noted that the genetic algorithm has an implementation advantage and is very flexible in introducing additional mechanisms for mapping other variants of the assignment problem, including the dynamics of processes. On the other hand, it returned the best results in terms of the criterion function, which also is its added value. However, it will be necessary to conduct additional tests for extended versions of the model and various algorithms, including their modification. The presented example is static. However, it should be emphasized that production systems are dynamic processes are sensitive to any stimuli and respond to them The parameters adopted for genetic algorithm (GA) were selected according to test 9 ( Table 2). In turn, for the SA and PSO algorithm they were adopted according to the work presented by Reference [57] in which tests were performed comparing parameters of various methods. Based on the work indicated, an initial temperature of 20 was assumed for SA, a cooling rate of 0.6. For PSO, acceleration coefficients were assumed to be 1.1 and 0.01. The assessment function is identical to the adaptation function for the genetic algorithm (19).
Implementation of various methods allows not only to verify the correctness of their implementation, but also to assess them in terms of the quality of the solution returned, time of solution determination, and convergence. The solution generated by the algorithms for complex decision problems is a sub-optimal solution, which Table 4 confirms.
The solutions found by the developed method are qualitatively similar to those determined by other metaheuristic methods. It can be noticed that the genetic algorithm returns the best solution;, however, the time of obtaining solutions is much longer than in the case of other algorithms. The convergence of the SA algorithm is slower than GA and PSO in which it has a similar character. This means that the PSO is better for resource utilization. Genetic algorithm, in turn, returns the best solutions. Simulated annealing has a quick calculation time, but slower convergence and returns worse solutions in terms of the solution space searching. Nevertheless, all methods returned similar results within acceptable limits in the context of the problem taken under consideration. In the light of such a comparison, it should be noted that the genetic algorithm has an implementation advantage and is very flexible in introducing additional mechanisms for mapping other variants of the assignment problem, including the dynamics of processes. On the other hand, it returned the best results in terms of the criterion function, which also is its added value. However, it will be necessary to conduct additional tests for extended versions of the model and various algorithms, including their modification. The presented example is static. However, it should be emphasized that production systems are dynamic processes are sensitive to any stimuli and respond to them with a certain behavior. Therefore, it is necessary to take into account the dynamics of the system, and hence the changes of its individual parameters over time. The inclusion of time dependencies approach to the problem requires additional considerations and a specific approach to optimization, system organization and control of its flows. Issues addressing this problem can be found, e.g., in References [58,59] and somewhat determine the current direction of further research for the subject taken, including the prediction and resilience of the system to occurring changes.

Conclusions
The aim of the paper is to solve the task assignment of the vehicles for the production company. The genetic algorithm has been developed in order to solve this problem. The further step in the context of the used algorithm in the assignment problem is to test other methods in the selection process. The early convergence to the sub-optimal solution is blocked by the use of the linear scaling. The results generated by this algorithm depend on numerous factors, e.g., the parameters of the algorithm and the number of iterations.
The developed algorithm can be used for production companies to develop, e.g., driver's working schedules. The main advantage of this algorithm is that the results are generated in a quick way, which is very important for the production companies. The processes occurring in the production companies are dynamic processes. For this reason, this algorithm must be started a few times depending on the volume of the cargo and the warehouse capacities. In this case, the calculation speed plays a huge role which underlines the utility of this algorithm for the production companies.
In entities with a complex structure and large organizational diversity, there are problems with the appropriate scheduling and use of available resources. This leads either too high reliability of the entire system and thus to a drop in performance. On the other hand, it can lead to overestimation, which increases costs and also has a negative impact on efficiency. Support for the proposed multi-criteria method will increase efficiency [60]. Therefore, the application of this solution is particularly important from the point of view of complex entities, e.g., FMCG (fast-moving consumer goods) industries, where it is necessary to plan the use of resources very carefully [61].
It should be noted that the presented genetic algorithm has been used to solve the specific problem of the task assignment of the vehicles for the production company. The presented mathematical model of the assignment problem is the original model, which has not been analyzed in the literature before, therefore it is not possible to compare the results generated by other methods with the results obtained by the developed genetic algorithm.
It is worth emphasizing that the presented algorithm is the starting point for testing other algorithms within the defined research problem. The comparison of the random results with the results generated by the proposed genetic algorithm emphasizes the effectiveness of its operation in the discussed assignment problem. The generated results by the genetic algorithm are the basis for further work on the development of new algorithms in the context of the examined problem. Among the directions of further research, it is planned to expand the model and thus modify the developed method to better adapt to the requirements of reality. In connection with the above, the system dynamics and time dependencies between its elements and functional organization will be taken into account. It is also necessary to take into account the randomness of some parameters, such as travel time and reliability of transport means. Finally, planning the allocation of resources to tasks should be performed in a longer time horizon, for example, a week or a month, but at the same time ensuring flexibility to change the state of the system. It is also planned to conduct additional computational experiments on the example of another sourcing system, as well as to perform a simulation model and sensitivity test.