The concept of algorithm supporting the process of scheduling production tasks

. The purpose of the work was to develop a concept of an algorithm which supports the process of scheduling production tasks. The designed algorithm performs a task queue creation process in six steps: selecting a schedule type, declaring a queue length, selecting orders for queue development, loading data, automatic job analysis, and queue and Gantt chart generation, taking a decision on the acceptance of the designed production program. The designed system will use single-attribute priority rules (defined by experts) and multi-attribute rules that can be created by combining single-attribute rules. The concept of an algorithm that supports the process of scheduling production tasks, developed and tested by conducting simulations, can be the basis for developing a computer application supporting decision-making process in a manufacturing or service company.


Introduction
Production management in a modern company combines production engineering, organizational technology and staff experience. The aim is to minimize costs, while preserving the assumed level of production, while ensuring the quality of the offered products / services.
One of the key but at the same time the most difficult tasks in manufacturing management is task scheduling. A well-prepared schedule ensures manufacturing stability and minimizes decision-making uncertainty. Scheduling, as part of organizational techniques used in the enterprise, combined with other resources (e.g. staff experience, innovative technologies) is one of the conditions for a successful enterprise development. The schedule must take into account a number of factors (e.g. production costs, inventory values, storage costs, customer satisfaction, meeting delivery deadlines, minimizing delays, use of machine stock, minimizing rearming time, maximizing use of labor force).
The high complexity of production processes presents a serious challenge when scheduling production. Companies produce a wide range of products. There is also a multitude of production technologies. Different technologies use machines of different capacities, and this directly affects the manufacturing times. The additional difficulty is that not all production tasks are known at the beginning of the planning process. They may appear after the schedule has been prepared, which necessitates corrections. All this makes it difficult to coordinate production in time [1][2][3][4][5].
The scheduling methods can be divided into [6]: • static -the priority value is not changed while waiting for production, • dynamic -the value of the priority changes while waiting for production.
Most often, production scheduling requires a job scheduling / queuing process.
The problem of scheduling, outside manufacturing, occurs also in many other industries, such as information technology [7], transportation ( [8], medicine [9], scheduling classes (as well as project management) [10].
Agricultural engineering uses queuing quite broadly. For the case of agricultural field operations, according to ASABE Standards, the concept of scheduling is defined as ''determining the time, when various operations are to be performed. Availability of time, labour and machinery supply, job priorities and crop requirements are some important factors'' [11,12]. In the agri-food and biomass supply chain, four main functional areas can be identified, namely, production, harvest, storage, and distribution [13].
Problem of scheduling multiple machines, executing multiple operations at multiple fields, is difficult to find an optimal solution [11,14,15]. Many factors must be taken into account [15], like available labour and machinery, timeliness functions and workability [12].
The most common objectives in the machinery planning and scheduling problems are the minimisation of the total travelled distance or operational time [13] completion time (makes plan) or by assessing the tradeoff between time and cost [11] In operations research, the makes plan of a project is the total time that elapses from the beginning to the end. The term commonly appears in the context of scheduling.
Developing an optimal schedule requires decision making support tools [11,15]. The scheduling of field tasks problem is a critical aspect in the design of decision support systems (DSSs) for complex farm advising [16] Currently, the planning of the biomass collection operations is performed relying on the contractor's experience without the use of any dedicated planning tool [17]. In the supply chain planning, one-attribute methods such as FIFO, LIFO, and FEFO are used [18]. Biological products require additionally the transport within set deadlines. An example of such products may be biomass intended for energy-generating purposes [19].
The essence of the prioritising method is performing tasks in the order from the highest to lowest priority ( Figure 1). This method is justified in situations where it is difficult to determine which task is to be implemented first. Specifying an order queue can reduce production costs [20]. In the case of tasks with the same priority, an additional decision-making criterion (e.g. another rule) or random ordering is required [21].

Purpose and scope of work
The purpose of the work was to develop a concept of an algorithm which supports the process of scheduling production tasks.
In order to achieve the purpose of the research, existing scheduling methods were analysed. This was necessary for a rational selection of the prioritising method to be used in the proposed system. It was also necessary to carry out identification of elements of the system, to describe them, and to formulate requirements. The last step was to develop an algorithm for creating order queues.
In order to verify the correctness of the developed algorithm operation a simulation was carried out. The simulation was carried out for real products.

System design
In this publication, the system (task scheduling support system) was designed based on the analysis of scheduling problems (described in the literature and present in a real production plant).
Task scheduling methods fall into two main groups: single-attribute and multi-attribute priority rules. The one-attribute priority rules include [22][23][24] Vinod and Sridharan [24] conducted a comparative study of single-and multi-attribute priority rules. Simulation studies focused on optimizing payment deadlines, using dynamic priority rules. The authors compared the effectiveness of three single attribute priority rules (FIFO, SPT, EMODD) and four multiattribute priority rules (CR + SPT, S / RPT, PT + WINQ and PT + WINQ + SL). The worst effects have been shown by FIFO and EMODD rules. Good results were obtained for the SPT and PT + WINQ methods. Similar conclusions were reached by Wiśniewski [20], [25]. Studies conducted in the printing industry showed that the use of single-attribute priority rules does not produce the best results. Three products (leaflets, brochures, books) and eleven priority rules (FIFO, LOR, MOR, LPT, SPT, EDD, EMODD, CR + SPT, S / OPN, S / RPT+SPT, PT+WINQ+SL) were used. The results of the simulation show that there is no significant difference in waiting time between the applied priority rules for lower machine utilization. However, at the highest level of machine utilization (> 85%), the FIFO, LOR, SPT, EDD rules were the least effective. Singleattribute priority rules showed little flexibility, which directly affected product waiting time. The application of multi-attribute rules resulted in much better effects.
Apart from the analysis of the results presented in the literature on the subject, this study examined the opinions of experts-practitioners who daily work on scheduling production task queues in multi-product production systems. As a result, it was found out that the best would be the application of single rules with the possibility of combining them into multi-attribute rules. According to experts, scheduling tasks should include rules such as FIFO, SPT, EDD and LOR. In their opinion, for simple cases it is possible to use singleattribute priority rules, while in more complex cases, it is advisable to use multi-attribute priority rules.
Thus, it was assumed that in the designed system, one-attribute priority rules (defined by experts) and multi-attribute rules obtained by combining one-attribute rules would be used. The user will be able to freely connect them and use them for selected application. Multithreaded priority rules that can be achieved are: FIFO + SPT, FIFO + EDD, SPT + EDD, SPT + LOR, EDD + LOR, FIFO + SPT + EDD. Table 1. Description of the system elements.
As a result of the conducted research which included a detailed analysis of the production processes and a series of brainstorming sessions with the expert panel, detailed requirements were formulated with regard to the structure of the databases. Various elements of the system and necessary features describing these elements were identified (Table 1).

The scheduling algorithm
The tool (computer program) that supports the task scheduling process consists of two essential elements: the operation algorithm and the application interface (the outer part of the application). The external part of the application is designed and created mainly for the user. The interface allows the user to enter and edit data, and to generate report results.
The algorithm determines the order in which individual actions are performed, the input data required at each stage and the system-generated responses. Correct design of the algorithm is a key issue in developing a system concept that supports the scheduling of production tasks.

Products /services
They are a collection of information about manufactured products / services. The product type directly affects the production time.
-product / service type -group of products / services -production / services times at each stage

Posts /machines
A collection of all the posts / machines used in the production /service process. It is important to specify groups of posts / machines and their efficiency. The client states what products are ordered, the quantity and order delivery deadline. The production route is now automatically set for given types of products.
-name (order code) -type of ordered products -quantity of ordered products -order delivery deadline -production route -production time

Scheduling methods
Information on the scheduling methods available in the system. The user may select an optimal method in given applications.
-groups of methods (single-attribute, multi-attribute) -declaration of the selected method  Once the system elements have been defined, a scheduling algorithm (order queue) has been designed. Its scheme is shown in Figure 2.
In order to increase the clarity of the scheme (Figure 2) actions taken by the decision maker (the scheduler) were simplified: actual activities of the decision-maker (Figure 3a). were replaced with a simplified block diagram (Figure 3b). At each stage of the operation, the decision maker has the opportunity to improve his choices before moving on to the next step in the algorithm.
Before starting to create a queue, it is necessary to update the database in the following categories: products, jobs, sequence list, list of sequence steps, orders, buffers, failures, rearmaments, statuses. The decision maker can make an update after entering the "DATA" option. The decision maker has the possibility to enter new data or edit and delete existing 4 BIO Web of Conferences 10, 02009 (2018) https://doi.org/10.1051/bioconf/20181002009 Contemporary Research Trends in Agricultural Engineering data. When entering data, the system pre-checks their correctness by verifying the type and completeness of the data.
When the input procedure is complete, the data is stored in the database, from where it is later loaded into the production task scheduling procedure.
In addition to the production data database, we have also designed: • rule database -used for storing priority (one-attribute and multi-attribute) rules which the decision maker can select in the task scheduling procedure, • schedule database -used for storing the generated schedules. It is necessary if they are later modified.
The main part of the program is the production tasks scheduling procedure. It starts when the user selects the option "SCHEDULE". It consists of six steps: 1. Selection of a schedule type. The decision maker selects an option to create a new schedule or to modify an existing one. In case of modifications, the previously generated and saved schedule must be loaded.

Declaration of length of time for the queue.
After choosing the option "scheduling", the user should declare the period for which the task / order queue is to be worked out (number of queue hours, number of queue days).

Selection of orders to be taken into account when
preparing the queue. The decision maker chooses from the previously declared tasks those that are to be taken into account when creating the queue. 4. Loading data. In this step, the necessary data from the previously updated database is automatically loaded. 5. Generating a queue and a Gantt chart. Predefined variables are used when analyzing. At this stage, combined single-attribute rules are used. The queue is presented graphically to the decision maker as a chart, which facilitates the analysis of the resulting production program. 6. Making a decision. After analyzing the generated queue, the user has the possibility to accept the given production program. In case of acceptance, it is possible to create a final report. If the decision is not accepted by the decision maker, he / she can change the selected parameters and repeat the procedure.
Despite the automation of the task scheduling procedure in the proposed system, ultimately it is the decision maker who is responsible for the implementing the generated schedule. By modifying the existing queue, the user can make corrections that occurred during the production process. The goal is to protect the system from errors resulting from unforeseen events.

Simulation test
The simulation of the developed algorithm was carried out using Microsoft Excel. Real data from the production process was used in the simulation. In the simulation real data from the production process was used.
Data required for the simulation were obtained from a company manufacturing electronic parts. The company did not agree to disclose its name or to use real product names. To present the results, commercial information was coded.
The company manufactures three types of products (marked as A, B and C) which belong to 5 groups of products (G1G5). The total production offer covers 255 different products but the number of products in various groups differs G1 Series of simulations were performed, with the type and size of order based on the interpretation of random numbers. Different types of orders and different sizes of orders (from 100 to 500 units) were compared. An assumption was made that the number of products to manufacture did not change; it was a set of 10 products (2 most diversified products from each of the five groups): G1 = A1 and A48, G2 = A49 and A99, G3 = A100 and A174, G4 = B1 and B57, G5 = C1 and C24. The number of orders was 10, 50, 100 and 255 from the 10 selected products.
After selecting at random a set of production orders, the developed algorithm was applied to generate production plans with the use of different priority rules (8 rules: LOR, MOR, SPT, LPT, EDD+LOR, EDD+MOR, EDD+ SPT, EDD+ LPT). Fig. 4 presents the results of scheduling, obtained during the simulations for the 10 selected products.
As the combined production times were the same for all methods, the factor differentiating the product manufacturing time was the rearming time.
After the analysis of the simulation results, it can be observed that the most crucial factor is the number of actions to be performed. All 4 methods using that factor (EDD+MOR, EDD+LOR, MOR, LOR) achieved the best results. It can also be noted that the effectiveness of using scheduling rules increases in line with increasing number of products, and that multi-attribute rules give better results than the single-attribute rules.
Another observation is that the validity of using priority rules increases with the increase of products to be manufactured. At the level of 10 products most of the priority rules had the same average rearming time. When the number of products increased (to 50, 100, 255), the dispersion of the average rearming time increased, too. In consequence, lower and lower values of the average rearming time were obtained. The simulation results also show the importance of the adequate selection of the priority rule.
A group of the company experts involved in production scheduling positively evaluated the results of the analyses. They stated that the results were in line with their expectations resulting from professional experience and that the use of priority rules allows to speed up the development of optimal production schedules.

Summary
The developed concept of order-queuing algorithm as an IT tool supporting the process of scheduling production tasks is the basis for the development of a computer application to support a decision-making process in manufacturing or service company The designed algorithm performs a task queue creation process in six steps: selecting a schedule type, declaring a time length for the queue, selecting orders considered in queue development, loading data, automatic job analysis and queue generation, and Gantt charting as well as making a decision with regard to the acceptance of the generated production schedule. In the designed system, one-attribute priority rules (determined by experts) and multi-attribute priority rules (obtained by combining single-attribute rules) were used.
The effectiveness of a particular priority rule may be related to the characteristics of a particular product group.
Simulation experiments have confirmed the assumption that the use of priority rules is valid. Selecting the right priority rule allows to significantly improve results -to shorten average rearming time.
Based on the performed simulations, it was shown that the use of an appropriate priority rule is particularly important for a large number of products (over 50). For example, for simulating the production of 255 products, the average rearming time for certain rules differed twice (8.15 min for LOR and 16.61 min for EDD + SPT and EDD + LPT).